Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-244

NPE in org/apache/qpid/proton/jms/InboundTransformer when connecting qpid-client to qpid-proton in ActiveMQ

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-0.3
    • None
    • proton-j

    Description

      Connecting a ConnectionFactory from qpid-amqp-1-0-client-jms version 0.20 to ActiveMQ 5.8.0, yields NPE:

      org.apache.activemq.transport.amqp.AmqpProtocolException: Could not process AMQP commands
      at org.apache.activemq.transport.amqp.AmqpProtocolConverter.onFrame(AmqpProtocolConverter.java:245)
      at org.apache.activemq.transport.amqp.AmqpProtocolConverter.onAMQPData(AmqpProtocolConverter.java:151)
      at org.apache.activemq.transport.amqp.AmqpTransportFilter.onCommand(AmqpTransportFilter.java:94)
      at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
      at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
      at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.NullPointerException
      at org.apache.qpid.proton.jms.InboundTransformer.populateMessage(InboundTransformer.java:146)
      at org.apache.qpid.proton.jms.AMQPNativeInboundTransformer.transform(AMQPNativeInboundTransformer.java:37)
      at org.apache.activemq.transport.amqp.AmqpProtocolConverter$ProducerContext.onMessage(AmqpProtocolConverter.java:454)
      at org.apache.activemq.transport.amqp.AmqpProtocolConverter$BaseProducerContext.onDelivery(AmqpProtocolConverter.java:435)
      at org.apache.activemq.transport.amqp.AmqpProtocolConverter.onFrame(AmqpProtocolConverter.java:215)
      ... 6 more

      Looking at https://github.com/apache/qpid-proton/blob/trunk/proton-j/contrib/proton-jms/src/main/java/org/apache/qpid/proton/jms/InboundTransformer.java#L146

      It would seems that qpid-amqp-1-0-client-jms sends a message with header "x-opt-jms-type" with value NULL.

      This might very well be an invalid combination of client/broker setup – however, the proton-jms code could possibly benefit from utilizing String.valueOf(..) instead of getValue().toString() (or similar)

      Attachments

        1. PROTON-244.logexcerpt.txt
          9 kB
          Jan-Helge Bergesen

        Activity

          People

            chirino Hiram R. Chirino
            jhberges Jan-Helge Bergesen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: