2 Replies Latest reply on Jan 16, 2015 3:47 AM by dazsaunders

    Error During Deployment of ANY Switchyard project

    dazsaunders

      When deploying ANY Switchyard project I get the error below (only during ublication). It seems to indicate that it cannot find the class org.apache.camel.builder.RouteBuilder but I have the camel-core-2.10.3.jar on my classpath.

       

      I have found a similar discussionm whic indicates that you may have to change the module.xml file (https://developer.jboss.org/thread/247213?start=0&tstart=0). If this is correct I'm unsure which module.xml to change as there are multiple within the JBDS setup. I am using Version: 8.0.0.GA of JBOSS Developer Studio. 

       

      I'd be most grateful for any help or advice. Thank you.

       

      19:29:26,677 WARN  [org.jboss.modules] (MSC service thread 1-5) Failed to define class com.example.switchyard.switchyard_example2.CamelServiceRoute in Module "deployment.switchyard-example2.jar:main" from Service Module Loader: java.lang.LinkageError: Failed to link com/example/switchyard/switchyard_example2/CamelServiceRoute (Module "deployment.switchyard-example2.jar:main" from Service Module Loader)

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:487) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:92) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.Module.loadModuleClass(Module.java:568) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:68) [jboss-as-weld-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]

          at org.jboss.weld.bootstrap.BeanDeployer.loadClass(BeanDeployer.java:109) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]

          at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:79) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]

          at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:137) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]

          at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:184) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]

          at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:349) [weld-core-1.1.23.Final-redhat-1.jar:1.1.23.Final-redhat-1]

          at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:63) [jboss-as-weld-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]

          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:1145) [rt.jar:1.7.0_71]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_71]

          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71]

      Caused by: java.lang.NoClassDefFoundError: org/apache/camel/builder/RouteBuilder

          at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_71]

          at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_71]

          at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482) [jboss-modules.jar:1.3.3.Final-redhat-1]

          ... 20 more

      Caused by: java.lang.ClassNotFoundException: org.apache.camel.builder.RouteBuilder from [Module "deployment.switchyard-example2.jar:main" from Service Module Loader]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final-redhat-1]

          ... 24 more

        • 1. Re: Error During Deployment of ANY Switchyard project
          jorgemoralespou_2

          Could you post:

          - What version of SwitchYard you are using

          - The CamelServiceRoute that is failing

          - The switchyard.xml

           

          If there is package names or sensitive data, you can tweak those, but some more information is needed to help you with this, as a reference to that class is not needed, and similar quickstarts are working for anybody.

           

          Cheers,

          • 2. Re: Error During Deployment of ANY Switchyard project
            dazsaunders

            Hi Thanks for the replay.

             

            The switchyard version I have is 2.0.0.Beta1.

             

            switchyard.xml is below. I've taken only a sample that I followed but the same error occurs with any switchyard project. I tried created a really simple one I.e just adding a Camel (Java) and an interface and this also gives the same problem so I'm thinking it maybe my dev/runtime environment setup that is the issue?.

             

            I really appreciate you taking the time to answer.

             

            Contents of switchyard.xml is below:

             

            <?xml version="1.0" encoding="UTF-8"?>

            <sy:switchyard xmlns:camel="urn:switchyard-component-camel:config:2.0" xmlns:jms="urn:switchyard-component-camel-jms:config:2.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:soap="urn:switchyard-component-soap:config:2.0" xmlns:sy="urn:switchyard-config:switchyard:2.0" name="sample-jms-queue" targetNamespace="urn:com.example.switchyard:sample-jms-queue:1.0">

              <sca:composite name="sample-jms-queue" targetNamespace="urn:com.example.switchyard:sample-jms-queue:1.0">

                <sca:component name="QueuePusherRoute">

                  <camel:implementation.camel>

                    <camel:java class="com.example.switchyard.sample_jms_queue.QueuePusherRoute"/>

                  </camel:implementation.camel>

                  <sca:service name="QueuePusherService">

                    <sca:interface.wsdl interface="QueuePusherService.wsdl#wsdl.porttype(QueuePusherService)"/>

                  </sca:service>

                  <sca:reference name="QueueRef">

                    <sy:interface.esb inputType="java:java.lang.String"/>

                  </sca:reference>

                </sca:component>

                <sca:service name="QueuePusherService" promote="QueuePusherRoute/QueuePusherService">

                  <sca:interface.wsdl interface="QueuePusherService.wsdl#wsdl.porttype(QueuePusherService)"/>

                  <soap:binding.soap name="soap1">

                    <soap:contextMapper soapHeadersType="VALUE"/>

                    <soap:wsdl>QueuePusherService.wsdl</soap:wsdl>

                  </soap:binding.soap>

                </sca:service>

                <sca:reference name="QueueRef" multiplicity="0..1" promote="QueuePusherRoute/QueueRef">

                  <sy:interface.esb inputType="java:java.lang.String"/>

                  <jms:binding.jms name="jms1">

                    <jms:queue>MyQueue</jms:queue>

                    <jms:connectionFactory>#ConnectionFactory</jms:connectionFactory>

                  </jms:binding.jms>

                </sca:reference>

              </sca:composite>

            </sy:switchyard>