Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6750

Camel component <cxf:rsServer> does not support URL with white spaces in between

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • fuse-7.0, fuse-6.x-GA
    • jboss-fuse-6.3
    • Camel, CXF
    • None
    • % %
    • Hide

      1.Deploy some sample application which uses <cxf:rsServer> to consume web service request.
      2.Make sure to have URL with some white spaces in between.
      For EX :

      <cxf:rsServer id="rsServer" address="http://localhost:9002/ route"
      		serviceClass="org.jboss.fuse.ControllerService" loggingFeatureEnabled="true" loggingSizeLimit="20">
      		<cxf:providers>
      			<bean class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" />
      		</cxf:providers>
      	</cxf:rsServer
      

      3.Invoke Web service.Check logs it fails with below exception :

      2017-04-24 14:42:34,342 | WARN  | tp1699507461-465 | HttpChannel                      | 123 - org.eclipse.jetty.util - 9.2.19.v20160908 | /%20route/services/user/123
      java.lang.IllegalArgumentException: Illegal character in path at index 22: http://localhost:9002/ route
      	at java.net.URI.create(URI.java:852)[:1.8.0_111]
      	at org.apache.cxf.transport.servlet.ServletDestination.getBasePath(ServletDestination.java:75)[229:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187]
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.setupMessage(AbstractHTTPDestination.java:375)[229:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187]
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)[229:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187]
      	at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:234)[230:org.apache.cxf.cxf-rt-transports-http-jetty:3.1.5.redhat-630187]
      	at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)[230:org.apache.cxf.cxf-rt-transports-http-jetty:3.1.5.redhat-630187]
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1129)[120:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1065)[120:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[120:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)[120:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[120:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.Server.handle(Server.java:499)[120:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[120:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[120:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[112:org.eclipse.jetty.io:9.2.19.v20160908]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[123:org.eclipse.jetty.util:9.2.19.v20160908]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[123:org.eclipse.jetty.util:9.2.19.v20160908]
      	at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
      Caused by: java.net.URISyntaxException: Illegal character in path at index 22: http://localhost:9002/ route
      	at java.net.URI$Parser.fail(URI.java:2848)[:1.8.0_111]
      	at java.net.URI$Parser.checkChars(URI.java:3021)[:1.8.0_111]
      	at java.net.URI$Parser.parseHierarchical(URI.java:3105)[:1.8.0_111]
      	at java.net.URI$Parser.parse(URI.java:3053)[:1.8.0_111]
      	at java.net.URI.<init>(URI.java:588)[:1.8.0_111]
      	at java.net.URI.create(URI.java:850)[:1.8.0_111]
      
      Show
      1.Deploy some sample application which uses <cxf:rsServer> to consume web service request. 2.Make sure to have URL with some white spaces in between. For EX : <cxf:rsServer id= "rsServer" address= "http: //localhost:9002/ route" serviceClass= "org.jboss.fuse.ControllerService" loggingFeatureEnabled= " true " loggingSizeLimit= "20" > <cxf:providers> <bean class= "com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" /> </cxf:providers> </cxf:rsServer 3.Invoke Web service.Check logs it fails with below exception : 2017-04-24 14:42:34,342 | WARN | tp1699507461-465 | HttpChannel | 123 - org.eclipse.jetty.util - 9.2.19.v20160908 | /%20route/services/user/123 java.lang.IllegalArgumentException: Illegal character in path at index 22: http: //localhost:9002/ route at java.net.URI.create(URI.java:852)[:1.8.0_111] at org.apache.cxf.transport.servlet.ServletDestination.getBasePath(ServletDestination.java:75)[229:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187] at org.apache.cxf.transport.http.AbstractHTTPDestination.setupMessage(AbstractHTTPDestination.java:375)[229:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187] at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)[229:org.apache.cxf.cxf-rt-transports-http:3.1.5.redhat-630187] at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:234)[230:org.apache.cxf.cxf-rt-transports-http-jetty:3.1.5.redhat-630187] at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)[230:org.apache.cxf.cxf-rt-transports-http-jetty:3.1.5.redhat-630187] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1129)[120:org.eclipse.jetty.server:9.2.19.v20160908] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1065)[120:org.eclipse.jetty.server:9.2.19.v20160908] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[120:org.eclipse.jetty.server:9.2.19.v20160908] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)[120:org.eclipse.jetty.server:9.2.19.v20160908] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[120:org.eclipse.jetty.server:9.2.19.v20160908] at org.eclipse.jetty.server.Server.handle(Server.java:499)[120:org.eclipse.jetty.server:9.2.19.v20160908] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[120:org.eclipse.jetty.server:9.2.19.v20160908] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[120:org.eclipse.jetty.server:9.2.19.v20160908] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[112:org.eclipse.jetty.io:9.2.19.v20160908] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[123:org.eclipse.jetty.util:9.2.19.v20160908] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[123:org.eclipse.jetty.util:9.2.19.v20160908] at java.lang. Thread .run( Thread .java:745)[:1.8.0_111] Caused by: java.net.URISyntaxException: Illegal character in path at index 22: http: //localhost:9002/ route at java.net.URI$Parser.fail(URI.java:2848)[:1.8.0_111] at java.net.URI$Parser.checkChars(URI.java:3021)[:1.8.0_111] at java.net.URI$Parser.parseHierarchical(URI.java:3105)[:1.8.0_111] at java.net.URI$Parser.parse(URI.java:3053)[:1.8.0_111] at java.net.URI.<init>(URI.java:588)[:1.8.0_111] at java.net.URI.create(URI.java:850)[:1.8.0_111]

      Camel cxf component does not support white spaces in URL if we use <cxf:rsServer> OR <cxf:Endpoint> tags.

              rhn-support-tasato Tadayoshi Sato
              skumbhar Swapnil Kumbhar (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: