You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Pawan Mundhra (Jira)" <ji...@apache.org> on 2021/02/21 08:51:00 UTC
[jira] [Created] (CAMEL-16243) camel-restlet : Compatibility issue
of camel-restlet with camel-api library resulting in e
"NoSuchMethodError:org.apache.camel.CamelContext.getRestConfiguration(Ljava/lang/String;Z)Lorg/apache/camel/spi/RestConfiguration"
in RestletComponent class
Pawan Mundhra created CAMEL-16243:
-------------------------------------
Summary: camel-restlet : Compatibility issue of camel-restlet with camel-api library resulting in e "NoSuchMethodError:org.apache.camel.CamelContext.getRestConfiguration(Ljava/lang/String;Z)Lorg/apache/camel/spi/RestConfiguration" in RestletComponent class
Key: CAMEL-16243
URL: https://issues.apache.org/jira/browse/CAMEL-16243
Project: Camel
Issue Type: Bug
Components: camel-restlet
Environment: Open JDK 11.0.2
Reporter: Pawan Mundhra
Fix For: 3.x
Recently we upgraded our Application's overall camel version from 2.16.0 to 3.4.4
One of the component we used in our Application was camel-restlet component (version 2.16.0).
Issue #1 : It seems camel removed the restlet component after 3.x. Could not find much documentation which would let us know how to migrate the existing camel-restlet component
Issue #2 : We gave a try to upgrade the camel-restlet component to 3.0.0-RC2. But during start-up of our service, we faced an error as mentioned in the below stack trace.
{code:java}
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.camel.CamelContext.getRestConfiguration(Ljava/lang/String;Z)Lorg/apache/camel/spi/RestConfiguration;
at org.apache.camel.component.restlet.RestletComponent.doStart(RestletComponent.java:215)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3026)
at org.apache.camel.impl.engine.AbstractCamelContext.startServices(AbstractCamelContext.java:3032)
at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2759)
at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2658)
at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2621)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2453)
at com.nri.csd.inf.console.service.GatewayService.startCamelContextIfNotStarted(GatewayService.java:201)
at com.nri.csd.inf.console.service.GatewayService.postStart(GatewayService.java:100)
at com.nri.csd.inf.console.service.AbstractLaunchableService.start(AbstractLaunchableService.java:216)
at com.nri.csd.inf.console.ConsoleLauncher.main(ConsoleLauncher.java:96)
{code}
Found in the code that RestletComponent java class in camel-restlet-3.0.0-RC2 version has an API doStart() in which at line 215, there is a call to CamelContext class's method getRestConfiguration("restlet", true) (clas sin camel-api jar). This API seems to be removed by Camel during upgradation of camel-api to 3.2 from 3.1.
Refer this [https://camel.apache.org/manual/latest/camel-3x-upgrade-guide-3_2.html]
It seems that there is incompatibility with camel-restlet 3.0.0-RC2 along with Camel 3.2 and above.
One solution I can think of is revert the downgrade the Camel version to 3.1 instead of 3.4 which we would like to avoid.
Please suggest what course of action can be taken for this issue with minimum impact or what is the compatibility of camel-restlet and other camel components.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)