activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uday Subbarayan <>
Subject Re: NPE- Consumer Example
Date Sat, 28 Nov 2009 02:39:31 GMT
Thanks Bruce. My config is like yours and /etc/hosts also fine. I am now writing my own consumer
and having some problem....i get "null" message.

My producer is http post, admin page correctly shows the message but having problem with consumer.
I am looking in to it right now.



I do not blog but e-write:

--- On Fri, 11/27/09, Bruce Snyder <> wrote:

From: Bruce Snyder <>
Subject: Re: NPE- Consumer Example
Date: Friday, November 27, 2009, 4:34 PM

On Thu, Nov 26, 2009 at 12:38 PM, Uday Subbarayan
<> 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 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 instead just to see if that changes the situation.

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:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message