Quantcast

Karaf 3.0.3 with Camel 2.15.2 can't handle spaces in URI

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Karaf 3.0.3 with Camel 2.15.2 can't handle spaces in URI

hasikada
Hello,

Currently I use Camel 2.11.0 and Karaf 2.3.1 to build enterprise service bus project. The ESB provides REST API.
I upgraded successfully to Camel 2.15.2 and Karaf 3.0.3, I've tried also Karaf 2.4.2.

I get following exception when invoking a REST service by URI with a space:

2015-06-11 12:07:10,284 | WARN  | qtp1521188442-54 | ServletHandler                   | 90 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 | /rest/test/1st Test/TestAddTest
java.lang.IllegalArgumentException: Illegal character in path at index 39: http://localhost:8080/rest/test/1st Test/TestAddTest
        at java.net.URI.create(URI.java:859)[:1.7.0_72]
        at org.apache.cxf.transport.servlet.BaseUrlHelper.getBaseURL(BaseUrlHelper.java:48)[104:org.apache.cxf.cxf-rt-transports-http:3.0.4]
        at org.apache.cxf.transport.servlet.ServletController.getBaseURL(ServletController.java:74)[104:org.apache.cxf.cxf-rt-transports-http:3.0.4]
        at org.apache.cxf.transport.servlet.ServletController.updateDestination(ServletController.java:83)[104:org.apache.cxf.cxf-rt-transports-http:3.0.4]
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:207)[104:org.apache.cxf.cxf-rt-transports-http:3.0.4]
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)[104:org.apache.cxf.cxf-rt-transports-http:3.0.4]
        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)[104:org.apache.cxf.cxf-rt-transports-http:3.0.4]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:293)[104:org.apache.cxf.cxf-rt-transports-http:3.0.4]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:212)[104:org.apache.cxf.cxf-rt-transports-http:3.0.4]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)[86:org.apache.geronimo.specs.geronimo-servlet_3.0_spec:1.0.0]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:268)[104:org.apache.cxf.cxf-rt-transports-http:3.0.4]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:69)[99:org.ops4j.pax.web.pax-web-jetty:3.1.4]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:240)[99:org.ops4j.pax.web.pax-web-jetty:3.1.4]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:75)[99:org.ops4j.pax.web.pax-web-jetty:3.1.4]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.server.Server.handleAsync(Server.java:410)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:519)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[90:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at java.lang.Thread.run(Thread.java:745)[:1.7.0_72]
Caused by: java.net.URISyntaxException: Illegal character in path at index 39: http://localhost:8080/rest/test/1st Test/TestAddTest
        at java.net.URI$Parser.fail(URI.java:2829)[:1.7.0_72]
        at java.net.URI$Parser.checkChars(URI.java:3002)[:1.7.0_72]
        at java.net.URI$Parser.parseHierarchical(URI.java:3086)[:1.7.0_72]
        at java.net.URI$Parser.parse(URI.java:3034)[:1.7.0_72]
        at java.net.URI.<init>(URI.java:595)[:1.7.0_72]
        at java.net.URI.create(URI.java:857)[:1.7.0_72]
        ... 36 more

I couldn't find any hint, or configuration of karaf, jetty, cxf, etc.

Please, any idea?

Adam


Loading...