SwitchYard Camel route service using Smooks endpoints cannot be deployed

Solution Unverified - Updated -

Issue

  • We have a SwitchYard service which contains a Camel route component with the following configuration:
<routes xmlns="http://camel.apache.org/schema/spring">
    <route>
        <from uri="switchyard://SampleInService"/>
        ...
        <to uri="switchyard://SampleOutService1"/>
        <to uri="smooks://smooks/transform.xml"/>
        <to uri="switchyard://SampleOutService2"/>
    </route>
</routes>
  • During deployment, we get the following error:
17:15:04,515 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."fertozo-service-0.0.1-SNAPSHOT.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."fertozo-service-0.0.1-SNAPSHOT.jar".SwitchYardService: Failed to start service
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
Caused by: java.lang.LinkageError: Failed to link org/milyn/smooks/camel/component/SmooksComponent (Module "org.milyn:main" from local module loader @876e4b8 (finder: local module finder @35a1f05f (roots: /opt/jboss-fsw/jboss-eap-6.1/modules,/opt/jboss-fsw/jboss-eap-6.1/modules/system/layers/soa,/opt/jboss-fsw/jboss-eap-6.1/modules/system/layers/sramp,/opt/jboss-fsw/jboss-eap-6.1/modules/system/layers/base)))
        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:427) [jboss-modules.jar:1.2.2.Final-redhat-1]
        at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260) [jboss-modules.jar:1.2.2.Final-redhat-1]
        at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [jboss-modules.jar:1.2.2.Final-redhat-1]
        at org.jboss.modules.Module.loadModuleClass(Module.java:526) [jboss-modules.jar:1.2.2.Final-redhat-1]
        [...]
Caused by: java.lang.NoClassDefFoundError: org/apache/camel/component/ResourceBasedComponent
        at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_65]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_65]
        at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344) [jboss-modules.jar:1.2.2.Final-redhat-1]
        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422) [jboss-modules.jar:1.2.2.Final-redhat-1]
        ... 44 more
Caused by: java.lang.ClassNotFoundException: org.apache.camel.component.ResourceBasedComponent from [Module "org.milyn:main" from local module loader @876e4b8 (finder: local module finder @35a1f05f (roots: /opt/jboss-fsw/jboss-eap-6.1/modules,/opt/jboss-fsw/jboss-eap-6.1/modules/system/layers/soa,/opt/jboss-fsw/jboss-eap-6.1/modules/system/layers/sramp,/opt/jboss-fsw/jboss-eap-6.1/modules/system/layers/base))]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.2.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.2.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.2.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.2.Final-redhat-1]
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.2.Final-redhat-1]
        ... 48 more
  • What is the problem here?

Environment

  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.x

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