java.lang.ClassNotFoundException: No ClassLoaders found for: > org.jboss.jms.client.JBossConnectionFactory

1.2k Views Asked by At

I am trying to configure jms setup between two servers. The sender is on (server A)jboss 5 and the receiver is on (server B)jboss 4(which is using remote queue from server A.

When i try to run both on jboss 5 or jboss 4, it works. But when the receiver is on jboss 4 and sender is on jboss 5, then it throws below Exception.

Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.jms.client.JBossConnectionFactory (no security manager: RMI class loader disabled)

Exception Trace:

javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.jms.client.JBossConnectionFactory (no security manager: RMI class loader disabled)]
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:182)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
    at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:188)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:510)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl$ExceptionListenerRunnable.run(JMSContainerInvoker.java:1419)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.jms.client.JBossConnectionFactory (no security manager: RMI class loader disabled)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:375)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
    at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
    at org.jboss.system.JBossRMIClassLoader.loadClass(JBossRMIClassLoader.java:91)
    at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
    at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
    at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)
    ... 8 more

I found below link which seems similar to the issue that i am facing but not able to get exactly on from which server to which server i need to have client libraries under war file?. https://access.redhat.com/solutions/45133

More Details:-

In my Case, jboss 4.0.4 and jboss 5.1.0 both are hosting the messages for different queues. -- jboss 5 is hosting the message and listener is on jboss4 for QueueA. -- jboss 4 is hosting the message and listener is on jboss 5 for QueueB.

What we want to achieve:- Jboss 4 on server A should communicate with RemoteQueues which are configured on jboss 5 on server B, which is not working and throwing above Exception. Communication is not happening between both servers.

1

There are 1 best solutions below

3
On

The bottom line here is that JBoss 4.x uses JBossMQ as the JMS implementation and JBoss 5.x uses JBoss Messaging as the JMS implementation. The two are not directly compatible therefore you need to decide which server will host the messages.

If you want the JBoss 5 server to host the messages then all the clients (including those running on JBoss 4) will need to use JBoss Messaging client libraries.

If you want the JBoss 4 server to host the messages then all the clients (including those running on JBoss 5) will need to use JBossMQ client libraries.

If you're hosting messages on both JBoss 4 & JBoss 5 servers then the clients for each will need to use the corresponding client libraries for whichever broker their working with.