Details
-
Bug
-
Resolution: Done
-
Major
-
2.6.0-fuse-01-15
-
None
-
None
Description
Hi,
To resolve SF-339 and MR-438, we created two new variables: exceptionMessageCauseEnabled and faultStackTraceEnabled. Everything is working ok, however, when we try to use a purely URI approach, e.g:
@Override public void configure() throws Exception { errorHandler(noErrorHandler()); getContext().addComponent("my", new MyComponent()); //SJ Setting the new values here doesn't work from( "my://http://localhost:9002/TestMessage?wsdlURL=ship.wsdl" + "&exceptionMessageCauseEnabled=true" + "&faultStackTraceEnabled=true" + "&bus=#cxf" + "&dataFormat=PAYLOAD" + "&portName={http://test}TestSoapEndpoint" + "&serviceName={http://test}TestService").transform( ...
Results in an error:
Error occurred while running main from: org.apache.camel.spring.Main java.lang.reflect.InvocationTargetException 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:597) at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:415) at java.lang.Thread.run(Thread.java:680) Caused by: org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route[[From[my://http://localhost:9002/TestMessage?wsdlURL=s... because of Failed to resolve endpoint: my://http://localhost:9002/TestMessage?bus=%23cxf&dataFormat=PAYLOAD&exceptionMessageCauseEnabled=true faultStackTraceEnabled=true&portName=%7Bhttp%3A%2F%2Ftest%7DTestSoapEndpoint serviceName=%7Bhttp%3A%2F%2Ftest%7DTestService&wsdlURL=ship.wsdl due to: Failed to resolve endpoint: my://http://localhost:9002/TestMessage?bus=%23cxf& dataFormat=PAYLOAD&exceptionMessageCauseEnabled=true& faultStackTraceEnabled=true&portName=%7Bhttp%3A%2F%2Ftest%7DTestSoapEndpoint& serviceName=%7Bhttp%3A%2F%2Ftest%7DTestService&wsdlURL=ship.wsdl due to: There are 2 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=[{exceptionMessageCauseEnabled=true, faultStackTraceEnabled=true}] at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139) at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103) at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:238) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93) at org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:185) at org.apache.camel.spring.Main.doStart(Main.java:139) at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67) at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54) at org.apache.camel.impl.MainSupport.run(MainSupport.java:136) at org.apache.camel.impl.MainSupport.run(MainSupport.java:322) at org.apache.camel.spring.Main.main(Main.java:72) ... [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.camel:camel-maven-plugin:2.6.0-fuse-01-15:run (default-cli) on project CamelError: null: MojoExecutionException: InvocationTargetException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route[[From[my://http://localhost:9002/TestMessage?wsdlURL=s... because of Failed to resolve endpoint: my://http://localhost:9002/TestMessage?bus=%23cxf& dataFormat=PAYLOAD&exceptionMessageCauseEnabled=true& faultStackTraceEnabled=true&portName=%7Bhttp%3A%2F%2Ftest%7DTestSoapEndpoint& serviceName=%7Bhttp%3A%2F%2Ftest%7DTestService&wsdlURL=ship.wsdl due to: Failed to resolve endpoint: my://http://localhost:9002/TestMessage?bus=%23cxf& dataFormat=PAYLOAD&exceptionMessageCauseEnabled=true& faultStackTraceEnabled=true&portName=%7Bhttp%3A%2F%2Ftest%7DTestSoapEndpoint& serviceName=%7Bhttp%3A%2F%2Ftest%7DTestService&wsdlURL=ship.wsdl due to: There are 2 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= [{exceptionMessageCauseEnabled=true, faultStackTraceEnabled=true}] -> [Help 1]
Can you please add them in? To help speed things up, we've attached a test case, "CamelError.zip". It's straightforward to execute:
mvn clean install
mvn camel:run
Kindest regards,
Susan