camel-sql missing spring-tx does not allow using Idempotent Routes in Fuse on EAP

Solution Verified - Updated -

Issue

(WARN  [org.jboss.as.dependency.private] (MSC service thread 1-2) JBAS015867: Deployment "deployment.idempotent-0.0.1.war" is using a private module ("org.springframework.tx:main") which may be changed or removed in future versions without notice.), but the deployment still errors out with the stack trace pasted below.


Stack Trace begins:
----------------------------------------------------------------------------------------------------------------------------------------
14:39:43,462 INFO  [org.apache.camel.cdi.CdiCamelContext] (MSC service thread 1-2) Apache Camel 2.15.1.redhat-621084 (CamelContext: camel-cdi-context) is starting
14:39:43,462 INFO  [org.apache.camel.management.ManagedManagementStrategy] (MSC service thread 1-2) JMX is enabled
14:39:43,493 INFO  [org.wildfly.extension.camel] (MSC service thread 1-2) Camel context starting: camel-cdi-context
14:39:43,493 INFO  [org.wildfly.extension.camel] (MSC service thread 1-11) Bound camel naming object: java:jboss/camel/context/camel-cdi-context
14:39:43,590 INFO  [org.apache.camel.impl.converter.DefaultTypeConverter] (MSC service thread 1-2) Loaded 268 type converters
14:39:43,606 INFO  [org.apache.camel.cdi.CdiCamelContext] (MSC service thread 1-2) AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn
this option off as it may improve performance.
14:39:43,606 INFO  [org.apache.camel.cdi.CdiCamelContext] (MSC service thread 1-2) StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at h
ttp://camel.apache.org/stream-caching.html
14:39:43,606 INFO  [org.apache.camel.cdi.CdiCamelContext] (MSC service thread 1-2) Total 0 routes, of which 0 is started.
14:39:43,606 INFO  [org.apache.camel.cdi.CdiCamelContext] (MSC service thread 1-2) Apache Camel 2.15.1.redhat-621084 (CamelContext: camel-cdi-context) started in 0.144 seconds
14:39:43,621 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."idempotent-0.0.1.war".WeldStartService: org.jboss.msc.service.Star
tException in service jboss.deployment.unit."idempotent-0.0.1.war".WeldStartService: Failed to start service
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1936) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_77]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_77]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_77]
Caused by: org.jboss.weld.exceptions.DeploymentException: Exception List with 1 exceptions:
Exception 0 :
javax.enterprise.event.ObserverException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:344)
        at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
        at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:173)
        at org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:341)
        at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:33)
        at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:73)
        at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:162)
        at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
        at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
        at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
        at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
        at org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:46)
        at org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:31)
        at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:382)
        at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: org/springframework/transaction/support/TransactionCallback
        at nz.section6.route.IdempotentRouteBuilder.configure(IdempotentRouteBuilder.java:28)
        at org.apache.camel.builder.RouteBuilder.checkInitialized(RouteBuilder.java:382)
        at org.apache.camel.builder.RouteBuilder.configureRoutes(RouteBuilder.java:323)
        at org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:306)
        at nz.section6.route.IdempotentRouteBuilder$Proxy$_$$_WeldClientProxy.addRoutesToCamelContext(IdempotentRouteBuilder$Proxy$_$$_WeldClientProxy.java)
        at org.apache.camel.impl.DefaultCamelContext$1.call(DefaultCamelContext.java:731)
        at org.apache.camel.impl.DefaultCamelContext$1.call(DefaultCamelContext.java:728)
        at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486)
        at org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:728)
        at org.apache.camel.cdi.CdiCamelContext$Proxy$_$$_WeldClientProxy.addRoutes(CdiCamelContext$Proxy$_$$_WeldClientProxy.java)
        at org.apache.camel.cdi.internal.CamelContextConfig.configure(CamelContextConfig.java:70)
        at org.apache.camel.cdi.internal.CamelContextBean.configureCamelContext(CamelContextBean.java:129)
        at org.apache.camel.cdi.internal.CamelExtension.startConsumeBeans(CamelExtension.java:231)
        at org.apache.camel.cdi.internal.CamelExtension$Proxy$_$$_WeldClientProxy.startConsumeBeans(CamelExtension$Proxy$_$$_WeldClientProxy.java)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
        at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
        at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
        at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
        at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:164)
        at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
        at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
        ... 13 more
Caused by: java.lang.ClassNotFoundException: org.springframework.transaction.support.TransactionCallback from [Module "org.apache.camel.component.sql:main" from local module loader @16f65612 (finde
r: local module finder @311d617d (roots: D:\software\fuse\modules,D:\software\fuse\modules\system\layers\fuse,D:\software\fuse\modules\system\layers\soa,D:\software\fuse\modules\system\layers\base)
)]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
        ... 38 more

        at org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:48)
        at org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:31)
        at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:382)
        at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
        ... 3 more

----------------------------------------------------------------------------------------------------------------------------------------

Environment

  • Red Hat JBoss Fuse
  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.4.x
    • Fuse on EAP

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content