[
https://issues.apache.org/activemq/browse/AMQ-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Torsten Mielke updated AMQ-2154:
--------------------------------
Attachment: AMQ-2154.patch
Attaching a possible fix for this issue. Catching the JMSException in
MessageQueue.getBody() and returning it. That case it can be properly displayed
in the generated html output in the browser.
Also changing ActiveMQObjectMessage.getObject() to also propagate the root
exception (in my test it was a ClassNotFoundException).
> trying to access an ObjectMessage in the AMQ web console results in
> java.io.IOException: com.myclass...
> -------------------------------------------------------------------------------------------------------
>
> Key: AMQ-2154
> URL: https://issues.apache.org/activemq/browse/AMQ-2154
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.1.0
> Environment: web console, ObjectMessage
> Reporter: Torsten Mielke
> Priority: Minor
> Attachments: AMQ-2154.patch
>
>
> The web console can be used to drill into individual message and display both
> their properties as well as payload.
> Displaying the payload generally works fine for TextMessages, etc but fails
> for ObjectMessages and probably other binary payload formats.
> This is okay and kind of expected but rather than throwing an exception with
> a large stack trace back to the browser client, we should capture the ex and
> display at least the message properties and also a short message that the
> content cannot be displayed due to its binary content.
> Error msg and stack trace that is thrown:
> {code}
> java.io.IOException: com.myclass
> 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:138)
> at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
> at
> org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:984)
> at
> org.apache.jsp.message_jsp._jspx_meth_c_out_0(org.apache.jsp.message_jsp:400)
> at
> org.apache.jsp.message_jsp._jspx_meth_c_otherwise_0(org.apache.jsp.message_jsp:334)
> at
> org.apache.jsp.message_jsp._jspx_meth_c_choose_0(org.apache.jsp.message_jsp:151)
> at org.apache.jsp.message_jsp._jspService(org.apache.jsp.message_jsp:92)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:477)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:371)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
> at
> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
> at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> at org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:46)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> at
> org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:81)
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> 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:1084)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
> 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:324)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
> at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.