You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by neilac333 <ne...@soteradefense.com> on 2012/12/17 18:49:14 UTC

Camel Compatibility With Restlet

I am attempting to integrate Camel and Restlet, and I have followed the
instructions carefully. However, when I deploy I get this

java.lang.NoSuchMethodError:
org.restlet.Server.<init>(Lorg/restlet/Context;Lorg/restlet/data/Protocol;I)V
	at
org.apache.camel.component.restlet.RestletComponent.createServer(RestletComponent.java:193)
	at
org.apache.camel.component.restlet.RestletComponent.addServerIfNecessary(RestletComponent.java:202)
	at
org.apache.camel.component.restlet.RestletComponent.connect(RestletComponent.java:134)
	at
org.apache.camel.component.restlet.RestletEndpoint.connect(RestletEndpoint.java:86)
	at
org.apache.camel.component.restlet.RestletConsumer.doStart(RestletConsumer.java:76)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
	at
org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1763)
	at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2054)
	at
org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:1990)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1918)
.
.
.

Which makes it seem like the Camel RestletComponent was compiled with a
different version of Restlet than what I got going on. 

Here is my pom:

<dependency>
            <groupId>${camel.group}</groupId>
            <artifactId>camel-restlet</artifactId>
            <version>2.10.2</version>
        </dependency>
        <dependency>
            <groupId>org.restlet.jee</groupId>
            <artifactId>org.restlet.ext.spring</artifactId>
            <version>2.0.14</version>
</dependency>

Any thoughts on the compatibility issue? Help is appreciated.

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Compatibility-With-Restlet-tp5724249.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Compatibility With Restlet

Posted by Matthias Lüneberg <ma...@googlemail.com>.
Hi,

I'm no expert with camel-restlet component, but normally you don't need the explicit dependency for the "org.restlet.ext.spring" in your pom. I think you can remove:

>        <dependency>
>            <groupId>org.restlet.jee</groupId>
>            <artifactId>org.restlet.ext.spring</artifactId>
>            <version>2.0.14</version>
> </dependency>

The "camel-restlet" dependency should automatically add the correct dependency and version for "camel-restlet" to work.

HTH,
Matthias

Am 17.12.2012 um 18:49 schrieb neilac333 <ne...@soteradefense.com>:

> I am attempting to integrate Camel and Restlet, and I have followed the
> instructions carefully. However, when I deploy I get this
> 
> java.lang.NoSuchMethodError:
> org.restlet.Server.<init>(Lorg/restlet/Context;Lorg/restlet/data/Protocol;I)V
> 	at
> org.apache.camel.component.restlet.RestletComponent.createServer(RestletComponent.java:193)
> 	at
> org.apache.camel.component.restlet.RestletComponent.addServerIfNecessary(RestletComponent.java:202)
> 	at
> org.apache.camel.component.restlet.RestletComponent.connect(RestletComponent.java:134)
> 	at
> org.apache.camel.component.restlet.RestletEndpoint.connect(RestletEndpoint.java:86)
> 	at
> org.apache.camel.component.restlet.RestletConsumer.doStart(RestletConsumer.java:76)
> 	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
> 	at
> org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1763)
> 	at
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2054)
> 	at
> org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:1990)
> 	at
> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1918)
> .
> .
> .
> 
> Which makes it seem like the Camel RestletComponent was compiled with a
> different version of Restlet than what I got going on. 
> 
> Here is my pom:
> 
> <dependency>
>            <groupId>${camel.group}</groupId>
>            <artifactId>camel-restlet</artifactId>
>            <version>2.10.2</version>
>        </dependency>
>        <dependency>
>            <groupId>org.restlet.jee</groupId>
>            <artifactId>org.restlet.ext.spring</artifactId>
>            <version>2.0.14</version>
> </dependency>
> 
> Any thoughts on the compatibility issue? Help is appreciated.
> 
> Thanks.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Compatibility-With-Restlet-tp5724249.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Compatibility With Restlet

Posted by Christian Müller <ch...@gmail.com>.
Use Maven:

Christian-Muellers-MacBook-Pro:camel-restlet cmueller$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]

[INFO]
------------------------------------------------------------------------
[INFO] Building Camel :: Restlet 2.10.2
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.4:tree (default-cli) @ camel-restlet
---
[INFO] org.apache.camel:camel-restlet:bundle:2.10.2
[INFO] +- org.apache.camel:camel-core:jar:2.10.2:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.6.6:compile
[INFO] +- org.restlet.jse:org.restlet:jar:2.0.14:compile
[INFO] |  \- org.osgi:org.osgi.core:jar:4.2.0:compile (version managed from
4.0.0)
[INFO] +- org.apache.camel:camel-test-spring:jar:2.10.2:test
[INFO] |  +- org.apache.camel:camel-test:jar:2.10.2:test
[INFO] |  \- org.apache.camel:camel-spring:jar:2.10.2:test
[INFO] |     +- org.springframework:spring-context:jar:3.0.7.RELEASE:test
[INFO] |     |  +- org.springframework:spring-beans:jar:3.0.7.RELEASE:test
[INFO] |     |  +- org.springframework:spring-core:jar:3.0.7.RELEASE:test
[INFO] |     |  +-
org.springframework:spring-expression:jar:3.0.7.RELEASE:test
[INFO] |     |  \- org.springframework:spring-asm:jar:3.0.7.RELEASE:test
[INFO] |     +- org.springframework:spring-aop:jar:3.0.7.RELEASE:test
[INFO] |     |  \- aopalliance:aopalliance:jar:1.0:test
[INFO] |     \- org.springframework:spring-tx:jar:3.0.7.RELEASE:test
[INFO] +- org.apache.camel:camel-jetty:jar:2.10.2:test
[INFO] |  +- org.apache.camel:camel-http:jar:2.10.2:test
[INFO] |  |  \- commons-httpclient:commons-httpclient:jar:3.1:test
[INFO] |  +-
org.apache.geronimo.specs:geronimo-servlet_2.5_spec:jar:1.1.2:test
[INFO] |  +- org.eclipse.jetty:jetty-server:jar:7.5.4.v20111024:test
[INFO] |  |  +- javax.servlet:servlet-api:jar:2.5:test
[INFO] |  |  +-
org.eclipse.jetty:jetty-continuation:jar:7.5.4.v20111024:test
[INFO] |  |  \- org.eclipse.jetty:jetty-http:jar:7.5.4.v20111024:test
[INFO] |  |     \- org.eclipse.jetty:jetty-io:jar:7.5.4.v20111024:test
[INFO] |  +- org.eclipse.jetty:jetty-security:jar:7.5.4.v20111024:test
[INFO] |  +- org.eclipse.jetty:jetty-servlet:jar:7.5.4.v20111024:test
[INFO] |  +- org.eclipse.jetty:jetty-servlets:jar:7.5.4.v20111024:test
[INFO] |  |  \- org.eclipse.jetty:jetty-util:jar:7.5.4.v20111024:test
[INFO] |  +- org.eclipse.jetty:jetty-client:jar:7.5.4.v20111024:test
[INFO] |  \- org.eclipse.jetty:jetty-jmx:jar:7.5.4.v20111024:test
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.1.3:test
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.1.4:test
[INFO] |  +- commons-logging:commons-logging:jar:1.1.1:test
[INFO] |  \- commons-codec:commons-codec:jar:1.4:test
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.6.6:test
[INFO] |  \- log4j:log4j:jar:1.2.17:test
[INFO] +- junit:junit:jar:4.10:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] \- org.springframework:spring-test:jar:3.0.7.RELEASE:test

This means restlet 2.0.14 is the right version. Make sure you don't have
any other versions in your classpath.

Best,
Christian

On Mon, Dec 17, 2012 at 6:49 PM, neilac333 <neil.chaudhuri@soteradefense.com
> wrote:

> I am attempting to integrate Camel and Restlet, and I have followed the
> instructions carefully. However, when I deploy I get this
>
> java.lang.NoSuchMethodError:
>
> org.restlet.Server.<init>(Lorg/restlet/Context;Lorg/restlet/data/Protocol;I)V
>         at
>
> org.apache.camel.component.restlet.RestletComponent.createServer(RestletComponent.java:193)
>         at
>
> org.apache.camel.component.restlet.RestletComponent.addServerIfNecessary(RestletComponent.java:202)
>         at
>
> org.apache.camel.component.restlet.RestletComponent.connect(RestletComponent.java:134)
>         at
>
> org.apache.camel.component.restlet.RestletEndpoint.connect(RestletEndpoint.java:86)
>         at
>
> org.apache.camel.component.restlet.RestletConsumer.doStart(RestletConsumer.java:76)
>         at
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
>         at
>
> org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1763)
>         at
>
> org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:2054)
>         at
>
> org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:1990)
>         at
>
> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1918)
> .
> .
> .
>
> Which makes it seem like the Camel RestletComponent was compiled with a
> different version of Restlet than what I got going on.
>
> Here is my pom:
>
> <dependency>
>             <groupId>${camel.group}</groupId>
>             <artifactId>camel-restlet</artifactId>
>             <version>2.10.2</version>
>         </dependency>
>         <dependency>
>             <groupId>org.restlet.jee</groupId>
>             <artifactId>org.restlet.ext.spring</artifactId>
>             <version>2.0.14</version>
> </dependency>
>
> Any thoughts on the compatibility issue? Help is appreciated.
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Compatibility-With-Restlet-tp5724249.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--