-
2. Re: ClassCastException while concurrent accessing EJBs and c
aheizen Aug 19, 2008 3:58 AM (in response to aheizen)Hello Peter,
thanks for the links. They describe partly my problem. All component are deployed with enabled class loader isolation. And call between EJBs are configured as CallByValue. If I am disabling the class loader isolation by two components that deployed on the same JBoss instance then no ClassCastExcetion is throwing more. Only by distributed deployment and enabled class loader isolation came it to ClassCastException.
Any other ideas?
Regards
Andreas Heizenreder -
3. Re: ClassCastException while concurrent accessing EJBs and c
peterj Aug 19, 2008 2:41 PM (in response to aheizen)Try this. On the system getting the class cast exception, run jbossas with the "-verbose:class" JVM option (add it to the JAVA_OPTS variable in the run script). This will print out each class loaded and the jar it came from. This might help you resolve the issue (for example, the EJB is created using a class at one location but when you code does the cast it is getting a class from another location).
If that does not help you resolve the problem, please post the code that is accessing the EJB and getting the CCE. Also post the full stack trace for the CCE. -
4. Re: ClassCastException while concurrent accessing EJBs and c
aheizen Aug 25, 2008 4:28 AM (in response to aheizen)Hello Peter,
thanks for your tip with "-verbose:class". The logs after including this option in run.sh showed that the classes were correctly loaded on deployment of caller components. But while running my JUnit test comes it to CCE as always. I have activated UCL logging in JBoss inctance where caller components are running. In UCL Logs I found that at the moment when response from called remote EJB is to be deserialized came it to ClassNotFoundException in UCL Tasks.
I would like to provide the collected log from my test. What is the best way for this?
Regards
Andreas Heizenreder -
5. Re: ClassCastException while concurrent accessing EJBs and c
aheizen Sep 8, 2008 8:24 AM (in response to aheizen)Hello,
I published the project to reproduce the ClassCastException under http://www.tuah.de/jboss-classcastexception-test/jboss-classcastexception-test.zip.
The archive contains a Eclipse project and Ant build.xml. You can reproduce the exception by running JUnit Tests from Eclipse or through Ant targets.
Regads
Andreas Heizenreder