1 Reply Latest reply on May 13, 2004 7:06 PM by Elias Ross

    Exception Attempting to Produce Message on JBossMQ topic fro

    Lyndon Livingstone Newbie

      Hi,

      I am trying to use the WebLogic JMS bridge to send a message to a topic running on a JBossMQ server. You can think of the JMS Bridge as a program that consumes from one destination and produces on another regardless of the JMS implementation on either side. Anyways, here is the exception which occurs on the WebLogic 8.1 SP2 Server.

      java.lang.NullPointerException
      at org.jboss.mq.SpyMessage.setJMSCorrelationIDAsBytes(SpyMessage.java:183)
      at org.jboss.mq.SpyEncapsulatedMessage.setMessage(SpyEncapsulatedMessage.java:30)
      at org.jboss.mq.SpyTopicPublisher.internalPublish(SpyTopicPublisher.java:115)
      at org.jboss.mq.SpyTopicPublisher.publish(SpyTopicPublisher.java:68)
      at weblogic.jms.adapter.JMSBaseConnection.sendInternal(JMSBaseConnection.java:704)
      at weblogic.jms.adapter.JMSBaseConnection.access$200(JMSBaseConnection.java:80)
      at weblogic.jms.adapter.JMSBaseConnection$6.run(JMSBaseConnection.java:645)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
      at weblogic.jms.adapter.JMSBaseConnection.send(JMSBaseConnection.java:642)
      at weblogic.jms.adapter.JMSConnectionHandle.send(JMSConnectionHandle.java:140)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at weblogic.connector.common.internal.ConnectionWrapper.invoke(ConnectionWrapper.java:149)
      at $Proxy8.send(Unknown Source)
      at weblogic.jms.bridge.internal.MessagingBridge.processMessages(MessagingBridge.java:1362)
      at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:927)
      at weblogic.jms.bridge.internal.MessagingBridge.execute(MessagingBridge.java:1005)
      at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
      at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

      Any insight into the org.jboss.mq part of this stack trace would be greatly appreciated.

      Thanks,

      Lyndon.

        • 1. Re: Exception Attempting to Produce Message on JBossMQ topic
          Elias Ross Master


          You can view the code through CVS or download it.

          What's happening, is JBoss is trying to copy/clone the correlation ID from the Weblogic JMS message and failing. As a work around, you can set this field as part of the bridge to something like an empty array. I will try to post a fix to CVS, here is the code:

          src/main/org/jboss/mq/SpyEncapsulatedMessage.java
          public void setMessage(Message m) throws JMSException
          {
          this.setObject((Serializable) m);

          setJMSCorrelationID(m.getJMSCorrelationID());
          setJMSCorrelationIDAsBytes(m.getJMSCorrelationIDAsBytes());

          src/main/org/jboss/mq/SpyMessage.java
          public void setJMSCorrelationIDAsBytes(byte[] correlationID) throws JMSException
          {
          header.jmsCorrelationID = false;
          header.jmsCorrelationIDbyte = (byte[]) correlationID.clone();
          header.jmsCorrelationIDString = null;
          }