You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Xueqiang Mi (JIRA)" <ji...@apache.org> on 2009/07/19 05:22:34 UTC

[jira] Created: (CAMEL-1839) can't process the endpoint with "://" schema, like /endpoints/mock://results

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

                 Key: CAMEL-1839
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1839
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-web
            Reporter: Xueqiang Mi
            Assignee: Xueqiang Mi
             Fix For: 2.1.0


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (CAMEL-1839) camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results

Posted by "xueqiang.mi" <al...@gmail.com>.
yup, it can work on such a DSL:
{code}
from("direct:start").to("file://foo?fileName=${header.bar}.txt");
{code}
but when involving some XPath with "//", it may not work. I will modify it
using encoder operation.

btw, when needing the symbol "$" in groovy editor, you should using "\$" to
replace since "$" is a keyword to stand for a variable in groovy.


JIRA jira@apache.org wrote:
> 
> 
>     [
> https://issues.apache.org/activemq/browse/CAMEL-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52866#action_52866
> ] 
> 
> Claus Ibsen commented on CAMEL-1839:
> ------------------------------------
> 
> Xueqiang you might want to try with an endpoint URI that is a bit more
> _nasty_ such as a file endpoint that can contain ${ } placeholders. To see
> if it can be renedered correctly, I added a TODO in the source code where
> you may need to use the safe encoder for that.
> 
> For instance try with this and see how it renders in the web console
> {code}
> from("direct:start").to("file://foo?fileName=${header.bar}.txt");
> {code}
> 
>> camel-web can't process the endpoint with "://" schema, like
>> /endpoints/mock://results
>> --------------------------------------------------------------------------------------
>>
>>                 Key: CAMEL-1839
>>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1839
>>             Project: Apache Camel
>>          Issue Type: Bug
>>          Components: camel-web
>>    Affects Versions: 2.0-M2
>>            Reporter: Xueqiang Mi
>>            Assignee: Claus Ibsen
>>            Priority: Minor
>>             Fix For: 2.0.0
>>
>>         Attachments: camel-1839.patch
>>
>>
>> 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
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-jira--Created%3A-%28CAMEL-1839%29-can%27t-process-the-endpoint-with-%22%3A--%22-schema%2C-like--endpoints-mock%3A--results-tp24553792p24554685.html
Sent from the Camel Development mailing list archive at Nabble.com.


[jira] Updated: (CAMEL-1839) camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results

Posted by "Xueqiang Mi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xueqiang Mi updated CAMEL-1839:
-------------------------------

    Attachment: camel-1839.patch

> camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1839
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1839
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-web
>    Affects Versions: 2.0-M1, 2.0-M2, 2.0.0, 2.1.0
>            Reporter: Xueqiang Mi
>            Assignee: Xueqiang Mi
>         Attachments: camel-1839.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1839) camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results

Posted by "Xueqiang Mi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52864#action_52864 ] 

Xueqiang Mi commented on CAMEL-1839:
------------------------------------

Only let the endpointLink to generate an old endpoint URI without "//" to render the URL for requesting a endpoint now.

> camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1839
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1839
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-web
>    Affects Versions: 2.0-M1, 2.0-M2, 2.0.0, 2.1.0
>            Reporter: Xueqiang Mi
>            Assignee: Xueqiang Mi
>         Attachments: camel-1839.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1839) camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52867#action_52867 ] 

Claus Ibsen commented on CAMEL-1839:
------------------------------------

I also upgraded to latest Jersey release 1.1.1-ea. 

> camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1839
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1839
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-web
>    Affects Versions: 2.0-M2
>            Reporter: Xueqiang Mi
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: camel-1839.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1839) camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1839:
-------------------------------

             Priority: Minor  (was: Major)
    Affects Version/s:     (was: 2.0-M1)
                           (was: 2.1.0)
                           (was: 2.0.0)
        Fix Version/s: 2.0.0
             Assignee: Claus Ibsen  (was: Xueqiang Mi)

trunk: 795483.



> camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1839
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1839
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-web
>    Affects Versions: 2.0-M2
>            Reporter: Xueqiang Mi
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: camel-1839.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1839) camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52866#action_52866 ] 

Claus Ibsen commented on CAMEL-1839:
------------------------------------

Xueqiang you might want to try with an endpoint URI that is a bit more _nasty_ such as a file endpoint that can contain ${ } placeholders. To see if it can be renedered correctly, I added a TODO in the source code where you may need to use the safe encoder for that.

For instance try with this and see how it renders in the web console
{code}
from("direct:start").to("file://foo?fileName=${header.bar}.txt");
{code}

> camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1839
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1839
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-web
>    Affects Versions: 2.0-M2
>            Reporter: Xueqiang Mi
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: camel-1839.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1839) camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results

Posted by "Xueqiang Mi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xueqiang Mi updated CAMEL-1839:
-------------------------------

    Affects Version/s: 2.1.0
                       2.0.0
                       2.0-M1
                       2.0-M2
        Fix Version/s: 2.0-M2
              Summary: camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results  (was: can't process the endpoint with "://" schema, like /endpoints/mock://results)

> camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1839
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1839
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-web
>    Affects Versions: 2.0-M1, 2.0-M2, 2.0.0, 2.1.0
>            Reporter: Xueqiang Mi
>            Assignee: Xueqiang Mi
>             Fix For: 2.0-M2, 2.1.0
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-1839) camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results

Posted by "Xueqiang Mi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xueqiang Mi resolved CAMEL-1839.
--------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.0-M2)
                       (was: 2.1.0)

> camel-web can't process the endpoint with "://" schema, like /endpoints/mock://results
> --------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1839
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1839
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-web
>    Affects Versions: 2.0-M1, 2.0-M2, 2.0.0, 2.1.0
>            Reporter: Xueqiang Mi
>            Assignee: Xueqiang Mi
>         Attachments: camel-1839.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.