5 Replies Latest reply on Sep 26, 2011 12:33 PM by ranthyreddy

    How do I call an EJB 2.x (weblogic) from SMX4

    jokit

      Hi,

       

      How do I expose an EJB 2 (weblogic) in SMX4. I have tried jsr181 and cxfse:endpoint and the same problem occur. Everything works at it should until a try to start my osgi bundle, then a receive a number of class not found or xxxImpl not found.

       

      First I get an class not found error because the SMX can't find the class the Weblogic my EJB should return.

      I then add my jar to the SMX as this:

      osgi/install -s wrap:file:////C:/tmp/esbbundels/FordonClient.jar

      osgi/install -s wrap:file:////C:/tmp/esbbundels/bilprovningencommon.jar

      osgi/install -s wrap:file:////C:/tmp/esbbundels/weblogic.jar

       

      Then I get an org.w3c.dom.ls class not found and a have to add for example

      osgi/install -s mvn:xerces/xercesImpl/2.4.0

       

      Then I get this error:

      ERROR: Unable to update the bundle. (javax.xml.parsers.FactoryConfigurationError

      Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found)

      avax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.Doc

      mentBuilderFactoryImpl not found

             at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderF

      ctory.java:110)

       

      Is there any other solution to call an EJB 2.x or could someone tell me how to solve the runtime problem.

       

      -


         beans.xlm -


       

       

       

      -


      pom.xml -


      Dependeny in my pom

              <!-- weblogic.jar -->

                 

                <!--  my clientjar FordonClient.jar -->

                 

                <!-- my clientjar dependency bilprovningencommon.jar -->

                 

       

      Edited by: jokit on Sep 30, 2009 11:44 AM

        • 1. Re: How do I call an EJB 2.x (weblogic) from SMX4
          mielket

          The following logging in etc/config.properties might provide you more logging about the class loading issue:

          felix.log.level=4
          

           

           

          See here for more information.

          • 2. Re: How do I call an EJB 2.x (weblogic) from SMX4
            joe.luo

            It might work but I have never tried it before though. To solve your current runtime problem, you will need to use "wrap" to install xerces jar as it is a plain jar but not a bundle:

            osgi/install -s wrap:mvn:xerces/xercesImpl/2.4.0

             

            It would allow the created xerces bundle to export "org.apache.xerces.jaxp" package.

             

            Give it a try to see how far it goes.

            • 3. Re: How do I call an EJB 2.x (weblogic) from SMX4
              jokit

              Hi again,

               

              I tryed this but I'm still get the same error

              ERROR CommandLineExecutionFailed:org.apache.geronimo.gshell.command.CommandException: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found

               

              I also added felix.log.level=4 but nothing else is logged.

               

              I have verifyed that the org.apache.xerces.jaxp.DocumentBuilderFactoryImpl exist in the xerces.jar.

              • 4. Re: How do I call an EJB 2.x (weblogic) from SMX4
                joe.luo

                To verify that the created xerces bundle does export "org.apache.xerces.jaxp" package, you will need to use below command:

                smx@root:/> packages/exports  | grep org.apache.xerces.jaxp

                 

                If the package was indeed exported by xerces bundle that you just installed, then it means that one of your EJB client jars needs to "import" the package.

                 

                So you might want to try to convert the jars to OSGI bundles yourself using "bnd" tool (http://www.aqute.biz/Code/Bnd) instead of using "wrap" protocol to add the package "org.apache.xerces.jaxp" into "Import-Package" header of MANIFEST.MF file of the EJB client bundle then.

                • 5. Re: How do I call an EJB 2.x (weblogic) from SMX4
                  ranthyreddy

                  Was wondering if you ever got around to solving your issue with EJB2.x, as I have the same need and would love to hear what solution did you use to invoke EJB2.x from OSGi service in Felix container (SMX-FUSE-4.4.1).

                   

                  thanks,

                  RR.