camel rabbitmq

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

camel rabbitmq

kiranreddykasa
Hi

I tried to use camel-rabbitmq component from 2.12 snapshot.

Here is my route.

 from("netty:tcp://0.0.0.0:7000?textline=true").to("rabbitmq://localhost/A?routingKey=B&username=guest&password=guest");

And I am getting null pointer exception.


Here is full stacktrace

Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
java.lang.NullPointerException
        at org.apache.camel.component.rabbitmq.RabbitMQProducer.process(RabbitMQProducer.java:51)
        at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
        at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:123)
        at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:118)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:397)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:189)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:189)
        at org.apache.camel.component.netty.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:130)
        at org.apache.camel.component.netty.handlers.ServerChannelHandler.messageReceived(ServerChannelHandler.java:104)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
        at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
        at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Regards

kiran Reddy
Reply | Threaded
Open this post in threaded view
|

Re: camel rabbitmq

Claus Ibsen-2
Hi

Thanks for reporting. I am fixing this on master.



On Tue, Jul 30, 2013 at 12:43 PM, kiranreddykasa <[hidden email]> wrote:

> Hi
>
> I tried to use camel-rabbitmq component from 2.12 snapshot.
>
> Here is my route.
>
>
> from("netty:tcp://0.0.0.0:7000?textline=true").to("rabbitmq://localhost/A?routingKey=B&username=guest&password=guest");
>
> And I am getting null pointer exception.
>
>
> Here is full stacktrace
>
> Stacktrace
> ---------------------------------------------------------------------------------------------------------------------------------------
> java.lang.NullPointerException
>         at
> org.apache.camel.component.rabbitmq.RabbitMQProducer.process(RabbitMQProducer.java:51)
>         at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>         at
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:123)
>         at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)
>         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:118)
>         at
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
>         at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:397)
>         at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:189)
>         at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:189)
>         at
> org.apache.camel.component.netty.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:130)
>         at
> org.apache.camel.component.netty.handlers.ServerChannelHandler.messageReceived(ServerChannelHandler.java:104)
>         at
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
>         at
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
>         at
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
>         at
> org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
>         at
> org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
>         at
> org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)
>
>
>
>
>
> -----
> Regards
>
> kiran Reddy
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-rabbitmq-tp5736483.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [hidden email]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Reply | Threaded
Open this post in threaded view
|

Re: camel rabbitmq

dalewking
In reply to this post by kiranreddykasa
I ran into this as well and can be worked around by adding this between your from and to:

    .setHeader(RabbitMQConstants.EXCHANGE_NAME).constant("A")