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

bstansberry@jboss.com do-not-reply at jboss.com
Tue Feb 10 09:31:44 EST 2009

A couple techniques to get a ref to a classloader:

1) Call getClass().getClassLoader() on some class that you know was loaded from the ear.  From your stack trace com.navineo.sa.jmx.ha.taches.DummyTacheEgoiste1HAS seems like a candidate.

2) You can call Thread.currentThread().getContextClassLoader() when you know the correct classloader is in place. Best time for that is during some call that happens during application deployment. So, say class com.navineo.sa.jmx.ha.taches.DummyTacheEgoiste1HAS for whatever reason isn't packaged in the ear, but you know a particular instance of that class is constructed as part of the deployment of the ear. So you could call Thread.currentThread().getContextClassLoader() in the constructor.

Re: loader-repository in general, see the links under 


particularly https://www.jboss.org/community/docs/DOC-10290. 

Re: using the loader-repository element in a Seam app, if the Seam docs are saying to do that, you'll have to ask the Seam folks why. (I'm not implying they are wrong to say to do it; they very much know what they are doing.)

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

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

More information about the jboss-user mailing list