You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by dermoritz <ta...@hotmail.com> on 2015/11/03 18:49:34 UTC

Rest with restlet works within eclipse but fails on command line

I created a little camel app that creates some rest endpoints. If i run the
main method from within eclipse all is fine:

[main] INFO org.apache.camel.impl.DefaultCamelContext - Route: route3
started and consuming from:
Endpoint[http://localhost:8082/hello/(para)?restletMethods=GET]
[main] INFO org.apache.camel.impl.DefaultCamelContext - Route: route4
started and consuming from:
Endpoint[http://localhost:8082/count?restletMethods=GET]
[main] INFO org.apache.camel.impl.DefaultCamelContext - Route: route5
started and consuming from:
Endpoint[http://localhost:8082/delete?restletMethods=GET]

but if i run the main method from cli (jar with dependencies) i get this
exception:

Exception in thread "main" org.apache.camel.ResolveEndpointFailedException:
Failed to resolve endpoint:
restlet://http://localhost:8082/hello/%7Bpara%7D?restletMethod=GET due to:
Could not find a suitable setter for property: restletMethod as there isn't
a setter method with same type: java.lang.String nor type conversion
possible: No type converter available to convert from type: java.lang.String
to the required type: org.restlet.data.Method with value GET
...
Caused by: java.lang.IllegalArgumentException: Could not find a suitable
setter for property: restletMethod as there isn't a setter method with same
type: java.lang.String nor type conversion possible: No type converter
available to convert from type: java.lang.String to the required type:
org.restlet.data.Method with value GET

What could possibly went wrong here?



--
View this message in context: http://camel.465427.n5.nabble.com/Rest-with-restlet-works-within-eclipse-but-fails-on-command-line-tp5773357.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Rest with restlet works within eclipse but fails on command line

Posted by dermoritz <ta...@hotmail.com>.
i solved this problem by not packaging an über-jar with maven-shade or
maven-assembly (jar with all dependencies inside). Now i pack all
dependencies in separate lib folder and it is working - don't ask why.



--
View this message in context: http://camel.465427.n5.nabble.com/Rest-with-restlet-works-within-eclipse-but-fails-on-command-line-tp5773357p5773369.html
Sent from the Camel - Users mailing list archive at Nabble.com.