activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve.V." <stephen.vinc...@sas.com>
Subject Does v5.6.0 MessageServlet(REST interface) support a Content-Type of "text/plain"?
Date Mon, 06 Aug 2012 19:30:51 GMT
I can use the RESTful HTTP protocol to POST and GET messages as long as I
POST using either "text/xml" or "application/x-www-form-urlencoded" as the
Content-Type.  If I try to POST via "text/plain", messages are put on the
queue, but have no content.  When I attempt to GET those messages off of the
queue, the broker encounters a  NullPointerException at line 269 of
MessageServlet.java:

java.lang.NullPointerException
	at
org.apache.activemq.web.MessageServlet.writeMessageResponse(MessageServlet.java:269)
	at
org.apache.activemq.web.MessageServlet.writeResponse(MessageServlet.java:256)
	at
org.apache.activemq.web.MessageServlet.doMessages(MessageServlet.java:229)
	at org.apache.activemq.web.MessageServlet.doGet(MessageServlet.java:165)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
	at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1360)
	at org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:45)
	at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331)
	at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477)
	at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
	at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:499)
	at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
	at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
	at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
	at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
	at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
	at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
	at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:499)
	at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
	at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
	at org.eclipse.jetty.server.Server.handle(Server.java:349)
	at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
	at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884)
	at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
	at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
	at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
	at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
	at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
	at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
	at java.lang.Thread.run(Thread.java:619)

Thanks,
Stephen Vincent




-----
Stephen Vincent
--
View this message in context: http://activemq.2283324.n4.nabble.com/Does-v5-6-0-MessageServlet-REST-interface-support-a-Content-Type-of-text-plain-tp4654825.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message