You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Gordon Sim (Created) (JIRA)" <ji...@apache.org> on 2011/12/13 12:55:31 UTC

[jira] [Created] (QPID-3677) Asserting does not work correctly from JMS

Asserting does not work correctly from JMS
------------------------------------------

                 Key: QPID-3677
                 URL: https://issues.apache.org/jira/browse/QPID-3677
             Project: Qpid
          Issue Type: Bug
          Components: Java Client
    Affects Versions: 0.14
            Reporter: Gordon Sim


When there is an exchange named abc, the following address should result in an error being raised:

  'abc; {assert: always, node: {type: queue}}'

There is indeed an error raised, but the message is incorrect:

  org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue

More importantly however, changing the node type to topic should result in the resolution and checking passing without error. This is not the case however. Using:

  'abc; {assert: always, node: {type: topic}}'

we get exactly the same error.

Attempting to assert on the exchange type (assuming abc is of type topic):

  'abc; {assert: always, node: {type: topic, x-declare:{type:fanout}}}' 

should result in an error due to mismatched expectations on exchange type. However we get the same incorrect exception as above, i.e:

  org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue

And again, if we change the address so that it should pass:

 'abc; {assert: always, node: {type: topic, x-declare:{type:topic}}}'

we then get:

Exception in thread "main" java.lang.NullPointerException
	at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:626)
	at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:83)
	at org.apache.qpid.client.AMQSession.consumeFromQueue(AMQSession.java:2592)
	at org.apache.qpid.client.AMQSession.registerConsumer(AMQSession.java:2928)
	at org.apache.qpid.client.AMQSession.access$500(AMQSession.java:120)
	at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2048)
	at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2006)
	at org.apache.qpid.client.AMQConnectionDelegate_0_10.executeRetrySupport(AMQConnectionDelegate_0_10.java:346)
	at org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:574)
	at org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102)
	at org.apache.qpid.client.AMQSession.createConsumerImpl(AMQSession.java:2004)
	at org.apache.qpid.client.AMQSession.createConsumer(AMQSession.java:979)
	at org.apache.qpid.example.Drain.<init>(Drain.java:70)
	at org.apache.qpid.example.Drain.main(Drain.java:103)



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3677) Asserting does not work correctly from JMS

Posted by "Michael Chrostowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427074#comment-13427074 ] 

Michael Chrostowski commented on QPID-3677:
-------------------------------------------

Due to the exception Rob posted above I cannot consume on any topic defined by an address in Java. I'm still trying to find a work around that doesn't involve editing Qpid code, maybe bindURL based constructor will let it work. 

Basically queueName is not being set in the Destination and the createConsumer() call requires it, thus the NPE. 
                
> Asserting does not work correctly from JMS
> ------------------------------------------
>
>                 Key: QPID-3677
>                 URL: https://issues.apache.org/jira/browse/QPID-3677
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.14
>            Reporter: Gordon Sim
>              Labels: addressing
>
> When there is an exchange named abc, the following address should result in an error being raised:
>   'abc; {assert: always, node: {type: queue}}'
> There is indeed an error raised, but the message is incorrect:
>   org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue
> More importantly however, changing the node type to topic should result in the resolution and checking passing without error. This is not the case however. Using:
>   'abc; {assert: always, node: {type: topic}}'
> we get exactly the same error.
> Attempting to assert on the exchange type (assuming abc is of type topic):
>   'abc; {assert: always, node: {type: topic, x-declare:{type:fanout}}}' 
> should result in an error due to mismatched expectations on exchange type. However we get the same incorrect exception as above, i.e:
>   org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue
> And again, if we change the address so that it should pass:
>  'abc; {assert: always, node: {type: topic, x-declare:{type:topic}}}'
> we then get:
> Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:626)
> 	at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:83)
> 	at org.apache.qpid.client.AMQSession.consumeFromQueue(AMQSession.java:2592)
> 	at org.apache.qpid.client.AMQSession.registerConsumer(AMQSession.java:2928)
> 	at org.apache.qpid.client.AMQSession.access$500(AMQSession.java:120)
> 	at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2048)
> 	at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2006)
> 	at org.apache.qpid.client.AMQConnectionDelegate_0_10.executeRetrySupport(AMQConnectionDelegate_0_10.java:346)
> 	at org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:574)
> 	at org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102)
> 	at org.apache.qpid.client.AMQSession.createConsumerImpl(AMQSession.java:2004)
> 	at org.apache.qpid.client.AMQSession.createConsumer(AMQSession.java:979)
> 	at org.apache.qpid.example.Drain.<init>(Drain.java:70)
> 	at org.apache.qpid.example.Drain.main(Drain.java:103)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3677) Asserting does not work correctly from JMS

Posted by "Gordon Sim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427186#comment-13427186 ] 

Gordon Sim commented on QPID-3677:
----------------------------------

Does your address have an assertion in it? Does it need to? (Are you sure this is the right JIRA?)
                
> Asserting does not work correctly from JMS
> ------------------------------------------
>
>                 Key: QPID-3677
>                 URL: https://issues.apache.org/jira/browse/QPID-3677
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.14
>            Reporter: Gordon Sim
>              Labels: addressing
>
> When there is an exchange named abc, the following address should result in an error being raised:
>   'abc; {assert: always, node: {type: queue}}'
> There is indeed an error raised, but the message is incorrect:
>   org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue
> More importantly however, changing the node type to topic should result in the resolution and checking passing without error. This is not the case however. Using:
>   'abc; {assert: always, node: {type: topic}}'
> we get exactly the same error.
> Attempting to assert on the exchange type (assuming abc is of type topic):
>   'abc; {assert: always, node: {type: topic, x-declare:{type:fanout}}}' 
> should result in an error due to mismatched expectations on exchange type. However we get the same incorrect exception as above, i.e:
>   org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue
> And again, if we change the address so that it should pass:
>  'abc; {assert: always, node: {type: topic, x-declare:{type:topic}}}'
> we then get:
> Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:626)
> 	at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:83)
> 	at org.apache.qpid.client.AMQSession.consumeFromQueue(AMQSession.java:2592)
> 	at org.apache.qpid.client.AMQSession.registerConsumer(AMQSession.java:2928)
> 	at org.apache.qpid.client.AMQSession.access$500(AMQSession.java:120)
> 	at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2048)
> 	at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2006)
> 	at org.apache.qpid.client.AMQConnectionDelegate_0_10.executeRetrySupport(AMQConnectionDelegate_0_10.java:346)
> 	at org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:574)
> 	at org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102)
> 	at org.apache.qpid.client.AMQSession.createConsumerImpl(AMQSession.java:2004)
> 	at org.apache.qpid.client.AMQSession.createConsumer(AMQSession.java:979)
> 	at org.apache.qpid.example.Drain.<init>(Drain.java:70)
> 	at org.apache.qpid.example.Drain.main(Drain.java:103)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3677) Asserting does not work correctly from JMS

Posted by "Michael Chrostowski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427578#comment-13427578 ] 

Michael Chrostowski commented on QPID-3677:
-------------------------------------------

Gordon, I think you're right and this isn't quite the issue I'm seeing. My misunderstanding. 

Though the stack trace matches mine and AMQSession_0_10.java:626 NPE in my case involves an empty queueName, was hoping it was the same issue as I do use assertions. I removed/added/changed them around and everything seems to be working. 

I'm not sure what the cause of my issue was, as it seems to be gone with no change on my part. 
                
> Asserting does not work correctly from JMS
> ------------------------------------------
>
>                 Key: QPID-3677
>                 URL: https://issues.apache.org/jira/browse/QPID-3677
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.14
>            Reporter: Gordon Sim
>              Labels: addressing
>
> When there is an exchange named abc, the following address should result in an error being raised:
>   'abc; {assert: always, node: {type: queue}}'
> There is indeed an error raised, but the message is incorrect:
>   org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue
> More importantly however, changing the node type to topic should result in the resolution and checking passing without error. This is not the case however. Using:
>   'abc; {assert: always, node: {type: topic}}'
> we get exactly the same error.
> Attempting to assert on the exchange type (assuming abc is of type topic):
>   'abc; {assert: always, node: {type: topic, x-declare:{type:fanout}}}' 
> should result in an error due to mismatched expectations on exchange type. However we get the same incorrect exception as above, i.e:
>   org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue
> And again, if we change the address so that it should pass:
>  'abc; {assert: always, node: {type: topic, x-declare:{type:topic}}}'
> we then get:
> Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:626)
> 	at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:83)
> 	at org.apache.qpid.client.AMQSession.consumeFromQueue(AMQSession.java:2592)
> 	at org.apache.qpid.client.AMQSession.registerConsumer(AMQSession.java:2928)
> 	at org.apache.qpid.client.AMQSession.access$500(AMQSession.java:120)
> 	at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2048)
> 	at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2006)
> 	at org.apache.qpid.client.AMQConnectionDelegate_0_10.executeRetrySupport(AMQConnectionDelegate_0_10.java:346)
> 	at org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:574)
> 	at org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102)
> 	at org.apache.qpid.client.AMQSession.createConsumerImpl(AMQSession.java:2004)
> 	at org.apache.qpid.client.AMQSession.createConsumer(AMQSession.java:979)
> 	at org.apache.qpid.example.Drain.<init>(Drain.java:70)
> 	at org.apache.qpid.example.Drain.main(Drain.java:103)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3677) Asserting does not work correctly from JMS

Posted by "Gordon Sim (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427975#comment-13427975 ] 

Gordon Sim commented on QPID-3677:
----------------------------------

If you see it again, please feel free to provide details. This bug is still open (I'll see if I can chase someone to look at it). But the workaround is simple (though annoying); simply drop the assertions(!).
                
> Asserting does not work correctly from JMS
> ------------------------------------------
>
>                 Key: QPID-3677
>                 URL: https://issues.apache.org/jira/browse/QPID-3677
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.14
>            Reporter: Gordon Sim
>              Labels: addressing
>
> When there is an exchange named abc, the following address should result in an error being raised:
>   'abc; {assert: always, node: {type: queue}}'
> There is indeed an error raised, but the message is incorrect:
>   org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue
> More importantly however, changing the node type to topic should result in the resolution and checking passing without error. This is not the case however. Using:
>   'abc; {assert: always, node: {type: topic}}'
> we get exactly the same error.
> Attempting to assert on the exchange type (assuming abc is of type topic):
>   'abc; {assert: always, node: {type: topic, x-declare:{type:fanout}}}' 
> should result in an error due to mismatched expectations on exchange type. However we get the same incorrect exception as above, i.e:
>   org.apache.qpid.AMQException: The name 'abc' supplied in the address doesn't resolve to an exchange or a queue
> And again, if we change the address so that it should pass:
>  'abc; {assert: always, node: {type: topic, x-declare:{type:topic}}}'
> we then get:
> Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:626)
> 	at org.apache.qpid.client.AMQSession_0_10.sendConsume(AMQSession_0_10.java:83)
> 	at org.apache.qpid.client.AMQSession.consumeFromQueue(AMQSession.java:2592)
> 	at org.apache.qpid.client.AMQSession.registerConsumer(AMQSession.java:2928)
> 	at org.apache.qpid.client.AMQSession.access$500(AMQSession.java:120)
> 	at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2048)
> 	at org.apache.qpid.client.AMQSession$4.execute(AMQSession.java:2006)
> 	at org.apache.qpid.client.AMQConnectionDelegate_0_10.executeRetrySupport(AMQConnectionDelegate_0_10.java:346)
> 	at org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:574)
> 	at org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102)
> 	at org.apache.qpid.client.AMQSession.createConsumerImpl(AMQSession.java:2004)
> 	at org.apache.qpid.client.AMQSession.createConsumer(AMQSession.java:979)
> 	at org.apache.qpid.example.Drain.<init>(Drain.java:70)
> 	at org.apache.qpid.example.Drain.main(Drain.java:103)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org