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

java.net.URISyntaxException: Invalid uri syntax: Trailing & marker found error should be configurable or skipped

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.15.1
    • Fix Version/s: 2.15.2, 2.16.0
    • Component/s: camel-netty4
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      I am using camel with netty4-http 2.15.1 and getting the following exception because the query string my server is receiving ends with '&'. As far as I know most sites simply ignore the trailing & at the end of query string. Camel should either ignore the trailing "&" or provide an optional option to skip this check. This error prevents replacing an existing ESB product with Apache Camel since our exiting ESB product doesn't flag this as error.

      23769 Camel (camel-1) thread #0 - NettyEventExecutorGroup WARN - Closing channel as an exception was thrown from Netty
      java.net.URISyntaxException: Invalid uri syntax: Trailing & marker found. Check the uri and remove the trailing & marker.: version=765&responseencoding=JSON&appid=xxxxxxx&siteid=0&callname=xxxx&ItemID=131334609454&IncludeSelector=Details&
      at org.apache.camel.util.URISupport.parseQuery(URISupport.java:153) ~[camel-core-2.15.1.jar:2.15.1]
      at org.apache.camel.util.URISupport.parseQuery(URISupport.java:133) ~[camel-core-2.15.1.jar:2.15.1]
      at org.apache.camel.component.netty4.http.DefaultNettyHttpBinding.populateCamelHeaders(DefaultNettyHttpBinding.java:182) ~[camel-netty4-http-2.15.1.jar:2.15.1]
      at org.apache.camel.component.netty4.http.RestNettyHttpBinding.populateCamelHeaders(RestNettyHttpBinding.java:50) ~[camel-netty4-http-2.15.1.jar:2.15.1]
      at org.apache.camel.component.netty4.http.DefaultNettyHttpBinding.toCamelMessage(DefaultNettyHttpBinding.java:89) ~[camel-netty4-http-2.15.1.jar:2.15.1]
      at org.apache.camel.component.netty4.http.NettyHttpEndpoint.createExchange(NettyHttpEndpoint.java:103) ~[camel-netty4-http-2.15.1.jar:2.15.1]
      at org.apache.camel.component.netty4.handlers.ServerChannelHandler.channelRead0(ServerChannelHandler.java:87) ~[camel-netty4-2.15.1.jar:2.15.1]
      at org.apache.camel.component.netty4.http.handlers.HttpServerChannelHandler.channelRead0(HttpServerChannelHandler.java:202) ~[camel-netty4-http-2.15.1.jar:2.15.1]
      at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[netty-transport-4.0.26.Final.jar:4.0.26.Final]
      at org.apache.camel.component.netty4.http.handlers.HttpServerMultiplexChannelHandler.channelRead0(HttpServerMultiplexChannelHandler.java:119) ~[camel-netty4-http-2.15.1.jar:2.15.1]
      at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[netty-transport-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339) [netty-transport-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:32) [netty-transport-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:329) [netty-transport-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:36) [netty-common-4.0.26.Final.jar:4.0.26.Final]
      at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111) [netty-common-4.0.26.Final.jar:4.0.26.Final]
      at java.lang.Thread.run(Thread.java:744) [na:1.7.0-45]

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              hzariv Homayoun Zariv
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: