You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Jordi Soucheiron (JIRA)" <ji...@apache.org> on 2008/12/07 02:23:05 UTC

[jira] Commented: (AMQ-1588) Serialized ObjectMessages throw javax.jms.JMSException: Failed to build body from bytes when ID is clicked in admin servlet

    [ https://issues.apache.org/activemq/browse/AMQ-1588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47910#action_47910 ] 

Jordi Soucheiron commented on AMQ-1588:
---------------------------------------

I have the same problem.
I'm trying to send a quite simple serializable object . But I get this error in the admin interface and when I try to recieve the message.
This is the class I'm trying to send:
import java.io.Serializable;

public class WhereBlueMessage implements Serializable {

	private static final long serialVersionUID = 4733486888679192093L;
	private Serializable objecte;
	private int tipus;
	public static final int AUTH = 0;
	public static final int QUERY = 1;
	public static final int AUTHANSW = 2;
	public static final int QUERYANSW = 3;
	public static final int INFO = 4;
	
	public WhereBlueMessage (){}
	
	public WhereBlueMessage (int Tipus , Serializable Objecte){
		tipus = Tipus;
		objecte = Objecte;
	}
	
	public Serializable getObject(){
		return objecte;
	}
	
	public int getTipus(){
		return tipus;
	}
	
	public void setObject(Serializable Objecte){
		objecte = Objecte;
	}
	
	public void setTipus(int Tipus){
		tipus=Tipus;
	}

}


> Serialized ObjectMessages throw javax.jms.JMSException: Failed to build body from bytes when ID is clicked in admin servlet
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1588
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1588
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Adam
>             Fix For: 5.3.0
>
>
> Producing and sending ObjectMessages such as..
> \\
> {code}
> package com.test;
> import java.io.Serializable;
> public class TestEvent implements Serializable {
> 	private static final long serialVersionUID = 1L;
> 	private String test;
> 	
> 	public TestEvent() {
> 	}
> 	
> 	public String getTest() {
> 	 return test;
> 	}
> 	
> 	public void setTest(String test) {
> 	 this.test = test;
> 	}
> 	
> }
> {code}
> and then clicking the ID displayed by browse.jsp creates the following error everytime..
> I have tried setting the VM argument -Djava.rmi.server.codebase set in my producer and same thing happens
> {code}
> HTTP ERROR: 500
> javax.jms.JMSException: Failed to build body from bytes. Reason: java.io.IOException: com.test.TestEvent
> RequestURI=/admin/message.jsp
> Caused by:
> javax.el.ELException: javax.jms.JMSException: Failed to build body from bytes. Reason: java.io.IOException: com.test.TestEvent
> 	at javax.el.BeanELResolver.getValue(BeanELResolver.java:266)
> 	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
> 	at com.sun.el.parser.AstValue.getValue(AstValue.java:125)
> 	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:195)
> 	at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:1008)
> 	at org.apache.jsp.message_jsp._jspx_meth_c_otherwise_0(org.apache.jsp.message_jsp:329)
> 	at org.apache.jsp.message_jsp._jspx_meth_c_choose_0(org.apache.jsp.message_jsp:147)
> 	at org.apache.jsp.message_jsp._jspService(org.apache.jsp.message_jsp:89)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:80)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:464)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:358)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1098)
> 	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:63)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:46)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:81)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
> 	at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 	at org.mortbay.jetty.Server.handle(Server.java:295)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361)
> 	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> Caused by: javax.jms.JMSException: Failed to build body from bytes. Reason: java.io.IOException: com.test.TestEvent
> 	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> 	at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:183)
> 	at org.apache.activemq.web.MessageQuery.getBody(MessageQuery.java:78)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
> 	... 40 more
> Caused by: java.io.IOException: com.test.TestEvent
> 	at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:179)
> 	... 46 more
> Caused by:
> javax.jms.JMSException: Failed to build body from bytes. Reason: java.io.IOException: com.test.TestEvent
> 	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
> 	at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:183)
> 	at org.apache.activemq.web.MessageQuery.getBody(MessageQuery.java:78)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
> 	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
> 	at com.sun.el.parser.AstValue.getValue(AstValue.java:125)
> 	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:195)
> 	at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:1008)
> 	at org.apache.jsp.message_jsp._jspx_meth_c_otherwise_0(org.apache.jsp.message_jsp:329)
> 	at org.apache.jsp.message_jsp._jspx_meth_c_choose_0(org.apache.jsp.message_jsp:147)
> 	at org.apache.jsp.message_jsp._jspService(org.apache.jsp.message_jsp:89)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:80)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:464)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:358)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1098)
> 	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:63)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:46)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:81)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
> 	at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 	at org.mortbay.jetty.Server.handle(Server.java:295)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361)
> 	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> Caused by: java.io.IOException: com.test.TestEvent
> 	at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:179)
> 	... 46 more
> Caused by:
> java.io.IOException: com.test.TestEvent
> 	at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:179)
> 	at org.apache.activemq.web.MessageQuery.getBody(MessageQuery.java:78)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
> 	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
> 	at com.sun.el.parser.AstValue.getValue(AstValue.java:125)
> 	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:195)
> 	at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:1008)
> 	at org.apache.jsp.message_jsp._jspx_meth_c_otherwise_0(org.apache.jsp.message_jsp:329)
> 	at org.apache.jsp.message_jsp._jspx_meth_c_choose_0(org.apache.jsp.message_jsp:147)
> 	at org.apache.jsp.message_jsp._jspService(org.apache.jsp.message_jsp:89)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:80)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:464)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:358)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1098)
> 	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:63)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:46)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:81)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
> 	at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> 	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> 	at org.mortbay.jetty.Server.handle(Server.java:295)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
> 	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361)
> 	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> Powered by Jetty://
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.