You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Simon Gmail <si...@gmail.com> on 2016/06/13 09:46:37 UTC
Qpid 0.32 Java Client Issue
I have an issue which I have described here
http://stackoverflow.com/questions/37778136/opennms-v18-amqp-message-sending
-issue
In summary:-
1) OpenNMS is using QPID 0.32 Java Client to talk into a 3.5.7 Rabbit
MQ Server from within an Apache Karaf bundle using a camel blueprint
2) Sending a message to an exchange with a bound queue on the backend.
3) It is failing with a null pointer exception
java.lang.NullPointerException
at
org.apache.qpid.client.BasicMessageProducer_0_8.declareDestination(BasicMess
ageProducer_0_8.java:63)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
at
org.apache.qpid.client.BasicMessageProducer.<init>(BasicMessageProducer.java
:136)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
at
org.apache.qpid.client.BasicMessageProducer_0_8.<init>(BasicMessageProducer_
0_8.java:55)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
at
org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.j
ava:559)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
at
org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.j
ava:62)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
4) I can get this working from outside of Karaf using the same client
version (0.32) and address string which validates both the connection
parameters, the address string and the function of the rabbit mq server.
5) If I trace this out within qpid it seems to get a connection but not
transmit any data
2016-06-12 19:00:38,728 DEBUG
org.apache.servicemix.bundles.qpid:0.28.0.1(212) [IoReceiver -
localhost/127.0.0.1:5672]
org.apache.qpid.client.protocol.AMQProtocolHandler: (1404676419)Method frame
received: [ChannelOpenOkBodyImpl: channelId=null]
2016-06-12 19:00:38,728 DEBUG
org.apache.servicemix.bundles.qpid:0.28.0.1(212) [IoReceiver -
localhost/127.0.0.1:5672]
org.apache.qpid.client.protocol.AMQProtocolHandler: (1404676419)Method frame
received: [BasicQosOkBodyImpl: ]
2016-06-12 19:00:38,731 DEBUG
org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
(amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
org.apache.qpid.client.AMQDestination: Based on
onms3/Simon;{'create':'always','node':{'type':'topic'} } the selected
destination syntax is ADDR
2016-06-12 19:00:38,731 DEBUG
org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
(amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
org.apache.qpid.client.AMQSession: Closing session:
org.apache.qpid.client.AMQSession_0_8@179483f0
2016-06-12 19:00:38,731 DEBUG
org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
(amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
org.apache.qpid.client.protocol.AMQProtocolSession: closeSession called on
protocol session for session 1
6) When I try this from the command line client when it works it looks like
this
142 [main] DEBUG org.apache.qpid.client.AMQConnection - Are we
connected:true
142 [main] DEBUG org.apache.qpid.client.AMQConnection - Connected with
ProtocolHandler Version:0-91
146 [main] DEBUG org.apache.qpid.client.AMQConnectionDelegate_8_0 - Write
channel open frame for channel id 1
162 [main] DEBUG org.apache.qpid.client.AMQSession - Created
session:org.apache.qpid.client.AMQSession_0_8@6bdf28bb
164 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ChannelOpenOkBody]
165 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [BasicQosOkBodyImpl: ]
173 [main] DEBUG org.apache.qpid.client.AMQDestination - Based on
onms3/Simon;{create: always, node:{type: topic } } the selected destination
syntax is ADDR
177 [main] DEBUG org.apache.qpid.framing.FieldTable -
FieldTable::writeToBuffer: Writing encoded length of 0...
178 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ExchangeDeclareOkBodyImpl: ]
179 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ExchangeDeclareOkBodyImpl: ]
179 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ExchangeDeclareOkBodyImpl: ]
180 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 -
MessageProducer org.apache.qpid.client.BasicMessageProducer_0_8@1936f0f5
using publish mode : ASYNC_PUBLISH_ALL
190 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 - Sending
content body frames to 'onms3'/'Simon'; {
'create': 'always',
'node': {
'type': 'topic'
}
}
190 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 - Sending
content header frame to 'onms3'/'Simon'; {
'create': 'always',
'node': {
'type': 'topic'
}
}
190 [main] DEBUG org.apache.qpid.framing.FieldTable -
FieldTable::writeToBuffer: Writing encoded length of 90...
191 [main] DEBUG org.apache.qpid.framing.FieldTable - {Id=[INT:
987654321], name=[LONG_STRING: WidgetSimon], price=[DOUBLE: 0.99],
qpid.subject=[LONG_STRING: Simon], JMS_QPID_DESTTYPE=[INT: 2]}
192 [main] DEBUG org.apache.qpid.client.AMQSession - Closing session:
org.apache.qpid.client.AMQSession_0_8@6bdf28bb
192 [main] DEBUG org.apache.qpid.client.protocol.AMQProtocolSession -
closeSession called on protocol session for session 1
194 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ChannelCloseOkBody]
194 [IoReceiver - localhost/127.0.0.1:5672] INFO
org.apache.qpid.client.handler.ChannelCloseOkMethodHandler - Received
channel-close-ok for channel-id 1
195 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ConnectionCloseOkBody]
Can you suggest what the issue might be?
Re: Qpid 0.32 Java Client Issue
Posted by Simon Taylor <si...@gmail.com>.
Will investigate whether that’s a possibility.
Thanks for your help.
Simon
From: Rob Godfrey <ro...@gmail.com>
Date: Monday, 13 June 2016 at 11:09
To: "users@qpid.apache.org" <us...@qpid.apache.org>
Cc: Simon Taylor <si...@gmail.com>
Subject: Re: Qpid 0.32 Java Client Issue
As Lorenz notes - it looks like you are using the 0.28 version of the client, rather than the 0.32 version... I looked at the stack trace and confirmed that the line numbers don't match up with the 0.32 source, but do with 0.28.
0.28 was released just over 2 years ago, and an awful lot has changed in the meantime... including much enhanced support for RabbitMQ (RabbitMQ and Qpid have different quirks in their implementation of AMQP 0-9-1). Is it possible for you to upgrade to a more recent client library?
-- Rob
On 13 June 2016 at 11:02, Lorenz Quack <qu...@gmail.com> wrote:
Hello Simon,
I'm sorry I am not familiar with most of the components you mention in your report.
But I did noticed that in the stacktrace you see this:
org.apache.servicemix.bundles.qpid:0.28.0.1
That made me think maybe servicemix is bundling version 0.28 of the Qpid Java client libraries.
Usually "bad things" happen when mixing libraries from different versions.
Kind Regards,
Lorenz
On 13/06/16 10:46, Simon Gmail wrote:
I have an issue which I have described here
http://stackoverflow.com/questions/37778136/opennms-v18-amqp-message-sending
-issue
In summary:-
1) OpenNMS is using QPID 0.32 Java Client to talk into a 3.5.7 Rabbit
MQ Server from within an Apache Karaf bundle using a camel blueprint
2) Sending a message to an exchange with a bound queue on the backend.
3) It is failing with a null pointer exception
java.lang.NullPointerException
at
org.apache.qpid.client.BasicMessageProducer_0_8.declareDestination(BasicMess
ageProducer_0_8.java:63)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
at
org.apache.qpid.client.BasicMessageProducer.<init>(BasicMessageProducer.java
:136)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
at
org.apache.qpid.client.BasicMessageProducer_0_8.<init>(BasicMessageProducer_
0_8.java:55)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
at
org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.j
ava:559)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
at
org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.j
ava:62)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
4) I can get this working from outside of Karaf using the same client
version (0.32) and address string which validates both the connection
parameters, the address string and the function of the rabbit mq server.
5) If I trace this out within qpid it seems to get a connection but not
transmit any data
2016-06-12 19:00:38,728 DEBUG
org.apache.servicemix.bundles.qpid:0.28.0.1(212) [IoReceiver -
localhost/127.0.0.1:5672]
org.apache.qpid.client.protocol.AMQProtocolHandler: (1404676419)Method frame
received: [ChannelOpenOkBodyImpl: channelId=null]
2016-06-12 19:00:38,728 DEBUG
org.apache.servicemix.bundles.qpid:0.28.0.1(212) [IoReceiver -
localhost/127.0.0.1:5672]
org.apache.qpid.client.protocol.AMQProtocolHandler: (1404676419)Method frame
received: [BasicQosOkBodyImpl: ]
2016-06-12 19:00:38,731 DEBUG
org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
(amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
org.apache.qpid.client.AMQDestination: Based on
onms3/Simon;{'create':'always','node':{'type':'topic'} } the selected
destination syntax is ADDR
2016-06-12 19:00:38,731 DEBUG
org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
(amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
org.apache.qpid.client.AMQSession: Closing session:
org.apache.qpid.client.AMQSession_0_8@179483f0
2016-06-12 19:00:38,731 DEBUG
org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
(amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
org.apache.qpid.client.protocol.AMQProtocolSession: closeSession called on
protocol session for session 1
6) When I try this from the command line client when it works it looks like
this
142 [main] DEBUG org.apache.qpid.client.AMQConnection - Are we
connected:true
142 [main] DEBUG org.apache.qpid.client.AMQConnection - Connected with
ProtocolHandler Version:0-91
146 [main] DEBUG org.apache.qpid.client.AMQConnectionDelegate_8_0 - Write
channel open frame for channel id 1
162 [main] DEBUG org.apache.qpid.client.AMQSession - Created
session:org.apache.qpid.client.AMQSession_0_8@6bdf28bb
164 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ChannelOpenOkBody]
165 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [BasicQosOkBodyImpl: ]
173 [main] DEBUG org.apache.qpid.client.AMQDestination - Based on
onms3/Simon;{create: always, node:{type: topic } } the selected destination
syntax is ADDR
177 [main] DEBUG org.apache.qpid.framing.FieldTable -
FieldTable::writeToBuffer: Writing encoded length of 0...
178 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ExchangeDeclareOkBodyImpl: ]
179 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ExchangeDeclareOkBodyImpl: ]
179 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ExchangeDeclareOkBodyImpl: ]
180 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 -
MessageProducer org.apache.qpid.client.BasicMessageProducer_0_8@1936f0f5
using publish mode : ASYNC_PUBLISH_ALL
190 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 - Sending
content body frames to 'onms3'/'Simon'; {
'create': 'always',
'node': {
'type': 'topic'
}
}
190 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 - Sending
content header frame to 'onms3'/'Simon'; {
'create': 'always',
'node': {
'type': 'topic'
}
}
190 [main] DEBUG org.apache.qpid.framing.FieldTable -
FieldTable::writeToBuffer: Writing encoded length of 90...
191 [main] DEBUG org.apache.qpid.framing.FieldTable - {Id=[INT:
987654321], name=[LONG_STRING: WidgetSimon], price=[DOUBLE: 0.99],
qpid.subject=[LONG_STRING: Simon], JMS_QPID_DESTTYPE=[INT: 2]}
192 [main] DEBUG org.apache.qpid.client.AMQSession - Closing session:
org.apache.qpid.client.AMQSession_0_8@6bdf28bb
192 [main] DEBUG org.apache.qpid.client.protocol.AMQProtocolSession -
closeSession called on protocol session for session 1
194 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ChannelCloseOkBody]
194 [IoReceiver - localhost/127.0.0.1:5672] INFO
org.apache.qpid.client.handler.ChannelCloseOkMethodHandler - Received
channel-close-ok for channel-id 1
195 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
frame received: [ConnectionCloseOkBody]
Can you suggest what the issue might be?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Qpid 0.32 Java Client Issue
Posted by Rob Godfrey <ro...@gmail.com>.
As Lorenz notes - it looks like you are using the 0.28 version of the
client, rather than the 0.32 version... I looked at the stack trace and
confirmed that the line numbers don't match up with the 0.32 source, but do
with 0.28.
0.28 was released just over 2 years ago, and an awful lot has changed in
the meantime... including much enhanced support for RabbitMQ (RabbitMQ and
Qpid have different quirks in their implementation of AMQP 0-9-1). Is it
possible for you to upgrade to a more recent client library?
-- Rob
On 13 June 2016 at 11:02, Lorenz Quack <qu...@gmail.com> wrote:
> Hello Simon,
>
> I'm sorry I am not familiar with most of the components you mention in
> your report.
> But I did noticed that in the stacktrace you see this:
>
> org.apache.servicemix.bundles.qpid:0.28.0.1
>
>
> That made me think maybe servicemix is bundling version 0.28 of the Qpid
> Java client libraries.
> Usually "bad things" happen when mixing libraries from different versions.
>
>
> Kind Regards,
> Lorenz
>
>
>
> On 13/06/16 10:46, Simon Gmail wrote:
>
>> I have an issue which I have described here
>>
>> http://stackoverflow.com/questions/37778136/opennms-v18-amqp-message-sending
>> -issue
>>
>>
>> In summary:-
>>
>>
>> 1) OpenNMS is using QPID 0.32 Java Client to talk into a 3.5.7 Rabbit
>> MQ Server from within an Apache Karaf bundle using a camel blueprint
>>
>> 2) Sending a message to an exchange with a bound queue on the
>> backend.
>>
>> 3) It is failing with a null pointer exception
>>
>> java.lang.NullPointerException
>>
>> at
>>
>> org.apache.qpid.client.BasicMessageProducer_0_8.declareDestination(BasicMess
>> ageProducer_0_8.java:63)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
>>
>> at
>>
>> org.apache.qpid.client.BasicMessageProducer.<init>(BasicMessageProducer.java
>> :136)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
>>
>> at
>>
>> org.apache.qpid.client.BasicMessageProducer_0_8.<init>(BasicMessageProducer_
>> 0_8.java:55)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
>>
>> at
>>
>> org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.j
>> ava:559)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
>>
>> at
>>
>> org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.j
>> ava:62)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
>>
>> 4) I can get this working from outside of Karaf using the same client
>> version (0.32) and address string which validates both the connection
>> parameters, the address string and the function of the rabbit mq server.
>>
>> 5) If I trace this out within qpid it seems to get a connection but not
>> transmit any data
>>
>> 2016-06-12 19:00:38,728 DEBUG
>> org.apache.servicemix.bundles.qpid:0.28.0.1(212) [IoReceiver -
>> localhost/127.0.0.1:5672]
>> org.apache.qpid.client.protocol.AMQProtocolHandler: (1404676419)Method
>> frame
>> received: [ChannelOpenOkBodyImpl: channelId=null]
>>
>> 2016-06-12 19:00:38,728 DEBUG
>> org.apache.servicemix.bundles.qpid:0.28.0.1(212) [IoReceiver -
>> localhost/127.0.0.1:5672]
>> org.apache.qpid.client.protocol.AMQProtocolHandler: (1404676419)Method
>> frame
>> received: [BasicQosOkBodyImpl: ]
>>
>> 2016-06-12 19:00:38,731 DEBUG
>> org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
>> (amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
>> org.apache.qpid.client.AMQDestination: Based on
>> onms3/Simon;{'create':'always','node':{'type':'topic'} } the selected
>> destination syntax is ADDR
>>
>> 2016-06-12 19:00:38,731 DEBUG
>> org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
>> (amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
>> org.apache.qpid.client.AMQSession: Closing session:
>> org.apache.qpid.client.AMQSession_0_8@179483f0
>>
>> 2016-06-12 19:00:38,731 DEBUG
>> org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
>> (amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
>> org.apache.qpid.client.protocol.AMQProtocolSession: closeSession called on
>> protocol session for session 1
>>
>> 6) When I try this from the command line client when it works it looks
>> like
>> this
>>
>> 142 [main] DEBUG org.apache.qpid.client.AMQConnection - Are we
>> connected:true
>>
>> 142 [main] DEBUG org.apache.qpid.client.AMQConnection - Connected with
>> ProtocolHandler Version:0-91
>>
>> 146 [main] DEBUG org.apache.qpid.client.AMQConnectionDelegate_8_0 -
>> Write
>> channel open frame for channel id 1
>>
>> 162 [main] DEBUG org.apache.qpid.client.AMQSession - Created
>> session:org.apache.qpid.client.AMQSession_0_8@6bdf28bb
>>
>> 164 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
>> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
>> frame received: [ChannelOpenOkBody]
>>
>> 165 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
>> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
>> frame received: [BasicQosOkBodyImpl: ]
>>
>> 173 [main] DEBUG org.apache.qpid.client.AMQDestination - Based on
>> onms3/Simon;{create: always, node:{type: topic } } the selected
>> destination
>> syntax is ADDR
>>
>> 177 [main] DEBUG org.apache.qpid.framing.FieldTable -
>> FieldTable::writeToBuffer: Writing encoded length of 0...
>>
>> 178 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
>> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
>> frame received: [ExchangeDeclareOkBodyImpl: ]
>>
>> 179 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
>> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
>> frame received: [ExchangeDeclareOkBodyImpl: ]
>>
>> 179 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
>> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
>> frame received: [ExchangeDeclareOkBodyImpl: ]
>>
>> 180 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 -
>> MessageProducer org.apache.qpid.client.BasicMessageProducer_0_8@1936f0f5
>> using publish mode : ASYNC_PUBLISH_ALL
>>
>> 190 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 -
>> Sending
>> content body frames to 'onms3'/'Simon'; {
>>
>> 'create': 'always',
>>
>> 'node': {
>>
>> 'type': 'topic'
>>
>> }
>>
>> }
>>
>> 190 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 -
>> Sending
>> content header frame to 'onms3'/'Simon'; {
>>
>> 'create': 'always',
>>
>> 'node': {
>>
>> 'type': 'topic'
>>
>> }
>>
>> }
>>
>> 190 [main] DEBUG org.apache.qpid.framing.FieldTable -
>> FieldTable::writeToBuffer: Writing encoded length of 90...
>>
>> 191 [main] DEBUG org.apache.qpid.framing.FieldTable - {Id=[INT:
>> 987654321], name=[LONG_STRING: WidgetSimon], price=[DOUBLE: 0.99],
>> qpid.subject=[LONG_STRING: Simon], JMS_QPID_DESTTYPE=[INT: 2]}
>>
>> 192 [main] DEBUG org.apache.qpid.client.AMQSession - Closing session:
>> org.apache.qpid.client.AMQSession_0_8@6bdf28bb
>>
>> 192 [main] DEBUG org.apache.qpid.client.protocol.AMQProtocolSession -
>> closeSession called on protocol session for session 1
>>
>> 194 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
>> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
>> frame received: [ChannelCloseOkBody]
>>
>> 194 [IoReceiver - localhost/127.0.0.1:5672] INFO
>> org.apache.qpid.client.handler.ChannelCloseOkMethodHandler - Received
>> channel-close-ok for channel-id 1
>>
>> 195 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
>> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
>> frame received: [ConnectionCloseOkBody]
>>
>>
>>
>> Can you suggest what the issue might be?
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>
Re: Qpid 0.32 Java Client Issue
Posted by Lorenz Quack <qu...@gmail.com>.
Hello Simon,
I'm sorry I am not familiar with most of the components you mention in
your report.
But I did noticed that in the stacktrace you see this:
org.apache.servicemix.bundles.qpid:0.28.0.1
That made me think maybe servicemix is bundling version 0.28 of the Qpid
Java client libraries.
Usually "bad things" happen when mixing libraries from different versions.
Kind Regards,
Lorenz
On 13/06/16 10:46, Simon Gmail wrote:
> I have an issue which I have described here
> http://stackoverflow.com/questions/37778136/opennms-v18-amqp-message-sending
> -issue
>
>
>
> In summary:-
>
>
>
> 1) OpenNMS is using QPID 0.32 Java Client to talk into a 3.5.7 Rabbit
> MQ Server from within an Apache Karaf bundle using a camel blueprint
>
> 2) Sending a message to an exchange with a bound queue on the backend.
>
> 3) It is failing with a null pointer exception
>
> java.lang.NullPointerException
>
> at
> org.apache.qpid.client.BasicMessageProducer_0_8.declareDestination(BasicMess
> ageProducer_0_8.java:63)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
>
> at
> org.apache.qpid.client.BasicMessageProducer.<init>(BasicMessageProducer.java
> :136)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
>
> at
> org.apache.qpid.client.BasicMessageProducer_0_8.<init>(BasicMessageProducer_
> 0_8.java:55)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
>
> at
> org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.j
> ava:559)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
>
> at
> org.apache.qpid.client.AMQSession_0_8.createMessageProducer(AMQSession_0_8.j
> ava:62)[212:org.apache.servicemix.bundles.qpid:0.28.0.1]
>
> 4) I can get this working from outside of Karaf using the same client
> version (0.32) and address string which validates both the connection
> parameters, the address string and the function of the rabbit mq server.
>
> 5) If I trace this out within qpid it seems to get a connection but not
> transmit any data
>
> 2016-06-12 19:00:38,728 DEBUG
> org.apache.servicemix.bundles.qpid:0.28.0.1(212) [IoReceiver -
> localhost/127.0.0.1:5672]
> org.apache.qpid.client.protocol.AMQProtocolHandler: (1404676419)Method frame
> received: [ChannelOpenOkBodyImpl: channelId=null]
>
> 2016-06-12 19:00:38,728 DEBUG
> org.apache.servicemix.bundles.qpid:0.28.0.1(212) [IoReceiver -
> localhost/127.0.0.1:5672]
> org.apache.qpid.client.protocol.AMQProtocolHandler: (1404676419)Method frame
> received: [BasicQosOkBodyImpl: ]
>
> 2016-06-12 19:00:38,731 DEBUG
> org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
> (amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
> org.apache.qpid.client.AMQDestination: Based on
> onms3/Simon;{'create':'always','node':{'type':'topic'} } the selected
> destination syntax is ADDR
>
> 2016-06-12 19:00:38,731 DEBUG
> org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
> (amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
> org.apache.qpid.client.AMQSession: Closing session:
> org.apache.qpid.client.AMQSession_0_8@179483f0
>
> 2016-06-12 19:00:38,731 DEBUG
> org.apache.servicemix.bundles.qpid:0.28.0.1(212) [Camel
> (amqpAlarmNorthbounderCamelContext) thread #4 - seda://forwardAlarm]
> org.apache.qpid.client.protocol.AMQProtocolSession: closeSession called on
> protocol session for session 1
>
> 6) When I try this from the command line client when it works it looks like
> this
>
> 142 [main] DEBUG org.apache.qpid.client.AMQConnection - Are we
> connected:true
>
> 142 [main] DEBUG org.apache.qpid.client.AMQConnection - Connected with
> ProtocolHandler Version:0-91
>
> 146 [main] DEBUG org.apache.qpid.client.AMQConnectionDelegate_8_0 - Write
> channel open frame for channel id 1
>
> 162 [main] DEBUG org.apache.qpid.client.AMQSession - Created
> session:org.apache.qpid.client.AMQSession_0_8@6bdf28bb
>
> 164 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
> frame received: [ChannelOpenOkBody]
>
> 165 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
> frame received: [BasicQosOkBodyImpl: ]
>
> 173 [main] DEBUG org.apache.qpid.client.AMQDestination - Based on
> onms3/Simon;{create: always, node:{type: topic } } the selected destination
> syntax is ADDR
>
> 177 [main] DEBUG org.apache.qpid.framing.FieldTable -
> FieldTable::writeToBuffer: Writing encoded length of 0...
>
> 178 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
> frame received: [ExchangeDeclareOkBodyImpl: ]
>
> 179 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
> frame received: [ExchangeDeclareOkBodyImpl: ]
>
> 179 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
> frame received: [ExchangeDeclareOkBodyImpl: ]
>
> 180 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 -
> MessageProducer org.apache.qpid.client.BasicMessageProducer_0_8@1936f0f5
> using publish mode : ASYNC_PUBLISH_ALL
>
> 190 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 - Sending
> content body frames to 'onms3'/'Simon'; {
>
> 'create': 'always',
>
> 'node': {
>
> 'type': 'topic'
>
> }
>
> }
>
> 190 [main] DEBUG org.apache.qpid.client.BasicMessageProducer_0_8 - Sending
> content header frame to 'onms3'/'Simon'; {
>
> 'create': 'always',
>
> 'node': {
>
> 'type': 'topic'
>
> }
>
> }
>
> 190 [main] DEBUG org.apache.qpid.framing.FieldTable -
> FieldTable::writeToBuffer: Writing encoded length of 90...
>
> 191 [main] DEBUG org.apache.qpid.framing.FieldTable - {Id=[INT:
> 987654321], name=[LONG_STRING: WidgetSimon], price=[DOUBLE: 0.99],
> qpid.subject=[LONG_STRING: Simon], JMS_QPID_DESTTYPE=[INT: 2]}
>
> 192 [main] DEBUG org.apache.qpid.client.AMQSession - Closing session:
> org.apache.qpid.client.AMQSession_0_8@6bdf28bb
>
> 192 [main] DEBUG org.apache.qpid.client.protocol.AMQProtocolSession -
> closeSession called on protocol session for session 1
>
> 194 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
> frame received: [ChannelCloseOkBody]
>
> 194 [IoReceiver - localhost/127.0.0.1:5672] INFO
> org.apache.qpid.client.handler.ChannelCloseOkMethodHandler - Received
> channel-close-ok for channel-id 1
>
> 195 [IoReceiver - localhost/127.0.0.1:5672] DEBUG
> org.apache.qpid.client.protocol.AMQProtocolHandler - (333274164)Method
> frame received: [ConnectionCloseOkBody]
>
>
>
>
>
> Can you suggest what the issue might be?
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org