| Summary: | java.lang.NoClassDefFoundError: sun/reflect/ConstructorAccessorImpl after redeploying bpm_orchestration quickstart multiple times | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise SOA Platform 5 | Reporter: | Martin Weiler <mweiler> |
| Component: | JBPM - within SOA | Assignee: | Martin Weiler <mweiler> |
| Status: | CLOSED DEFERRED | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 5.1.0 GA | CC: | kevin.conner |
| Target Milestone: | --- | ||
| Target Release: | 5.2.0 GA | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jira.jboss.org/jira/browse/SOA-3291 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-09-01 10:57:57 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Martin Weiler
2011-08-23 11:12:52 UTC
Link: Added: This issue is related to JBESB-3582 Things tried: - adding jboss-classloader.xml to the .esb deployable -- a. with a top-level classloader as described in [1] -- b. with isolation with a specific parent (9.9 in [2]) The problem with b. is that the par/jbpm process deployment can't share the same subdomain as the classloader specified for the ESB classloader, so that when the process is processed by jBPM, it can't find the classses deployed in the ESB deployment. See, for more info: [1] http://community.jboss.org/wiki/useJBossWebClassLoaderinJBoss5 [2] [Microcontainer Classloading Documentation|http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Web_Platform/5/html/JBoss_Microcontainer_User_Guide/sect-JBoss_Microcontainer_User_Guide-The_ClassLoading_Layer-ClassLoading.html] (includes explanation of jboss-classloader.xml) (BTW, a. above was just to see what would happen.. and re b. above -- .par deployments don't look at jboss-classloading.xml files)
The solution was actually fairly simple: undeploy the ESB and redploy the process. I'm currently running the following bash script, and it's already at iteration 13 -- most of the time this problem showed up by the 8th or 9th redployment.
{code}
d=0
while date
do ant deploy
s=10
echo -e "---\ndeploy $[++d] ($s)\n---" && sleep $s
ant deployProcess
s=5
echo -e "---\nprocess $d ($s)\n---" && sleep $s
ant startProcess
s=15
echo -e "---\nstart $d ($s)\n---" && sleep $s
ant undeploy
s=30
echo -e "---\nundeploy $d ($s)\n---" && sleep $s
done
{code}
Argh, not being able to edit my own comments is frustrating: I mean undeploy the ESB _deployment_ and redploy the ESB deployment and the process. Workaround Description: Added: Before (re)deploying the ESB deployment, first run {{ant undeploy}}
In short, when repeating deployments, follow the following steps:
1. ant deploy
2. ant deployProcess
3. ant startProcess
4. ant undeploy
Obviously, please wait for each step to complete before going on to the next step or restarting the cycle.
Workaround: Added: [Workaround Exists]
Workaround found: run ant undeploy before redeployment. See workaround part of issue, above. FYI: The script ran 33 iterations (without any exceptions) before I stopped it. Link: Removed: This issue is related to JBESB-3582 JBESB-3582 is not the same issue, that is related to multiple deployments sharing classes with one of them being undeployed. It looks like a jbpm job is executing a task using a classloader that has been undeployed, so this will be some sort of race. Release Notes Docs Status: Added: Documented as Resolved Issue Writer: Added: dlesage Release Notes Text: Added: https://issues.jboss.org/browse/SOA-3291 If the user redeploys the bpm_orchestration quick start multiple times, a race condition could occur, which lead to an java.lang.NoClassDefFoundError. A code fix has now been applied to address this. As a result, users will no longer see this error. The MyESBActionHandler class, referenced in the process but deployed in the ESB deployable, is the class that causes the classloading err
Stack when the class is initially loaded:
{code}
1. ClassLoadingTask$ThreadTask.run() line: 453
ClassLoaderManager.nextTask(Thread, ClassLoadingTask) line: 251
ClassLoaderManager.process(Thread, ClassLoadingTask) line: 150
2. ClassLoaderDomain(BaseClassLoaderDomain).loadClass(BaseClassLoader, String, boolean) line: 265
ClassLoaderDomain(BaseClassLoaderDomain).loadClass(BaseClassLoader, String) line: 1119
3. BaseClassLoader.loadClassFromDomain(String, boolean) line: 798
BaseClassLoader.loadClass(String, boolean) line: 441
4. ProcessClassLoader(ClassLoader).loadClass(String, boolean) line: 296
ProcessClassLoader(ClassLoader).loadClass(String) line: 248
Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
Class<T>.forName(String, boolean, ClassLoader) line: 247
Delegation.instantiate() line: 145
{code}
{noformat}
BaseClassLoader [3] --> ClassLoaderDomain [2] --> FilteredDelegateLoader [1]
|
ProcessClassLoader [4]
{noformat}
4 delegates to 3, which then finds 2 and creates 1 to load the class.
Link: Added: This issue is related to JBPM-2428 |