[jboss-user] [Messaging, JMS & JBossMQ] - classloader problem

randiz do-not-reply at jboss.com
Thu Jun 5 15:49:18 EDT 2008


hi

I am trying to call a method in a session bean deployed on server (call it server1 ver: jboss 4.2.2 GA) that processes some data and then pushes the data on a queue existing on a external jboss server( call it server 2 ver : jbossesb-server-4.2.1GA ). the session bean is unable to push the data on queue on server 2 ( the know the queue on server2 exists )

I get the following error :

ERROR javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.jms.destination.JBossQueue (no security manager: RMI class loader disabled)]

the code for reference is simple refer below :

properties.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
properties.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
properties.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");
/* note both server 1 and server2 reside on same host but have toally different ports so the above is correct */
context = new InitialContext(properties1);
queue = (Queue) context.lookup("queue/JMS_action_Request");
QueueConnectionFactory tcf = (QueueConnectionFactory)context.lookup("ConnectionFactory");
queueConnection = tcf.createQueueConnection();
queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueSender queueSender =queueSession.createSender(queue);
queueConnection.start();
queueSender.send(queueSession.createTextMessage(msg));
queueSession.commit();
queueConnection.close();

any clues to the problem and how to handle this problem

thanks
randiz

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

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



More information about the jboss-user mailing list