Apache ODE in FUSE Servicemix
tal_sweetmanjon Jul 15, 2010 2:46 PMHello,
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