Quantcast

Active MQ viewing messages in queue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Active MQ viewing messages in queue

hyrahul64


I just want to see content of message which have been queued in ActiveMQ queues. I opened web-console.(http://localhost:8161/admin/queues.jsp) and clicked on message-id of the message of queue. It gives me following error in "Message Details" window rather than giving content of message.

"javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException:"

What is the cause of this exception & what I need to do to get rid of this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ viewing messages in queue

Tim Bain
One common cause of that exception is when you send an ObjectMessage whose
object contains a class that's on the classpath of your producer and your
consumer but not on the classpath of the broker. This could be a custom
class you wrote, or something out of third-party library you depend on.

Tim

On Mar 29, 2017 7:35 PM, "hyrahul64" <[hidden email]> wrote:

>
>
> I just want to see content of message which have been queued in ActiveMQ
> queues. I opened web-console.(http://localhost:8161/admin/queues.jsp) and
> clicked on message-id of the message of queue. It gives me following error
> in "Message Details" window rather than giving content of message.
>
> "javax.jms.JMSException: Failed to build body from content. Serializable
> class not available to broker. Reason: java.lang.ClassNotFoundException:"
>
> What is the cause of this exception & what I need to do to get rid of this?
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Active-MQ-viewing-messages-in-queue-tp4724326.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ viewing messages in queue

hyrahul64
Hi Tim,Thanks for your prompt reply. So what should be done to get rid of this? How this custom class can be made available to Active MQ(Broker)?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ viewing messages in queue

Tim Bain
You need to put all relevant JARs onto the broker's classpath, either by
putting them into a folder that will be automatically added to the
classpath (e.g. lib) or by putting them somewhere else and modifying the
start script to add them to the classpath.

Tim

On Mar 30, 2017 4:43 PM, "hyrahul64" <[hidden email]> wrote:

> Hi Tim,Thanks for your prompt reply. So what should be done to get rid of
> this? How this custom class can be made available to Active MQ(Broker)?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Active-MQ-viewing-messages-in-queue-tp4724326p4724379.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Loading...