You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Ralf Steppacher (JIRA)" <ji...@apache.org> on 2015/08/10 17:02:46 UTC

[jira] [Created] (CAMEL-9070) java.lang.IllegalStateException: SENDING => HEADERS

Ralf Steppacher created CAMEL-9070:
--------------------------------------

             Summary: java.lang.IllegalStateException: SENDING => HEADERS
                 Key: CAMEL-9070
                 URL: https://issues.apache.org/jira/browse/CAMEL-9070
             Project: Camel
          Issue Type: Bug
          Components: camel-jetty
    Affects Versions: 2.15.2
            Reporter: Ralf Steppacher


When using the jetty component in a simple reverse proxy route deployed in {{Karaf 3.0.3}} I randomly receive the following Stacktrace:

{noformat}
org.apache.camel.CamelExchangeException: JettyClient failed cause by: SENDING => HEADERS. Exchange[HttpMessage@0x4b022edc]. Caused by: [java.lang.IllegalStateException - SENDING => HEADERS]
	at org.apache.camel.component.jetty8.JettyContentExchange8.doTaskCompleted(JettyContentExchange8.java:210)[150:org.apache.camel.camel-jetty8:2.15.2]
	at org.apache.camel.component.jetty8.JettyContentExchange8.onException(JettyContentExchange8.java:138)[150:org.apache.camel.camel-jetty8:2.15.2]
	at org.apache.camel.component.jetty8.JettyContentExchange8$1.onException(JettyContentExchange8.java:98)[150:org.apache.camel.camel-jetty8:2.15.2]
	at org.eclipse.jetty.client.AsyncHttpConnection.handle(AsyncHttpConnection.java:168)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at java.lang.Thread.run(Thread.java:745)[:1.7.0_60]
Caused by: java.lang.IllegalStateException: SENDING => HEADERS
	at org.eclipse.jetty.client.HttpExchange.setStatus(HttpExchange.java:370)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at org.eclipse.jetty.client.AbstractHttpConnection$Handler.startResponse(AbstractHttpConnection.java:297)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:489)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at org.eclipse.jetty.client.AsyncHttpConnection.handle(AsyncHttpConnection.java:135)[120:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	... 5 more
{noformat}

I have found (rather old) posts on the web that claim that the behavior is related to message size. I am {{POST}}-ing about 6kb of SOAP XML with the following headers:

{noformat}
POST http://localhost:8080/XDS3/repository/repo2 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: multipart/related; type="application/xop+xml"; start="<ro...@soapui.org>"; start-info="application/soap+xml"; action="urn:ihe:iti:2007:RetrieveDocumentSet"; boundary="----=_Part_139_1471895036.1439218177147"
MIME-Version: 1.0
Content-Length: 6858
Host: localhost:8080
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
{noformat}

The issue pops up at random but not evenly distributed. It either almost always happens or hardly ever. Re-installing my bundle or restarting Karaf usually triggers a switch between the two scenarios.



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