You definitely have to load a class as Frito told you : Thread.currentThread().getContextClassLoader().loadClass()
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). Fred View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3861616#3861616 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3861616 ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user