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

camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-M2
    • Fix Version/s: 2.0-M3
    • Component/s: camel-web
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      After improving the endpoint URI schema on http://issues.apache.org/activemq/browse/CAMEL-1756, camel-web's endpoint request URL is changed from http://localhost:8080/endpoints/mock:results into http://localhost:8080/endpoints/mock://results while "//" is a separator for URL, so camel-web will use only the "mock:" to get the expected endpoint, which will throw an exception:
      org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: mock: due to: Expected scheme-specific part at index 5: mock:
      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:367)
      at org.apache.camel.web.resources.EndpointsResource.getEndpoint(EndpointsResource.java:75)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.invokeSubLocator(SubLocatorRule.java:135)
      at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:89)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
      at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:105)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
      at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
      at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
      at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:654)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:612)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:603)
      at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:309)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:425)
      at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:737)
      at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:689)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
      at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
      at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      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:535)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
      at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
      Caused by: java.net.URISyntaxException: Expected scheme-specific part at index 5: mock:
      at java.net.URI$Parser.fail(URI.java:2816)
      at java.net.URI$Parser.failExpecting(URI.java:2822)
      at java.net.URI$Parser.parse(URI.java:3025)
      at java.net.URI.<init>(URI.java:578)
      at org.apache.camel.util.URISupport.normalizeUri(URISupport.java:354)
      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:365)
      ... 39 more

        Attachments

        1. camel-1839.patch
          0.6 kB
          Xueqiang Mi

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              xueqiang.mi Xueqiang Mi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: