5 Replies Latest reply on Aug 30, 2010 9:18 PM by jessica leahy

    Apache ODE in FUSE Servicemix

    Jon S Newbie

      Hello,

       

      I've been trying to run Apache Ode in Servicemix (4.2.0-fuse-02-00) for quite some time, but I've discovered some strange behavior getting it to work properly.

      From a refreshly extracted Servicemix I do the following steps:

       

      1. Run "features:install ode" in Servicemix

        This command completes successfully and I get 2 new Osgi packages:

      181 Active      Created                 60 Apache ODE Commands (1.3.3.fuse-02-00)

      182 Active                   Started    60 Apache ODE Service Engine (1.3.3.fuse-02-00)

       

      2. Run "features:addUrl mvn:org.apache.ode/ode-jbi-karaf/1.3.5-SNAPSHOT/xml/features" in Servicemix

        This works fine.

       

      3.  Run "features:install ode" in Servicemix (Yes again)

        This returns an error,

        Could not start bundle mvn:org.apache.ode/ode-jbi-bundle/1.3.5-SNAPSHOT in feature(s) ode-core-1.3.5-SNAPSHOT: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: net.sf.saxon.xpath; version="0.0.0"

       

      4. Install an OSGi Bundle that Exports net.sf.saxon.xpath which will add:

      191 Active                              60 saxon-xpath-8.5.1 (0)

      *NOTE, the ID is 191, I would expect 183 (8 higher).

       

      5. Run "features:install ode" in Servicemix (Yes, yet again)

      After this I receive the following 8 OSGi Bundles:

      192 Active                              60 wrap_mvn_org.tranql_tranql-connector_1.4 (0)

      193 Active                              60 Apache ServiceMix Specs :: JAVA PERSISTENCE API 1.4 (1.4.0)

      194 Active                              60 Apache ServiceMix Bundles: serp-1.13.1 (1.13.1.2)

      195 Active                              60 Apache ServiceMix Bundles: openjpa-1.2.1 (1.2.1.2)

      196 Active                              60 Commons BeanUtils (1.8.2)

      197 Active                              60 Apache Commons IO Bundle (1.4)

      198 Active                              60 wrap_mvn_jaxen_jaxen_1.1.1 (0)

      199 Active                   Started    60 ODE :: JBI Bundle (1.3.5.SNAPSHOT)

       

      6. I then proceed to attempt to run an OSGi Bundle (an ODE example) which runs the following lines of code on startup (From ODE :: JBI Bundle):

       

              ServiceReference[] refs = context.getAllServiceReferences(

                      "javax.jbi.component.Component", "(&(NAME=OdeBpelEngine))");

              if (refs == null || refs.length != 1) {

                  throw new RuntimeException("no appropriate service :(");

              }

       

      refs however contains two entries, so the Exception is thrown. The jbi:list command in servicemix shows only one OdeBpelEngine Component yet this method returns 2.  I thought this might be because I did features:install ode twice (and the 8 mystery IDs that were skipped).  So I tried the following:

       

      1. features:addUrl mvn:org.apache.ode/ode-jbi-karaf/1.3.5-SNAPSHOT/xml/features

      2. Install an OSGi Bundle that Exports net.sf.saxon.xpath (features:isntall ode fails without it)(also installs on ID 189)

      3. features:install ode and gives me the bundles:

      190 Active                              60 wrap_mvn_org.tranql_tranql-connector_1.4 (0)

      191 Active                              60 Apache Derby 10.5 (10.5.3000000.802917)

      192 Active                              60 Apache ServiceMix Specs :: JAVA PERSISTENCE API 1.4 (1.4.0)

      193 Active                              60 Apache ServiceMix Bundles: serp-1.13.1 (1.13.1.2)

      194 Active                              60 Apache ServiceMix Bundles: openjpa-1.2.1 (1.2.1.2)

      195 Active                              60 Commons BeanUtils (1.8.2)

      196 Active                              60 Apache Commons IO Bundle (1.4)

      197 Active                              60 wrap_mvn_jaxen_jaxen_1.1.1 (0)

      198 Active                   Started    60 ODE :: JBI Bundle (1.3.5.SNAPSHOT)

      but it missing the Apache ODE Service engine Bundle and the Apache ODE Commands bundle.

       

      4. jbi:list shows the OdeBpelEngine like this:

      Unknown  OdeBpelEngine                 

      So my ODE example that I ran in step 6 also does not work, due to another exception which I assume because the jbi endpoint is "Unknown" instead of "Started"

       

      Can anyone provide any insight on what's going on here?  It feels like I cannot properly install ode without either installing a phantom OdeBpelEngine or install with missing components.

       

      Thanks

      Tal

       

      Edit:

       

      It appears the ODE :: JBI Bundle (1.3.5.SNAPSHOT) and Apache ODE Service Engine (1.3.3.fuse-02-00) both publish a jbi Component, however the component from ODE :: JBI Bundle (1.3.5.SNAPSHOT) resolves to "Unknown" rather than started

       

      Edited by: tal on Jul 15, 2010 6:43 PM

        • 1. Re: Apache ODE in FUSE Servicemix
          Jon S Newbie

          Update:

           

          So i found out that Apache ODE Commands and ODE :: JBI Bundle both publish the OdeBpelEngine jbi component.  In addition, ODE :: JBI Bundle seems to fail at publishing it properly.  So to fix this, I removed all the code in ODE :: JBI Bundle's beans.xml because it was all related to publishing that bad OdeBpelEngine component. 

           

          Now my example ODE Osgi Bundle (ODE :: Examples :: Ping Pong OSGi) is in the "Active" state because the code,

                  ServiceReference[] refs = context.getAllServiceReferences(

                          "javax.jbi.component.Component", "(&(NAME=OdeBpelEngine))");

                  if (refs == null || refs.length != 1) {

                      throw new RuntimeException("no appropriate service :(");

                  }

          no longer throws an exception because refs contains only one component from Apache ODE Commands bundle.  I now think the ODE :: JBI Bundle is no longer required for ODE bundles, but only required for my example project.

           

          Not 100% sure if the Ping Pong Project actually works yet due to some other problem I havn't got around to fixing, I'll post again when I fix that.

          • 2. Re: Apache ODE in FUSE Servicemix
            Jon S Newbie

            It appears this does not occur in windows, just doing the addUrl and features:install ode works fine.

            • 3. Re: Apache ODE in FUSE Servicemix
              jessica leahy Newbie

              so what is exactly the error here?I'll try to search for the fix on this one.

              • 4. Re: Apache ODE in FUSE Servicemix
                Jon S Newbie

                The problem was I could not install ode on servicemix-4.2-fuse-02 on ubuntu, I was able to get around that issue by installing some additional bundles and editing the ODE :: JBI :: bundle. 

                In servicemix-4.3-fuse-00, this problem no longer occurs

                • 5. Re: Apache ODE in FUSE Servicemix
                  jessica leahy Newbie

                  Its good that you were able to fix it. Thanks for letting me know how you solved it.