The appliction Server is Jboss4.0.
JDK is 1.42_05.
I need your help
Maybe I should read jboss4.0 src?
You must not do a Class.forName, instead use
If you still encounter problems read the wiki for classloader configuration (http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration) and check your assembly. There are, with the utmost probability, resources missing.
You definitely have to load a class as Frito told you :
But also, I would consider migrating immediately consider to JBoss 4.0.1.
I had plenty of problems with JBoss 4.0.0 loading classes of mine dynamically and more generally with the JBoss class loader (e.g. with JBossCache) , expecially for classes included in an EJB jar file, that in turns is itself contained inside an EAR file (like you do). I posted several subjects on this. I received the same exception as you did (class not found !).
I had test cases working with JBoss 4.0.0 RC2 but not with JBoss 4.0.0. When I migrated to JBoss 4.0.1, evrything went allright as with prior versions to 4.0.0.
I believed JBoss 4.0.0 class loader was somehat buggy. But JBoss tech leaders said JBoss 4.0.1 only changed some xml config of the class loader (they refered to release notes).
I've been having classloader problems as well with 3.2.3 (I've tried w/ 3.2.6 as well). I did the
which works great. I now get my class loaded just fine. However, I now get a NoClassDefFoundError in the method that calls the method with the above code in it.
I know the code works (not including the above) outside of jboss. FYI, the RTE is "java.lang.NoClassDefFoundError: javax/ejb/EJBObject". I can supply a more detailed code example if requested. It just may take some time to cut out the right code.