我不知道缺少哪个库来包含Camel RESTlet组件。包含了来自restlet-jse-2.1.2的camel-restlet-2.11.1.jar和org.restlet.jar,但是我得到了
2013-07-12 09:37:28,021 [main ] ERROR ContextLoader - Context initialization failed
java.lang.NoSuchMethodError: org.restlet.routing.VirtualHost.attach(Ljava/lang/String;Lorg/restlet/Restlet;)Lorg/restlet/routing/Route;
at org.apache.camel.component.restlet.RestletComponent.attachUriPatternToRestlet(RestletComponent.java:300)[camel-restlet-2.11.0.jar:2.11.0]
at org.apache.camel.component.restlet.RestletComponent.connect(RestletComponent.java:139)[camel-restlet-2.11.0.jar:2.11.0]
at org.apache.camel.component.restlet.RestletEndpoint.connect(RestletEndpoint.java:86)[camel-restlet-2.11.0.jar:2.11.0]据报道,here也有类似的问题,但没有回答这个问题。
发布于 2013-07-12 22:26:48
camel-restlet版本2.11.1需要restlet 2.0.15,但您已经包含了restlet 2.1。我确信两者之间存在API差异,尽管很难找到针对2.0的Restlet javadoc,因此我不能确认:
org.restlet.routing.VirtualHost.attach(Ljava/lang/String;Lorg/restlet/Restlet;)Lorg/restlet/routing/Route;
并不存在。
https://stackoverflow.com/questions/17616461
复制相似问题