1 Reply Latest reply on Jun 27, 2008 10:54 AM by Adrian Brock

    classloader problem

    randip singh Newbie

      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