Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6001

Prevent NPE when publishing using ADDR destination to Broker using AMQP 0-9-1 or lower

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.16, 0.18, 0.20, 0.22, 0.24, 0.26, 0.28
    • Fix Version/s: 0.30
    • Component/s: JMS AMQP 0-x
    • Labels:
      None

      Description

      If I try an run the Hello example (from qpid-client-examples) against a Java Broker configured to use AMQP 0-9-1 or lower, or Rabbit MQ, I receive the following NPE:

      java.lang.NullPointerException
      	at org.apache.qpid.client.BasicMessageProducer_0_8.declareDestination(BasicMessageProducer_0_8.java:63)
      	at org.apache.qpid.client.BasicMessageProducer.<init>(BasicMessageProducer.java:136)
      	at org.apache.qpid.client.BasicMessageProducer_0_8.<init>(BasicMessageProducer_0_8.java:55)
      	at org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.java:559)
      	at org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.java:62)
      	at org.apache.qpid.client.AMQSession$7.execute(AMQSession.java:2613)
      	at org.apache.qpid.client.AMQSession$7.execute(AMQSession.java:2604)
      	at org.apache.qpid.client.AMQConnectionDelegate_8_0.executeRetrySupport(AMQConnectionDelegate_8_0.java:333)
      	at org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:625)
      	at org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:96)
      	at org.apache.qpid.client.AMQSession.createProducerImpl(AMQSession.java:2602)
      	at org.apache.qpid.client.AMQSession.createProducer(AMQSession.java:1175)
      	at org.apache.qpid.client.AMQSession.createProducer(AMQSession.java:93)
      	at org.apache.qpid.example.Hello.runTest(Hello.java:66)
      	at org.apache.qpid.example.Hello.main(Hello.java:48)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
      
      

      This error was reported on users@q.a.o sometime ago.

      http://qpid.2158936.n2.nabble.com/Java-example-Hello-java-throws-NPE-td7581155.html

        Attachments

          Activity

            People

            • Assignee:
              kwall Keith Wall
              Reporter:
              kwall Keith Wall
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: