You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by owain <ow...@integration.technology> on 2016/10/11 12:00:19 UTC

Camel 2.17.0 Jetty9 Test failing

Hi,

Has anyone had any luck testing the Rest DSL Jetty.  I have moved to
2.17.0.redhat-630187 since that's the version that ships with the newly
released Fuse 6.3.  I see from the release notes that by default it uses
Jetty9.  As far as I am aware my test is using Jetty9 but I keep getting the
following exception.

java.lang.NoSuchMethodError:
org.apache.camel.component.jetty.JettyHttpComponent.setProperties(Lorg/apache/camel/CamelContext;Ljava/lang/Object;Ljava/util/Map;)V

The full stack trace is:

java.lang.NoSuchMethodError:
org.apache.camel.component.jetty.JettyHttpComponent.setProperties(Lorg/apache/camel/CamelContext;Ljava/lang/Object;Ljava/util/Map;)V

	at
org.apache.camel.component.jetty.JettyHttpComponent.doCreateConsumer(JettyHttpComponent.java:1094)
	at
org.apache.camel.component.jetty.JettyHttpComponent.createConsumer(JettyHttpComponent.java:992)
	at
org.apache.camel.component.rest.RestEndpoint.createConsumer(RestEndpoint.java:311)
	at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:69)
	at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:98)
	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:158)
	at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3490)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3420)
	at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3197)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3053)
	at
org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
	at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2848)
	at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2844)
	at
org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2867)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2844)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2813)
	at
org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:185)
	at
org.apache.camel.test.blueprint.CamelBlueprintTestSupport.setUp(CamelBlueprintTestSupport.java:252)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
	at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
	at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)

When I run the IDEA debugger and put a breakpoint in at 1094 in
JettyHttpComponent I can see the call 

setProperties(camelContext, endpoint, parameters);

with the arguments in error (underlined in Red).  It is complaining that
setProperties in class DefaultComponent is just expecting an Object as a
parameter not the three being sent.

It feels as though I have misconfigured something in my Pom.  The effective
Pom has this for Jetty.

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-jetty</artifactId>
      <version>2.17.0.redhat-630187</version>
      <scope>compile</scope>
    </dependency>

Thanks for any help.

O.





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-2-17-0-Jetty9-Test-failing-tp5788598.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel 2.17.0 Jetty9 Test failing

Posted by owain <ow...@integration.technology>.
Redhat support case 01719112 opened.  No drop down for Fuse 6.3 yet in their
support portal.  I have will have a play with upstream to see if I can
replicate.




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-2-17-0-Jetty9-Test-failing-tp5788598p5788622.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel 2.17.0 Jetty9 Test failing

Posted by owain <ow...@integration.technology>.
Tom,

You are quite correct.  It is a Red Hat build and I will raise a support
request with them.  

O.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-2-17-0-Jetty9-Test-failing-tp5788598p5788621.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel 2.17.0 Jetty9 Test failing

Posted by Tomohisa Igarashi <tm...@gmail.com>.
Hi,

If you're using redhat version of camel (2.17.0.redhat-630187), then you need to ask Red Hat about it. If you want to use community version of camel, then you need to specify 2.17.0 instead of 2.17.0.redhat-630187 in the POM.

Thanks,
Tomo

On 10/11/2016 09:00 PM, owain wrote:
> Hi,
>
> Has anyone had any luck testing the Rest DSL Jetty.  I have moved to
> 2.17.0.redhat-630187 since that's the version that ships with the newly
> released Fuse 6.3.  I see from the release notes that by default it uses
> Jetty9.  As far as I am aware my test is using Jetty9 but I keep getting the
> following exception.
>
> java.lang.NoSuchMethodError:
> org.apache.camel.component.jetty.JettyHttpComponent.setProperties(Lorg/apache/camel/CamelContext;Ljava/lang/Object;Ljava/util/Map;)V
>
> The full stack trace is:
>
> java.lang.NoSuchMethodError:
> org.apache.camel.component.jetty.JettyHttpComponent.setProperties(Lorg/apache/camel/CamelContext;Ljava/lang/Object;Ljava/util/Map;)V
>
> 	at
> org.apache.camel.component.jetty.JettyHttpComponent.doCreateConsumer(JettyHttpComponent.java:1094)
> 	at
> org.apache.camel.component.jetty.JettyHttpComponent.createConsumer(JettyHttpComponent.java:992)
> 	at
> org.apache.camel.component.rest.RestEndpoint.createConsumer(RestEndpoint.java:311)
> 	at
> org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:69)
> 	at
> org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:98)
> 	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:158)
> 	at
> org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3490)
> 	at
> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3420)
> 	at
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3197)
> 	at
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3053)
> 	at
> org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
> 	at
> org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2848)
> 	at
> org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2844)
> 	at
> org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2867)
> 	at
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2844)
> 	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
> 	at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2813)
> 	at
> org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:185)
> 	at
> org.apache.camel.test.blueprint.CamelBlueprintTestSupport.setUp(CamelBlueprintTestSupport.java:252)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> 	at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> 	at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> 	at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> 	at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> 	at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> 	at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> 	at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
> 	at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
> 	at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
> 	at
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
>
> When I run the IDEA debugger and put a breakpoint in at 1094 in
> JettyHttpComponent I can see the call
>
> setProperties(camelContext, endpoint, parameters);
>
> with the arguments in error (underlined in Red).  It is complaining that
> setProperties in class DefaultComponent is just expecting an Object as a
> parameter not the three being sent.
>
> It feels as though I have misconfigured something in my Pom.  The effective
> Pom has this for Jetty.
>
>     <dependency>
>       <groupId>org.apache.camel</groupId>
>       <artifactId>camel-jetty</artifactId>
>       <version>2.17.0.redhat-630187</version>
>       <scope>compile</scope>
>     </dependency>
>
> Thanks for any help.
>
> O.
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-2-17-0-Jetty9-Test-failing-tp5788598.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>