5 Replies Latest reply on Aug 20, 2009 3:18 AM by Sailaja P

    ClassNotFoundException When JMS endpoint is added to the EIP diagram

    sivaram Newbie

      Hi,

       

      I'm trying to develop a sample EIP diagram using FID 1.2.1 and deploy it on ESB 3.4.0.3

       

      1. When I add JMS endpoint to the EIP diagram and deploy, I get the following exception. Other posts mentioned that this issue (jar dependency) will be addressed in 1.2.1. I'm using 1.2.1 and still I'm facing this issue. Do I need to do any specific configuration

       

      ERROR - CamelJbiComponent - org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean class http://org.apache.camel.component.jms.jmscomponent/ not found

      Offending resource: file ...fuse-esb-3.4.0.3\data\smx\service-assemblies\SampleFlow\version_14\sus\servicemix-camel\eip-SampleFlow-sample\camel-context.xml

      Bean 'jms'; nested exception is java.lang.ClassNotFoundException: org.apache.camel.component.jms.JmsComponent in classloader org.apache.camel.component.jms.JmsComponent

       

      2. When I add camel-jms-1.5.4.0-fuse.jar from FUSE mediation router 1.5.4.0. I get the following exception

       

      ERROR - CamelJbiComponent - org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Class that bean class http://org.apache.camel.component.jms.JmsComponent depends on not found

      Offending resource: file C:\progress\fuse-esb-3.4.0.3\data\smx\service-assemblies\SampleFlow\version_13\sus\servicemix-camel\eip-SampleFlow-sample\camel-context.xml

      Bean 'jms'; nested exception is java.lang.NoClassDefFoundError: org/apache/camel/HeaderFilterStrategyAware

       

      3. When I add camel-core-1.5.4.0-fuse.jar from FUSE mediation router 1.5.4.0. I get different exceptions.

       

      Can anyone please let me know what is wrong here?

       

      Thanks

       

       

        • 1. Re: ClassNotFoundException When JMS endpoint is added to the EIP diagram
          Robert Yetman Newbie

          I think you're on the right track.   This has been one of my biggest frustrations with FID, is that when you deploy to Fuse ESB, it doesn't get all the libraries you need for the various components into your service assembly, and you end up getting weird error messages, or ClassNotFoundExceptions.  For example, to use an HTTP component, I had to manually add 4 jars to my project/classpath.   And, there's no definitive list that says 'for component x and ESB version y, you need libraries a,b,c.'   We're stuck figuring it out on our own, or asking up here.

          • 2. Re: ClassNotFoundException When JMS endpoint is added to the EIP diagram
            Sailaja P Newbie

            Hi sivaram,

             

            Can you try by adding below jars in the project build path and then deploy.

            • spring-2.5.5.jar from FUSE service framework installation

            • activemq-all.jar from FUSE Messaging broker installation.

             

            For JMS Endpoint you require only activemq-all.jar and the jars (camel-jms, camel-core) that you have added can be removed from the build path.

             

            Hope this helps.

             

            Thanks,

            Sailaja.

            • 3. Re: ClassNotFoundException When JMS endpoint is added to the EIP diagram
              Sailaja P Newbie

              Hi sivaram,

               

              Can you try by adding below jars in the project build path and then deploy.

              • spring-2.5.5.jar from FUSE service framework installation

              • activemq-all.jar from FUSE Messaging broker installation.

               

              For JMS Endpoint you require only activemq-all.jar and the jars (camel-jms, camel-core) that you have added can be removed from the build path.

               

              Hope this helps.

               

              Thanks,

              Sailaja.

              • 4. Re: ClassNotFoundException When JMS endpoint is added to the EIP diagram
                sivaram Newbie

                Thanks Sailaja and bobyetman for your response.

                 

                Sailaja,

                 

                Adding spring-2.5.5.jar and activemq-all-5.3.0.4-fuse.jar did not resolve the exception. Both these jar's do not have the package org.apache.camel.component.*. So I added the following jar's apart from what you have mentioned and it worked. Let me know whether you added all these jar for JMS to work. Thanks for your help once again.

                 

                activemq-all-5.3.0.4-fuse

                spring-2.5.5

                camel-jms-1.6.1.2-fuse

                camel-core-1.6.1.2-fuse

                jaxb-impl-2.1.6

                jaxb-api-2.1

                 

                bobyetman,

                 

                Can you please let know what were the 4 jars that you added for Http Endpoint? This will benefit everyone.

                • 5. Re: ClassNotFoundException When JMS endpoint is added to the EIP diagram
                  Sailaja P Newbie

                  Hi Sivaram,

                   

                  If you want to work with only JMS Endpoint (like JMS->JMS) then you require only activemq-all-5.3.0.4-fuse and spring-2.5.5 (required only for deployment) jars. But if your route contains other endpoints like CXF or HTTP or JBI at this time you need to add some more jars like (jaxb-impl-2.1.6 and jaxb-api-2.1) to your project build path.

                   

                  Hopefully, in the next release, we will be resolving the pain of adding jars to the project build path.

                   

                  Thanks,

                  Sailaja.