You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by nprajeshgowda <np...@gmail.com> on 2013/05/08 16:51:30 UTC

Re: Using % sign in spring route sql select fails

Hi Claus Ibsen ,

we are using Camel version 2.9 in our first version of our product. In the
latest version of our product we are using Camel 2.10 and the problem  is
not seen.

But need your help in finding a patch or workaround solution to Camel 2.9.

Is there any workaround by which we can allow user to give % in the URI ?


Br,
Rajesh



--
View this message in context: http://camel.465427.n5.nabble.com/Using-sign-in-spring-route-sql-select-fails-tp5714171p5732192.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using % sign in spring route sql select fails

Posted by nprajeshgowda <np...@gmail.com>.
Hi,

   i used the encoding, but still have some issue. Rather my problem is
little different.

   Let me take you through. so that you would be able to suggest me..


   We have camel routes defined as following, the "ana" is 

   from(JmsQNames.GETUSER + comURI + getUserQueueProps)
		.routeId(JmsQNames.DM_GETALLME + comURI)
		.beanRef("getUser")
		.*to("customEndPoint://" + hostname +
"?user="+user+"&password="+password)*
		.beanRef("getUser", "extract('" + comURI + "')")
		.transform(body());

Where in the property 'password' is being fed from karaf property *.cfg file
, in the cfg file i have input as 

Admin%25, then the value to my bean comes as Admin%, this worked fine. But
when the routes are getting constructed then there is the problem the
"to("customEndPoint://" + hostname + "?user="+user+"&password="+password)"
is throwing the error. 

    Caused by: org.apache.camel.FailedToCreateRouteException: Failed to
create route jmsvm:queue:getUser_net://net:1 at: >>>
To[customEndPoint://10.56.22.25?user=root&password=Admin123%] <<< in route:
Route[[From[jmsvm:queue:getUser_net://net:1?co... because of Failed to
resolve endpoint: ana://10.56.22.25?user=root&password=Admin123% due to:
Malformed escape pair at index 45:
ana://10.56.22.25?user=root&password=Admin123%

Cheers,
Rajesh



--
View this message in context: http://camel.465427.n5.nabble.com/Using-sign-in-spring-route-sql-select-fails-tp5714171p5732261.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using % sign in spring route sql select fails

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Use %25 as shown at:
http://en.wikipedia.org/wiki/URL_encode

On Wed, May 8, 2013 at 4:51 PM, nprajeshgowda <np...@gmail.com> wrote:
> Hi Claus Ibsen ,
>
> we are using Camel version 2.9 in our first version of our product. In the
> latest version of our product we are using Camel 2.10 and the problem  is
> not seen.
>
> But need your help in finding a patch or workaround solution to Camel 2.9.
>
> Is there any workaround by which we can allow user to give % in the URI ?
>
>
> Br,
> Rajesh
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Using-sign-in-spring-route-sql-select-fails-tp5714171p5732192.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen