[jboss-user] [Clustering/JBoss] - Re: Classloading failure in a new thread started from the cl

bstansberry@jboss.com do-not-reply at jboss.com
Mon Feb 9 15:21:04 EST 2009


Your problem is the thread doesn't have the correct classloader assigned to it via Thread.setContextClassLoader().  The clustered JMX notification is going to be delivered by a thread coming up from JGroups:

17:29:36,315 INFO  [STDOUT] [com.navineo.sa.jmx.ha.taches.ComEmbarquesHAS][IncomingPacketHandler (channel=PartitionNavineo)] - DEBUT demarrer

So it's not going to have your ear's classloader assigned to it. If you spawn a thread to handle the findAllCentreExploitation call, it's going to inherit whatever TCCL is bound to the JGroups thread as it's TCCL. You need to assign the correct TCCL to that thread.

Commenting out the loader-repository element makes the problem go away because it means your application classes are available to the thread's classloader.  That's a band-aid though.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4208270#4208270

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4208270



More information about the jboss-user mailing list