[ 
https://issues.apache.org/jira/browse/QPID-6234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14222894#comment-14222894
 ] 

Keith Wall commented on QPID-6234:
----------------------------------

The AMQP 0-10 spec is inconsistent in that message.subscribe states that the 
destination is optional but yet message.cancel is required.  Java Broker should 
be changed to reject the absence of a destination argument to avoid the 
possibility of the NPE later.  In additional the test 
test_declare_exclusive_alreadyinuse should be changed to pass a destination as 
this is not material to the test itself.




> (0-10) Absence of destination argument to the message.subscribe command 
> causes Java Broker to NPE
> -------------------------------------------------------------------------------------------------
>
>                 Key: QPID-6234
>                 URL: https://issues.apache.org/jira/browse/QPID-6234
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.31
>            Reporter: Keith Wall
>
> If I pass a message.subscribe command to the Java Broker but omit the 
> optional destination flag, the test fails and the Java Broker exits due to 
> the following NPE.
> It appears the code assumes destination will never be absent.
> The easiest way to reproduce the issue is to run Python test (which is 
> excluded in the Java010PythonExcludes file)
> qpid_tests.broker_0_10.queue.QueueTests.test_declare_exclusive_alreadyinuse
> Exception is:
> {noformat}
> ########################################################################
> #
> # Unhandled Exception java.lang.NullPointerException in Thread IoReceiver - 
> /0:0:0:0:0:0:0:1:49316
> #
> # Exiting
> #
> ########################################################################
> java.lang.NullPointerException
>       at 
> java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
>       at 
> java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1175)
>       at 
> org.apache.qpid.server.protocol.v0_10.ServerSession.unregister(ServerSession.java:556)
>       at 
> org.apache.qpid.server.protocol.v0_10.ServerSession.unregisterSubscriptions(ServerSession.java:940)
>       at 
> org.apache.qpid.server.protocol.v0_10.ServerConnection.closeSubscriptions(ServerConnection.java:542)
>       at 
> org.apache.qpid.server.protocol.v0_10.ServerConnection.closed(ServerConnection.java:534)
>       at 
> org.apache.qpid.transport.network.Assembler.closed(Assembler.java:112)
>       at 
> org.apache.qpid.transport.network.InputHandler.closed(InputHandler.java:214)
>       at 
> org.apache.qpid.server.protocol.v0_10.ProtocolEngine_0_10.closed(ProtocolEngine_0_10.java:231)
>       at 
> org.apache.qpid.server.protocol.MultiVersionProtocolEngine.closed(MultiVersionProtocolEngine.java:129)
>       at 
> org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:222)
>       at java.lang.Thread.run(Thread.java:744)
> Process finished with exit code 1
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to