activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <bruce.sny...@gmail.com>
Subject Re: NPE- Consumer Example
Date Fri, 27 Nov 2009 16:34:54 GMT
On Thu, Nov 26, 2009 at 12:38 PM, Uday Subbarayan
<uday.subbarayan@yahoo.com> wrote:
> The default sample app in 5.3 is throwing a Null Pointer Exception for consuming the
message. I see that message count is decreasing by 1, when i run the consumer sample app for
1st time. But it doesn't consume any more message and throws this NPE. Its on Mac. Any idea?
>
> Thanks,
> Uday.
>
> uday-subbarayans-macbook:example uday$ ant consumer -Durl=tcp://localhost:61616 -Dsubject=myqueue
> Buildfile: build.xml
>
> init:
>
> compile:
>
> consumer:
>      [echo] Running consumer against server at $url = tcp://localhost:61616 for subject
$subject = myqueue
>      [java] Connecting to URL: tcp://localhost:61616
>      [java] Consuming queue: myqueue
>      [java] Using a non-durable subscription
>      [java] We are about to wait until we consume: 2000 message(s) then we will shutdown
>      [java] Caught: java.lang.NullPointerException
>      [java] java.lang.NullPointerException
>      [java]     at ConsumerTool.onMessage(Unknown Source)
>      [java]     at ConsumerTool.consumeMessagesAndClose(Unknown Source)
>      [java]     at ConsumerTool.run(Unknown Source)
>      [java]     at ConsumerTool.main(Unknown Source)

I just ran the producer/consumer examples from a fresh download of
ActiveMQ 5.3.0 on a MacBook Pro running OS X 10.6.2 using Java
1.6.0_15 and I'm not seeing the NPE at all. Do you have localhost
configured in your /etc/hosts file? Also, instead of localhost, try
0.0.0.0 instead just to see if that changes the situation.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Mime
View raw message