activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uday Subbarayan <uday.subbara...@yahoo.com>
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.

Best,
Uday.

-------------------------

I do not blog but e-write:

http://uds-web.blogspot.com

--- On Fri, 11/27/09, Bruce Snyder <bruce.snyder@gmail.com> wrote:

From: Bruce Snyder <bruce.snyder@gmail.com>
Subject: Re: NPE- Consumer Example
To: users@activemq.apache.org
Date: Friday, November 27, 2009, 4:34 PM

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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message