You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Christoph Läubrich (JIRA)" <ji...@apache.org> on 2014/12/03 21:04:12 UTC

[jira] [Commented] (CAMEL-8119) Camel mess up URIs with encoded &

    [ https://issues.apache.org/jira/browse/CAMEL-8119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14233452#comment-14233452 ] 

Christoph Läubrich commented on CAMEL-8119:
-------------------------------------------

A workaround is using the RAW(...) keyword, but this is a bit messy if one provides a properly encoded URL and it fails that way.

> Camel mess up URIs with encoded &
> ---------------------------------
>
>                 Key: CAMEL-8119
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8119
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.14.0
>            Reporter: Christoph Läubrich
>
> I use the 'recipientList' EIP to create dynmic destination.
> All dynamic options values in the URI are encoded (like username="+encodeURIComponent(username)).
> The problem is when the value contains the & sign, camel do some kind of double decoding the URI and then fails with an obscure message.
> Example (raw) URI passed to the  recipientList smtps://smtp.googlemail.com?username=myuser&password=%26%3F%23O7fxo
> (note: this also happen if the url is a static to="...")
> Exception:
>  Failed to resolve endpoint: smtps://smtp.googlemail.com?%3F%23O7fxo&password=&username=myuser due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{#O7fxo}]
> 	at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:534)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:71)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.util.ExchangeHelper.resolveEndpoint(ExchangeHelper.java:88)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.RecipientListProcessor.resolveEndpoint(RecipientListProcessor.java:223)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.RecipientListProcessor.createProcessorExchangePairs(RecipientListProcessor.java:163)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:208)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:167)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.RecipientList.process(RecipientList.java:120)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)[camel-core-2.13.1.jar:2.13.1]
> 	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)[camel-jms-2.13.1.jar:2.13.1]
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)[spring-jms-3.2.8.RELEASE.jar:3.2.8.RELEASE]
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)[spring-jms-3.2.8.RELEASE.jar:3.2.8.RELEASE]
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)[spring-jms-3.2.8.RELEASE.jar:3.2.8.RELEASE]
> 	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[spring-jms-3.2.8.RELEASE.jar:3.2.8.RELEASE]
> 	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[spring-jms-3.2.8.RELEASE.jar:3.2.8.RELEASE]
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1101)[spring-jms-3.2.8.RELEASE.jar:3.2.8.RELEASE]
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1093)[spring-jms-3.2.8.RELEASE.jar:3.2.8.RELEASE]
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:990)[spring-jms-3.2.8.RELEASE.jar:3.2.8.RELEASE]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_51]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_51]
> 	at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)