I am using JDK 11, apache camel 3.4.0 and WildFly 20.0.1.Final and have following error in the wildfly console.
10:39:19,982 ERROR [com.interfaces.processors.common.GarbageProcessor] (default task-1) process().EXCEPTION_CAUGHT : CamelExceptionCaught | EXCEPTION_HANDLED : CamelExceptionHandled
10:39:19,983 INFO [com.utility.util.IntegrationUtility] (default task-1) generateErrorResponse().detailedTrace : [email protected]//org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:47)
[email protected]//org.apache.camel.support.DefaultExchange.setException(DefaultExchange.java:425)
[email protected]//org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:170)
[email protected]//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702)
[email protected]//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616)
[email protected]//org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
[email protected]//org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
[email protected]//org.apache.camel.processor.Pipeline.process(Pipeline.java:147)
[email protected]//org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286)
[email protected]//org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:66)
[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:212)
[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:110)
[email protected]//org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)
[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:107)
[email protected]//org.apache.camel.impl.engine.DefaultProducerCache.send(DefaultProducerCache.java:185)
[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)
[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)
[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:413)
deployment.-integration-services.war//com.integration.services.ep.IntegrationServices.getEndpointService(IntegrationServices.java:165)
deployment.-integration-services.war//com.integration.services.ep.IntegrationServices$Proxy$_$$_WeldSubclass.getEndpointService$$super(Unknown Source)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:566)
[email protected]//org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:51)
10:39:19,988 ERROR [com.utility.util.IntegrationUtility] (default task-1) process().errorResponseBody : {"Success":false,"RESULT":{"condition":"bad"},"Exception":{"message":"org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-Mihan-Dev-1607317759951-0-1]","causedBy":"java.lang.NoClassDefFoundError: org/apache/camel/tooling/model/ComponentModel","detailedTrace":"[email protected]//org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:47)\n\[email protected]//org.apache.camel.support.DefaultExchange.setException(DefaultExchange.java:425)\n\[email protected]//org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:170)\n\[email protected]//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702)\n\[email protected]//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616)\n\[email protected]//org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)\n\[email protected]//org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)\n\[email protected]//org.apache.camel.processor.Pipeline.process(Pipeline.java:147)\n\[email protected]//org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286)\n\[email protected]//org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:66)\n\[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:212)\n\[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:110)\n\[email protected]//org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)\n\[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:107)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerCache.send(DefaultProducerCache.java:185)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:413)\n\tdeployment.-integration-services.war//com.integration.services.ep.IntegrationServices.getEndpointService(IntegrationServices.java:165)\n\tdeployment.-integration-services.war//com.integration.services.ep.IntegrationServices$Proxy$_$$_WeldSubclass.getEndpointService$$super(Unknown Source)\n\tjava.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tjava.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tjava.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tjava.base/java.lang.reflect.Method.invoke(Method.java:566)\n\[email protected]//org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:51)\n\t... 419 more"},"OUTPUTS":{"FAILURE_REASON":"org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-Mihan-Dev-1607317759951-0-1], causedBy java.lang.NoClassDefFoundError: org/apache/camel/tooling/model/ComponentModel"}}
10:39:20,952 INFO [org.camunda.feel.FeelEngine] (default task-1) Engine created. [value-mapper: CompositeValueMapper(List(org.camunda.feel.impl.JavaValueMapper@5f8ab78f)), function-provider: org.camunda.bpm.dmn.feel.impl.scala.function.CustomFunctionTransformer@25a6e2c5, clock: SystemClock, configuration: Configuration(false)]
10:39:22,104 INFO [ERROR] (default task-1) Exchange[Id: ID-Mihan-Dev-1607317759951-0-2, ExchangePattern: InOnly, Properties: {CamelExceptionCaught=org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID--Dev-1607317759951-0-2], CamelFailureEndpoint=direct://groovy, CamelFailureRouteId=route4, CamelFatalFallbackErrorHandler=[route4], CamelFilterMatched=true, CamelToEndpoint=log://ERROR?showAll=true}, Headers: {clientId=, configData={"messageId":"pingTestOutputJSON_assessor","groovyFile":"pingTestExecutor/pingTestOutputJSON#MDSL_assessor.gsh","fieldMaps":[{"id":35,"inputFields":[{"id":62,"name":"summary","fromJsonField":"RESULT.detail.summary","type":"string"}],"fieldMapType":"RES"},{"id":36,"name":"INPUTS","inputFields":[{"id":63,"name":"token","fromJsonField":"INPUTS.TOKEN","type":"string"}],"fieldMapType":"REQ"}],"clientId":"","decorator":{"id":1,"mode":"output","decoratorType":"RESPONSE_DECORATOR","decoratorName":"commonOutput","decoratorKeywords":[{"id":1,"keyword":{"id":1,"keywordName":"detail.summary","dataType":"string"}},{"id":2,"keyword":{"id":2,"keywordName":"detail.token","dataType":"string"}},{"id":3,"keyword":{"id":3,"keywordName":"detail.success","dataType":"boolean"}},{"id":4,"keyword":{"id":4,"keywordName":"detail.dispatchInstructions","dataType":"string"}},{"id":5,"keyword":{"id":5,"keywordName":"detail.testResult","dataType":"boolean"}},{"id":6,"keyword":{"id":6,"keywordName":"detail.ifmsSummary","dataType":"string"}},{"id":7,"keyword":{"id":7,"keywordName":"detail.nextAction","dataType":"string"}},{"id":8,"keyword":{"id":8,"keywordName":"detail.nextActionCommand","dataType":"string"}},{"id":9,"keyword":{"id":9,"keywordName":"detail.failureReason","dataType":"string"}},{"id":10,"keyword":{"id":10,"keywordName":"detail.failureReasonIfms","dataType":"string"}},{"id":12,"keyword":{"id":12,"keywordName":"detail.detailOutput","dataType":"string"}}]}}, doLogFiles=true, dontLogErrorFiles=true, messageId=pingTestOutputJSON_assessor, messageName=GroovyAccessor, RAW_BODY={"INPUTS":{"traceId":"ca67daac5783dbc2a694efb97b5a5a55:a694efb97b5a5a55:0:0","authKey":"446246d5-8c52-401b-a69f-8163854d80f3","conditionPass":false,"requestHeaderMap":{},"circuitIds":"EVC00026166","KEYCLOAK_CLIENT_ID":"Client","FAILURE_REASON":"org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-Mihan-Dev-1607317759951-0-1], causedBy java.lang.NoClassDefFoundError: org/apache/camel/tooling/model/ComponentModel","causedBy":"java.lang.NoClassDefFoundError: org/apache/camel/tooling/model/ComponentModel","message":"org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-Mihan-Dev-1607317759951-0-1]","detailedTrace":"[email protected]//org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:47)\n\[email protected]//org.apache.camel.support.DefaultExchange.setException(DefaultExchange.java:425)\n\[email protected]//org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:170)\n\[email protected]//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702)\n\[email protected]//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616)\n\[email protected]//org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)\n\[email protected]//org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)\n\[email protected]//org.apache.camel.processor.Pipeline.process(Pipeline.java:147)\n\[email protected]//org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286)\n\[email protected]//org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:66)\n\[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:212)\n\[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:110)\n\[email protected]//org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)\n\[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:107)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerCache.send(DefaultProducerCache.java:185)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:413)\n\tdeployment.-integration-services.war//com.integration.services.ep.IntegrationServices.getEndpointService(IntegrationServices.java:165)\n\tdeployment.-integration-services.war//com.integration.services.ep.IntegrationServices$Proxy$_$$_WeldSubclass.getEndpointService$$super(Unknown Source)\n\tjava.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tjava.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tjava.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tjava.base/java.lang.reflect.Method.invoke(Method.java:566)\n\[email protected]//org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:51)\n\t... 419 more","Success":false,"processDefinitionKey":"pingTest","Authorization":"bearer ....]
10:39:22,105 ERROR [com.interfaces.processors.common.GarbageProcessor] (default task-1) process().EXCEPTION_CAUGHT : CamelExceptionCaught | EXCEPTION_HANDLED : CamelExceptionHandled
10:39:22,105 INFO [com.utility.util.IntegrationUtility] (default task-1) generateErrorResponse().detailedTrace : [email protected]//org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:47)
[email protected]//org.apache.camel.support.DefaultExchange.setException(DefaultExchange.java:425)
[email protected]//org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:170)
[email protected]//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702)
[email protected]//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616)
[email protected]//org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
[email protected]//org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
[email protected]//org.apache.camel.processor.Pipeline.process(Pipeline.java:147)
[email protected]//org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286)
[email protected]//org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:66)
[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:212)
[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:110)
[email protected]//org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)
[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:107)
[email protected]//org.apache.camel.impl.engine.DefaultProducerCache.send(DefaultProducerCache.java:185)
[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)
[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)
[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:413)
deployment.-integration-services.war//com.integration.services.ep.IntegrationServices.getEndpointService(IntegrationServices.java:165)
deployment.-integration-services.war//com.integration.services.ep.IntegrationServices$Proxy$_$$_WeldSubclass.getEndpointService$$super(Unknown Source)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:566)
[email protected]//org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:51)
10:39:22,105 ERROR [com.utility.util.IntegrationUtility] (default task-1) process().errorResponseBody : {"Success":false,"RESULT":{"condition":"bad"},"Exception":{"message":"org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-Mihan-Dev-1607317759951-0-2]","causedBy":"java.lang.NoClassDefFoundError: org/apache/camel/tooling/model/ComponentModel","detailedTrace":"[email protected]//org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:47)\n\[email protected]//org.apache.camel.support.DefaultExchange.setException(DefaultExchange.java:425)\n\[email protected]//org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:170)\n\[email protected]//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702)\n\[email protected]//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616)\n\[email protected]//org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)\n\[email protected]//org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)\n\[email protected]//org.apache.camel.processor.Pipeline.process(Pipeline.java:147)\n\[email protected]//org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286)\n\[email protected]//org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:66)\n\[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:212)\n\[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:110)\n\[email protected]//org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)\n\[email protected]//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:107)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerCache.send(DefaultProducerCache.java:185)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)\n\[email protected]//org.apache.camel.impl.engine.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:413)\n\tdeployment.-integration-services.war//com.integration.services.ep.IntegrationServices.getEndpointService(IntegrationServices.java:165)\n\tdeployment.-integration-services.war//com.integration.services.ep.IntegrationServices$Proxy$_$$_WeldSubclass.getEndpointService$$super(Unknown Source)\n\tjava.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tjava.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tjava.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tjava.base/java.lang.reflect.Method.invoke(Method.java:566)\n\[email protected]//org.jboss.weld.interceptor.proxy.TerminalAroundInvokeInvocationContext.proceedInternal(TerminalAroundInvokeInvocationContext.java:51)\n\t... 419 more"},"OUTPUTS":{"FAILURE_REASON":"org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-Mihan-Dev-1607317759951-0-2], causedBy java.lang.NoClassDefFoundError: org/apache/camel/tooling/model/ComponentModel"}}
I have already added the following dependency in the pom.xml and I have tried making the scope "provided" for camel-tooling-model dependency after copying extracted WildFly-Camel 12.0.0 to the WildFly installation. But I get the same error as above.
<properties>
<version.camel>3.4.0</version.camel>
</properties>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-tooling-model</artifactId>
<version>${version.camel}</version>
</dependency>
And I found (when debugging) that the following line is the exact place where the exception occurs and observed requestBodyAndHeaders method in ProducerTemplate interface throws the CamelExecutionException.
responseBody = producerTemplate.requestBodyAndHeaders("direct:cbr", requestBody, headers, String.class);
And here is the ContentBasedRouter class
@ApplicationScoped
@Named("content_based_router")
public class ContentBasedRouter extends RouteBuilder {
@Override
public void configure() throws Exception {
errorHandler(deadLetterChannel("direct:error"));
from("direct:cbr")
.choice()
.when(header("routeId").isEqualTo("direct-http"))
.to("direct:http")
.when(header("routeId").isEqualTo("direct-https"))
.to("direct:https")
.when(header("routeId").isEqualTo("direct-groovy"))
.to("direct:groovy")
.when(header("routeId").isEqualTo("direct-jdbc"))
.to("direct:jdbc")
.when(header("routeId").isEqualTo("direct-soap"))
.to("direct:soap")
.when(header("routeId").isEqualTo("direct-xmlrpc"))
.to("direct:xmlrpc")
.otherwise()
.to("direct:misc");
}
}
Highly appreciate your advice to fix this issue!