Loader constraint violation when resolving method "org.apache.camel.model.RouteDefinition.enrich

Talend Version          6.3.1

Summary

 Error when deploying route in Runtime
Additional Versions  
Product  
Component  
Problem Description  Deploying a route to Runtime fails with the following exception:
 
java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.camel.model.RouteDefinition.enrich(Ljava/lang/String;Lorg/apache/camel/processor/aggregate/AggregationStrategy;)Lorg/apache/camel/model/ProcessorDefinition;" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, test_project/simple_route_0_1/simple_route, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the method's defining class, org/apache/camel/model/ProcessorDefinition, have different Class objects for the type org/apache/camel/processor/aggregate/AggregationStrategy used in the signature
        at test_project.simple_route_0_1.simple_route.configure(simple_route.java:98)
        at org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:403)
        at org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:343)
        at org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:326)
        at org.apache.camel.impl.DefaultCamelContext$1.call(DefaultCamelContext.java:835)
        at org.apache.camel.impl.DefaultCamelContext$1.call(DefaultCamelContext.java:832)
        at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2873)
        at org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:832)
        at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.installRoutes(AbstractCamelContextFactoryBean.java:909)
        at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.setupRoutes(AbstractCamelContextFactoryBean.java:386)
        at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:334)
Problem root cause  The route contains a custom bean where "camel-core-***.jar" has been added.
Solution or Workaround  
Remove "camel-core-***.jar" from the custom bean (as it's already shipped with the Runtime)
JIRA ticket number  
Version History
Revision #:
1 of 1
Last update:
‎05-17-2017 10:56 PM
Updated by:
 
Labels (1)
Contributors