Hi,

We're currently developing an app that needs to subscribe to a RabbitMQ queue, 
running on JBoss AS 7. I've tried using the quid RA, and have managed to get to 
the point where it's connecting to the queue. However, when a message is 
received, I receive the following exception:

09:18:44,446 ERROR [org.apache.qpid.client.BasicMessageConsumer] 
(Dispatcher-1-Conn-1) Caught exception (dump follows) - ignoring...: 
java.lang.NullPointerException
        at 
org.apache.qpid.client.message.AbstractAMQMessageDelegate.generateDestination(AbstractAMQMessageDelegate.java:117)
        at 
org.apache.qpid.client.message.AMQMessageDelegate_0_8.<init>(AMQMessageDelegate_0_8.java:127)
        at 
org.apache.qpid.client.message.AbstractJMSMessageFactory.create08MessageWithBody(AbstractJMSMessageFactory.java:103)
        at 
org.apache.qpid.client.message.AbstractJMSMessageFactory.createMessage(AbstractJMSMessageFactory.java:160)
        at 
org.apache.qpid.client.message.MessageFactoryRegistry.createMessage(MessageFactoryRegistry.java:127)
        at 
org.apache.qpid.client.BasicMessageConsumer_0_8.createJMSMessageFromUnprocessedMessage(BasicMessageConsumer_0_8.java:118)
        at 
org.apache.qpid.client.BasicMessageConsumer_0_8.createJMSMessageFromUnprocessedMessage(BasicMessageConsumer_0_8.java:44)
        at 
org.apache.qpid.client.BasicMessageConsumer.notifyMessage(BasicMessageConsumer.java:712)
        at 
org.apache.qpid.client.AMQSession$Dispatcher.notifyConsumer(AMQSession.java:3362)
        at 
org.apache.qpid.client.AMQSession$Dispatcher.dispatchMessage(AMQSession.java:3301)
        at 
org.apache.qpid.client.AMQSession$Dispatcher.access$900(AMQSession.java:3088)
        at org.apache.qpid.client.AMQSession.dispatch(AMQSession.java:3081)
        at 
org.apache.qpid.client.message.UnprocessedMessage.dispatch(UnprocessedMessage.java:54)
        at 
org.apache.qpid.client.AMQSession$Dispatcher.run(AMQSession.java:3224)
        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]

Here's the configuration I'm currently using:
        <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
            <resource-adapters>
                <resource-adapter>
                    <archive>
                        qpid-ra-0.20.rar
                    </archive>
                    <transaction-support>XATransaction</transaction-support>
                    <config-property name="TransactionManagerLocatorClass">
                        org.apache.qpid.ra.tm.JBoss7TransactionManagerLocator
                    </config-property>
                    <config-property name="connectionURL">
                        amqp://guest:guest@/?brokerlist='tcp://localhost:5672'
                    </config-property>
                    <config-property name="TransactionManagerLocatorMethod">
                        getTm
                    </config-property>
                    <admin-objects>
                        <admin-object 
class-name="org.apache.qpid.ra.admin.QpidQueueImpl" 
jndi-name="java:/amqp/queue/ldav" use-java-context="false" pool-name="LdavAmqp">
                            <config-property name="DestinationAddress">
                                
BURL:direct://excAlarms//sps.queue?durable='true'
                            </config-property>
                        </admin-object>
                    </admin-objects>
                </resource-adapter>
            </resource-adapters>
        </subsystem>

Is there something wrong with the above configuration? Or is it a bug with 
looking up the exchange? Because when I patch generateDestination to use the 
default exchange name of "" when exchange is null, receiving messages work fine.

--
James Gilbertson
Software Architect/Developer
Bits In Glass Inc.

http://www.bitsinglass.com
[email protected]
+1 780-436-4484 ext. 8002

Reply via email to