我正在使用 JDK 11、apache camel 3.4.0 和 WildFly 20.0.1.Final,并且在 Wildfly 控制台中出现以下错误。
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 : org.apache.camel.core@3.4.0//org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:47)
org.apache.camel.core@3.4.0//org.apache.camel.support.DefaultExchange.setException(DefaultExchange.java:425)
org.apache.camel.core@3.4.0//org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:170)
org.apache.camel.core@3.4.0//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702)
org.apache.camel.core@3.4.0//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
org.apache.camel.core@3.4.0//org.apache.camel.processor.Pipeline.process(Pipeline.java:147)
org.apache.camel.core@3.4.0//org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286)
org.apache.camel.core@3.4.0//org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:66)
org.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:212)
org.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:110)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)
org.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:107)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerCache.send(DefaultProducerCache.java:185)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)
org.apache.camel.core@3.4.0//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)
org.jboss.weld.core@3.1.4.Final//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":"org.apache.camel.core@3.4.0//org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:47)\n\torg.apache.camel.core@3.4.0//org.apache.camel.support.DefaultExchange.setException(DefaultExchange.java:425)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:170)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.Pipeline.process(Pipeline.java:147)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286)\n\torg.apache.camel.core@3.4.0//org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:66)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:212)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:110)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:107)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerCache.send(DefaultProducerCache.java:185)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)\n\torg.apache.camel.core@3.4.0//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\torg.jboss.weld.core@3.1.4.Final//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":"org.apache.camel.core@3.4.0//org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:47)\n\torg.apache.camel.core@3.4.0//org.apache.camel.support.DefaultExchange.setException(DefaultExchange.java:425)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:170)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.Pipeline.process(Pipeline.java:147)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286)\n\torg.apache.camel.core@3.4.0//org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:66)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:212)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:110)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:107)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerCache.send(DefaultProducerCache.java:185)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)\n\torg.apache.camel.core@3.4.0//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\torg.jboss.weld.core@3.1.4.Final//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 : org.apache.camel.core@3.4.0//org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:47)
org.apache.camel.core@3.4.0//org.apache.camel.support.DefaultExchange.setException(DefaultExchange.java:425)
org.apache.camel.core@3.4.0//org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:170)
org.apache.camel.core@3.4.0//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702)
org.apache.camel.core@3.4.0//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
org.apache.camel.core@3.4.0//org.apache.camel.processor.Pipeline.process(Pipeline.java:147)
org.apache.camel.core@3.4.0//org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286)
org.apache.camel.core@3.4.0//org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:66)
org.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:212)
org.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:110)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)
org.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:107)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerCache.send(DefaultProducerCache.java:185)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)
org.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)
org.apache.camel.core@3.4.0//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)
org.jboss.weld.core@3.1.4.Final//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":"org.apache.camel.core@3.4.0//org.apache.camel.CamelExecutionException.wrapCamelExecutionException(CamelExecutionException.java:47)\n\torg.apache.camel.core@3.4.0//org.apache.camel.support.DefaultExchange.setException(DefaultExchange.java:425)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:170)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:702)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:616)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.Pipeline.process(Pipeline.java:147)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:286)\n\torg.apache.camel.core@3.4.0//org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:66)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:212)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:110)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)\n\torg.apache.camel.core@3.4.0//org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:107)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerCache.send(DefaultProducerCache.java:185)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:176)\n\torg.apache.camel.core@3.4.0//org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:172)\n\torg.apache.camel.core@3.4.0//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\torg.jboss.weld.core@3.1.4.Final//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"}}
我已经在 pom.xml 中添加了以下依赖项,并且在将提取的 WildFly-Camel 12.0.0 复制到 WildFly 安装后,我尝试为 camel-tooling-model 依赖项“提供”范围。但我得到与上面相同的错误。
<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>
而且我发现(在调试时)以下行是发生异常的确切位置,并观察到ProducerTemplate接口中的requestBodyAndHeaders方法抛出了CamelExecutionException。
responseBody = producerTemplate.requestBodyAndHeaders("direct:cbr", requestBody, headers, String.class);
这是 ContentBasedRouter 类
@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");
}
}
非常感谢您提出解决此问题的建议!