3 Replies Latest reply on Mar 12, 2010 6:25 PM by Willem Jiang

    Camel Jetty Error - java.lang.ArrayIndexOutOfBoundsException: 4096

    Gary Motts Novice

      Hi,

       

      When I'm sending an http request that has a large amount of data in a header to a Camel-Jetty endpoint, > 4K, I'm getting the following error message.  Is there a way to configure the header buffer size through camel-context or some other means with Camel-Jetty?

       

      2010-03-11 14:24:18.671::WARN:  /HTTPRouter/inbound

      java.lang.ArrayIndexOutOfBoundsException: 4096

              at org.mortbay.io.ByteArrayBuffer.poke(ByteArrayBuffer.java:268)

              at org.mortbay.io.AbstractBuffer.put(AbstractBuffer.java:456)

              at org.mortbay.jetty.HttpFields$Field.put(HttpFields.java:1384)

              at org.mortbay.jetty.HttpGenerator.completeHeader(HttpGenerator.java:417)

              at org.mortbay.jetty.HttpConnection.commitResponse(HttpConnection.java:610)

              at org.mortbay.jetty.HttpConnection$Output.close(HttpConnection.java:931)

              at org.apache.camel.component.http.DefaultHttpBinding.doWriteDirectResponse(DefaultHttpBinding.java:175)

              at org.apache.camel.component.http.DefaultHttpBinding.doWriteResponse(DefaultHttpBinding.java:162)

              at org.apache.camel.component.http.DefaultHttpBinding.writeResponse(DefaultHttpBinding.java:110)

              at org.apache.camel.component.jetty.CamelContinuationServlet.service(CamelContinuationServlet.java:76)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)

              at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)

              at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363)

              at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)

              at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)

              at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

              at org.mortbay.jetty.Server.handle(Server.java:324)

              at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)

              at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)

              at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)

              at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)

              at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)

              at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)

              at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)