0 Replies Latest reply on Jul 23, 2006 7:19 PM by kjc5664

    Serious JBoss MQ Issue

    kjc5664

      The following code worked in JBoss 3.2.7
      Which now fails using JBoss 4.0.3SP1,JDK1.5,LinuxOS(Intel).

      
      
      
      (Client)
      Properties properties = new Properties();
       properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
       properties.put(Context.PROVIDER_URL, "localhost:1099");
      
       InitialContext iniCtx = new InitialContext(properties);
       Object tmp = iniCtx.lookup("ConnectionFactory");
       QueueConnectionFactory connFactory = (QueueConnectionFactory) tmp;
       logger.info("obtained the queue connection factory..");
       QueueConnection conn = connFactory.createQueueConnection();
       Queue que = (Queue) iniCtx.lookup(Const.TEST_QUEUE);
       logger.info("obtained the queue");
      
       QueueSession session = conn.createQueueSession(false,QueueSession.AUTO_ACKNOWLEDGE);
       QueueSender sender = session.createSender(que);
       long fileSz = f.length();
       BufferedReader reader = new BufferedReader(new FileReader(f));
       char[] buf = new char[(int)fileSz];
       reader.read(buf);
      
      
       String data = new String(buf);
       MyMessage msg = null;
       msg = parser.parse(data);
      
       ObjectMessage objMessage = session.createObjectMessage();
      
       objMessage.setObject(msg);
       sender.send(que,objMessage);
      
      

      (Server)[\b]

      On the server side. I receive the following exception.

      javax.jms.MessageFormatException: ClassNotFoundException: Invalid use of destroyed classloader, UCL destroyed at:
      16:46:35,050 INFO [STDOUT] at org.jboss.mq.SpyObjectMessage.getObject(SpyObjectMessage.java:136

      I traced the exception to this line of code in the RepositoryClassLoader
       if( repository == null )
       {
       String msg = "Invalid use of destroyed classloader, UCL destroyed at:";
       throw new ClassNotFoundException(msg, this.unregisterTrace);
       }
      

      Line: 431-435

      Can someone please tell me. What the heck is going on. Or. If JBAS version
      4.0.4 fixes this problem.

      Thanks in advance.