-
1. Re: EJB Calls another EJB causes ClassCastException
adrian.brock Apr 24, 2003 1:35 PM (in response to kself)There is no lib/ext directory in jboss3.x
Regards,
Adrian -
2. Re: EJB Calls another EJB causes ClassCastException
kself Apr 24, 2003 2:52 PM (in response to kself)Sorry, I should have said that jar was copied into:
\\Jboss3\server\default\lib
where it is picked up and used by JBoss. -
3. Re: EJB Calls another EJB causes ClassCastException
adrian.brock Apr 24, 2003 3:35 PM (in response to kself)Try using something like this class
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosstest/src/main/org/jboss/test/util/Debug.java?annotate=1.1.2.2
To print the class/classloader information for the
class you expect and the actual class you get.
Regards,
Adrian -
4. Re: EJB Calls another EJB causes ClassCastException
adrian.brock Apr 24, 2003 3:39 PM (in response to kself)Also, check you don't have a jndi.properties
in your deployments.
There is some horrible caching in the 1.4 RMI
classloader. There is a workaround available:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jboss-system/src/main/org/jboss/system/JBossRMIClassLoader.java?annotate=1.2
Regards,
Adrian -
5. Re: EJB Calls another EJB causes ClassCastException
kself Apr 25, 2003 8:34 AM (in response to kself)After examining the output from the utility classes you suggested, it was clear that the EJBHome and BHome classes were being loaded by two seperate classloaders. Howerver, I noticed that they shared a common classloader which gave a clue on how to solve this problem.
I copied the stub .jar file into the:
JAVA_HOME\jre\lib\ext
diretory. I then copied the jboss-j2ee.jar file into this directory (because JBoss was complaining about not finding some of the javax classes). Once the Application Server was restarted, everything started working.
Thanks for the assistance. What is the downside of copying the jboss-j2ee.jar file into this directory? So far I have not seen any, since everything is working great. -
6. Re: EJB Calls another EJB causes ClassCastException
kself Apr 25, 2003 8:36 AM (in response to kself)After examining the output from the utility classes you suggested, it was clear that the EJBHome and BHome classes were being loaded by two seperate classloaders. Howerver, I noticed that they shared a common classloader which gave a clue on how to solve this problem.
I copied the stub .jar file into the:
JAVA_HOME\jre\lib\ext
diretory. I then copied the jboss-j2ee.jar file into this directory (because JBoss was complaining about not finding some of the javax classes). Once the Application Server was restarted, everything started working.
Thanks for the assistance. What is the downside of copying the jboss-j2ee.jar file into this directory? So far I have not seen any, since everything is working great.