activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbarlabanov <cont...@sergiy-barlabanov.de>
Subject QueueViewMBean.browseMessages throws NotSerializableException: org.apache.activemq.command.ActiveMQObjectMessage
Date Tue, 08 Jan 2013 10:13:45 GMT
Hi,
we get this exception, when trying to browse messages in a queue.
So the messages are already in the queue and their content IS serializable
(otherwise they would not be stored in the queue and the send would have
already failed before).
We get the exception when we try to call QueueViewMBean.browseMessages
programmatically. The same exception comes also from jconsole.
As far as I see in the ActiveMQ source code, the implementation just tries
to write instances of ActiveMQObjectMessage directly into output stream.
This can't work since ActiveMQObjectMessage does not implement Serializeable
interface.
Is this a bug, or is QueueViewMBean.browseMessages not intended to be called
remotely?
Here is the stack trace we get from the broker:

java.rmi.UnmarshalException: error unmarshalling return; nested exception
is:
               java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
org.apache.activemq.command.ActiveMQObjectMessage
               at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:191)
               at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
               at
javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source)
               at
javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:1017)
               at
javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:305)
               ... 103 more
Caused by: java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
org.apache.activemq.command.ActiveMQObjectMessage
               at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
               at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
               at java.util.ArrayList.readObject(ArrayList.java:733)
               at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown
Source)
               at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:601)
               at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004)
               at
java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
               at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
               at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
               at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
               at
sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:324)
               at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:173)
               ... 107 more
Caused by: java.io.NotSerializableException:
org.apache.activemq.command.ActiveMQObjectMessage
               at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
               at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
               at java.util.ArrayList.writeObject(ArrayList.java:710)
               at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown
Source)
               at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:601)
               at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:975)
               at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)
               at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
               at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
               at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
               at
sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:292)
               at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:332)
               at sun.rmi.transport.Transport$1.run(Transport.java:177)
               at sun.rmi.transport.Transport$1.run(Transport.java:174)
               at java.security.AccessController.doPrivileged(Native Method)
               at
sun.rmi.transport.Transport.serviceCall(Transport.java:173)
               at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
               at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
               at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
               at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
               at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
               ... 1 more

Best regards,
Sergiy



--
View this message in context: http://activemq.2283324.n4.nabble.com/QueueViewMBean-browseMessages-throws-NotSerializableException-org-apache-activemq-command-ActiveMQObe-tp4661473.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message