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: [email protected]
For additional commands, e-mail: [email protected]