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

[jira] [Updated] (AMQ-5579) REST production of message bodies can result in IllegalStateException: STREAMED

     [ https://issues.apache.org/jira/browse/AMQ-5579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arthur Naseef updated AMQ-5579:
-------------------------------
    Description: 
Attempting to post a message to AMQ using the following yields an IllegalStateException:

*Example Command*
{code}
curl -u admin:admin -d "hello world" -XPOST http://localhost:8161/api/message?destination=queue://abc.def
{code}

*Exception*
{code}
java.lang.IllegalStateException: STREAMED
	at org.eclipse.jetty.server.Request.getReader(Request.java:898)
	at org.apache.activemq.web.MessageServletSupport.getPostedMessageBody(MessageServletSupport.java:347)
	at org.apache.activemq.web.MessageServlet.doPost(MessageServlet.java:126)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:522)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:522)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:370)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
	at java.lang.Thread.run(Thread.java:745)
{code}

Note that changing the {{-d}} syntax to {{-d "body=hello world"}}, the problem goes away.

  was:
Attempting to post a message to AMQ using the following yields an IllegalStateException:

*Example Command*
{code}
curl -u admin:admin -d "hello world" -XPOST http://localhost:8161/api/message?destination=queue://abc.def
{curl}

*Exception*
{code}
java.lang.IllegalStateException: STREAMED
	at org.eclipse.jetty.server.Request.getReader(Request.java:898)
	at org.apache.activemq.web.MessageServletSupport.getPostedMessageBody(MessageServletSupport.java:347)
	at org.apache.activemq.web.MessageServlet.doPost(MessageServlet.java:126)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:522)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:522)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:370)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
	at java.lang.Thread.run(Thread.java:745)
{code}

Note that changing the {{-d}} syntax to {{-d "body=hello world"}}, the problem goes away.


> REST production of message bodies can result in IllegalStateException: STREAMED
> -------------------------------------------------------------------------------
>
>                 Key: AMQ-5579
>                 URL: https://issues.apache.org/jira/browse/AMQ-5579
>             Project: ActiveMQ
>          Issue Type: Bug
>         Environment: AMQ 5.11.0, mac
>            Reporter: Arthur Naseef
>            Assignee: Arthur Naseef
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Attempting to post a message to AMQ using the following yields an IllegalStateException:
> *Example Command*
> {code}
> curl -u admin:admin -d "hello world" -XPOST http://localhost:8161/api/message?destination=queue://abc.def
> {code}
> *Exception*
> {code}
> java.lang.IllegalStateException: STREAMED
> 	at org.eclipse.jetty.server.Request.getReader(Request.java:898)
> 	at org.apache.activemq.web.MessageServletSupport.getPostedMessageBody(MessageServletSupport.java:347)
> 	at org.apache.activemq.web.MessageServlet.doPost(MessageServlet.java:126)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:522)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> 	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:522)
> 	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:370)
> 	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
> 	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
> 	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
> 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
> 	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> 	at java.lang.Thread.run(Thread.java:745)
> {code}
> Note that changing the {{-d}} syntax to {{-d "body=hello world"}}, the problem goes away.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)