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

chtimi2 do-not-reply at jboss.com
Thu Feb 5 12:00:35 EST 2009


Here is what i do: 

1/ I'm notified of a topology change in my MembershipListener (which is an inner class of an MBean)

2/ I call asynchronously (so that i'm no longer in the JGroups thread) a method that notifies the nodes (via the clustered JMX notification mechanism)

3/ When a node's NotificationListener receives the event, it calls a SLSB entity finder method (findAllCentreExploitation). 
The SLSB is looked up as remote but the call happens on the same node as the NotificationListener-->the classloading issue doesn't seem to come from a remoting issue?

It doesn't change anything whether i call the SLSB in a new thread or not, it still fails loading the entity class.
I'm really stuck here.. 

Something that could be (is probably) related, I have had classloading issues from a JGroups thread before, that i worked around by converting the problematic application object to and from an array of J2SE objects (so no application classloading necessary).
Do i have to tell JBoss to use the right classloader, or what else can i do?


Something else that seems strange that i thought i should mention; it doesn't fail on all topology changes, only certain ones. 
For instance, i have 2 nodes A and B; the successive topologies are:
(A)-->(A,B)-->(B)-->(A,B)
IT ONLY FAILS ON THE LAST TOPOLOGY CHANGE! But maybe that's not important and the real solution is doing something about the classloading?

Here is the stacktrace:
17:29:36,315 INFO  [STDOUT] [com.navineo.sa.jmx.ha.taches.ComEmbarquesHAS][IncomingPacketHandler (channel=PartitionNavineo)] - DEBUT demarrer
  | 17:29:36,325 ERROR [STDERR] java.lang.reflect.UndeclaredThrowableException
  | 17:29:36,325 ERROR [STDERR] 	at $Proxy411.findAllCentreExploitation(Unknown Source)
  | 17:29:36,325 ERROR [STDERR] 	at com.navineo.sa.jmx.ha.taches.DummyTacheEgoiste1HAS$PrintTotoRunnable.run(DummyTacheEgoiste1HAS.java:57)
  | 17:29:36,326 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:619)
  | 17:29:36,326 ERROR [STDERR] Caused by: java.io.IOException
  | 17:29:36,326 ERROR [STDERR] 	at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:107)
  | 17:29:36,326 ERROR [STDERR] 	at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:269)
  | 17:29:36,326 ERROR [STDERR] 	at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
  | 17:29:36,326 ERROR [STDERR] 	at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
  | 17:29:36,326 ERROR [STDERR] 	at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
  | 17:29:36,326 ERROR [STDERR] 	at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
  | 17:29:36,326 ERROR [STDERR] 	at org.jboss.serial.io.MarshalledObjectForLocalCalls.get(MarshalledObjectForLocalCalls.java:60)
  | 17:29:36,326 ERROR [STDERR] 	at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:96)
  | 17:29:36,326 ERROR [STDERR] 	at org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor.invoke(ClusteredIsLocalInterceptor.java:53)
  | 17:29:36,326 ERROR [STDERR] 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 17:29:36,326 ERROR [STDERR] 	at org.jboss.ejb3.stateless.StatelessClusteredProxy.invoke(StatelessClusteredProxy.java:112)
  | 17:29:36,326 ERROR [STDERR] 	... 3 more
  | 17:29:36,326 ERROR [STDERR] Caused by: java.lang.reflect.InvocationTargetException
  | 17:29:36,326 ERROR [STDERR] 	at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
  | 17:29:36,326 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 17:29:36,327 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 17:29:36,327 ERROR [STDERR] 	at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:103)
  | 17:29:36,327 ERROR [STDERR] 	... 13 more
  | 17:29:36,327 ERROR [STDERR] Caused by: java.io.IOException: No ClassLoaders found for: com.navineo.dock.commande.unitaire.CentreExploitation
  | 17:29:36,327 ERROR [STDERR] 	at org.jboss.serial.classmetamodel.ClassMetamodelFactory.getClassMetaData(ClassMetamodelFactory.java:332)
  | 17:29:36,327 ERROR [STDERR] 	at org.jboss.serial.classmetamodel.StreamingClass.readStream(StreamingClass.java:72)
  | 17:29:36,327 ERROR [STDERR] 	at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:381)
  | 17:29:36,327 ERROR [STDERR] 	at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
  | 17:29:36,327 ERROR [STDERR] 	at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
  | 17:29:36,327 ERROR [STDERR] 	at org.jboss.serial.persister.ObjectInputStreamProxy.readObjectOverride(ObjectInputStreamProxy.java:68)
  | 17:29:36,327 ERROR [STDERR] 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:345)
  | 17:29:36,327 ERROR [STDERR] 	at java.util.ArrayList.readObject(ArrayList.java:593)
  | 17:29:36,327 ERROR [STDERR] 	... 17 more
  | 17:29:36,327 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.navineo.dock.commande.unitaire.CentreExploitation
  | 17:29:36,327 ERROR [STDERR] 	at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
  | 17:29:36,327 ERROR [STDERR] 	at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
  | 17:29:36,327 ERROR [STDERR] 	at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
  | 17:29:36,328 ERROR [STDERR] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  | 17:29:36,328 ERROR [STDERR] 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
  | 17:29:36,328 ERROR [STDERR] 	at java.lang.Class.forName0(Native Method)
  | 17:29:36,328 ERROR [STDERR] 	at java.lang.Class.forName(Class.java:247)
  | 17:29:36,328 ERROR [STDERR] 	at org.jboss.serial.classmetamodel.ClassMetamodelFactory.resolveClassByName(ClassMetamodelFactory.java:274)
  | 17:29:36,328 ERROR [STDERR] 	at org.jboss.serial.classmetamodel.ClassMetamodelFactory.getClassMetaData(ClassMetamodelFactory.java:289)
  | 17:29:36,328 ERROR [STDERR] 	... 24 more

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

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



More information about the jboss-user mailing list