Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-7884

camel-netty4-http does not work for HTTP POST requests on routingSlip

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.14.0
    • 2.17.2, 2.18.0
    • camel-netty4-http
    • None
    • Advanced

    Description

      I tried to add the camel-netty4-http component to a proper working project that uses camel-netty-http.
      HTTP GET requests are working properly but POST requests are not working.
      It might be an issue in Netty but I could not find a solution to get it to work.
      Here is the exception I see:
      2014-10-01 09:12:18,012 DEBUG [042ase_1412143933559.data] [n.s.ehcache.store.disk.Segment] fault removed 0 from heap
      2014-10-01 09:12:18,012 DEBUG [042ase_1412143933559.data] [n.s.ehcache.store.disk.Segment] fault added 0 on disk
      2014-10-01 09:12:18,012 TRACE [pool-1-thread-1 ] [o.a.c.i.c.DefaultTypeConverter] Converting io.netty.util.IllegalReferenceCountException -> java.lang.Throwable with value: {}
      io.netty.util.IllegalReferenceCountException: refCnt: 0
      at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1187) ~[netty-buffer-4.0.23.Final.jar:4.0.23.Final]
      at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1170) ~[netty-buffer-4.0.23.Final.jar:4.0.23.Final]
      at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:676) ~[netty-buffer-4.0.23.Final.jar:4.0.23.Final]
      at io.netty.buffer.CompositeByteBuf.readBytes(CompositeByteBuf.java:1461) ~[netty-buffer-4.0.23.Final.jar:4.0.23.Final]
      at io.netty.buffer.CompositeByteBuf.readBytes(CompositeByteBuf.java:40) ~[netty-buffer-4.0.23.Final.jar:4.0.23.Final]
      at org.apache.camel.component.netty4.http.NettyChannelBufferStreamCache.read(NettyChannelBufferStreamCache.java:69) ~[camel-netty4-http-2.14.0.jar:2.14.0]
      at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284) ~[na:1.8.0]
      at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326) ~[na:1.8.0]
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178) ~[na:1.8.0]
      at java.io.InputStreamReader.read(InputStreamReader.java:184) ~[na:1.8.0]
      at java.io.BufferedReader.fill(BufferedReader.java:161) ~[na:1.8.0]
      at java.io.BufferedReader.read1(BufferedReader.java:212) ~[na:1.8.0]
      at java.io.BufferedReader.read(BufferedReader.java:286) ~[na:1.8.0]
      at java.io.Reader.read(Reader.java:140) ~[na:1.8.0]
      at org.apache.camel.converter.IOConverter.toString(IOConverter.java:304) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.converter.IOConverter.toString(IOConverter.java:290) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.converter.IOConverter.toString(IOConverter.java:351) ~[camel-core-2.14.0.jar:2.14.0]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0]
      at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0]
      at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1002) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.impl.converter.StaticMethodTypeConverter.convertTo(StaticMethodTypeConverter.java:59) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:276) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:165) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:99) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.builder.ExpressionBuilder$41.evaluate(ExpressionBuilder.java:1011) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:36) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.component.bean.MethodInfo$2.evaluateParameterBinding(MethodInfo.java:595) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.component.bean.MethodInfo$2.evaluate(MethodInfo.java:485) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.component.bean.MethodInfo.createMethodInvocation(MethodInfo.java:240) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:280) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:180) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:149) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398) ~[camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) [camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:118) [camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.processor.Pipeline.access$100(Pipeline.java:43) [camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.processor.Pipeline$1.done(Pipeline.java:136) [camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:251) [camel-core-2.14.0.jar:2.14.0]
      at org.apache.camel.processor.RedeliveryErrorHandler$1.done(RedeliveryErrorHandler.java:410) [camel-core-2.14.0.jar:2.14.0]

      Attachments

        1. bug-reproduce.zip
          23 kB
          Amit R
        2. Reproduce2.zip.001
          8.11 MB
          Amit R
        3. Reproduce2.zip.002
          7.97 MB
          Amit R

        Activity

          People

            davsclaus Claus Ibsen
            yaronab Yaron A
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: