Keith Wall created QPID-6001:
--------------------------------

             Summary: Prevent NPE when publishing using ADDR destination to 
Broker using AMQP 0-9-1 or lower 
                 Key: QPID-6001
                 URL: https://issues.apache.org/jira/browse/QPID-6001
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
            Reporter: Keith Wall
            Assignee: Keith Wall
             Fix For: 0.31


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:

{noformat}
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)

{noformat}

This error was reported on [email protected] sometime ago.

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




--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to