Thanks for your candid reply. I'm just diving into OSGi and am
experiencing the same WTF. Hopefully, I'll be able to stay on this
project for a bit and actually get somewhere, but it doesn't look good
right now. Good news... GE Healthcare may be opening the door and
allowing us to participate in the Open Source community. If that
happens, I may be able to pitch in.
Thanks for the pointers.
- Dan
From: Mark Proctor [via Drools]
[mailto:ml-node+s46999n4020067h31@n3.nabble.com]
Sent: Monday, October 01, 2012 9:42 PM
To: Seaver, Daniel (GE Healthcare)
Subject: Re: [rules-users] Deploy Drools in AS7 as OSGi bundles
Our OSGi stuff is best effort - working on OSGi was like sticking
needles directly into the back of my eyeball, not fun. tbh I find OSGi a
real PITA. Too many of our dependencies do not have real OSGi bundles
available, so we have to resort to the spring repository - where the
versions almost never match our original target version. Further when it
fails it's almost freaking impossible to determine why it fails.
We use the spring test module, we provide it all the dependencies that
you see, and run the tests. Other than suggesting to look at the spring
OSGi test executions, I can't really offer more help. But it will nearly
always boil down to wrong jars or wrong versions of jars - figuring out
which of those are the problem, is not easy. Either it works, of it
doesn't. If it doesn't, there is no simple way to debug why OSGi
doesn't work. Generally I have to take it back to the last version that
worked and keep incrementally changing it until I find out specifically
doesn't work, so I can address it.
You might find it useful to look at the bundle context that spring osgi
creates, here is all the bundles and their versions necessary for the
unit tests to run:
https://github.com/droolsjbpm/droolsjbpm-build-distribution/blob/master/
drools-osgi-bundles/org.drools.osgi.test/src/test/filtered-resources/boo
t-bundles.properties
good luck :) Please document any helpers you find, and submit as pull
requests.
Mark
On 1 Oct 2012, at 21:26, Dan Seaver <[hidden email]> wrote:
Thanks Mark, but I still am having issues.
I cloned the latest droolsjbpm-build-distribution and built
drools-osgi-bundles and reviewed the documentation you refenced. I
don't see
it stated anywhere, but I assume I need to install and start all of
the jars
in drools-osgi-bundles-distribution-5.5.0-SNAPSHOT.zip.
So, I put all of those jars in the AS7's Standalone deployments folder
and
started up AS7. The only jar that seemed to have trouble is
*com.springsource.antlr-2.7.6.jar* because of an
*IllegalArgumentException:
A fragment is not a module*.
Now I tried to deploy the *knowledge-api-5.5.0-SNAPSHOT.jar*, and I
get an
error with *com.springsource.com.sun.tools.xjc:2.1.7* (see stacktrace
below), which prohibits me from installing and starting any of the
other
drools bundles mentioned in the doc.
Any thoughts about what's amiss?
Stack Trace:
==========
10:10:44,609 ERROR
[org.jboss.osgi.framework.internal.FrameworkEventsPlugin]
(MSC service thread 1-8) Framework ERROR:
org.osgi.framework.BundleException: Cannot resolve bundle resModule:
[org.drools.api:5.5.0.SNAPSHOT]
at
org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.
java:157)
[jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
at
org.jboss.osgi.framework.internal.AbstractBundleState.ensureResolved(Abs
tractBundleState.java:551)
[jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
at
org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBund
leState.java:211)
[jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
at
org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBund
leState.java:494)
[jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
at
org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleS
tartTracker.java:144)
[jboss-as-osgi-service-7.1.1.Final.jar:7.1.1.Final]
at
org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStart
Tracker.java:119)
[jboss-as-osgi-service-7.1.1.Final.jar:7.1.1.Final]
at
org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceContro
llerImpl.java:1416)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
org.jboss.msc.service.ServiceControllerImpl.access$2700(ServiceControlle
rImpl.java:49)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceCont
rollerImpl.java:1954)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:886)
[rt.jar:1.6.0_26]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:908)
[rt.jar:1.6.0_26]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
Caused by: org.jboss.osgi.resolver.XResolverException: Constraint
violation
for package 'org.relaxng.datatype' when resolving module
Module[com.springsource.com.sun.tools.xjc:2.1.7] between existing
export
Module[com.springsource.com.sun.tools.xjc:2.1.7].org.relaxng.datatype
NO
BLAME and uses constraint
Module[com.springsource.org.relaxng.datatype:1.0.0].org.relaxng.datatype
BLAMED ON [[Module[com.springsource.com.sun.tools.xjc:2.1.7]]
package;
(&(package=com.sun.msv.datatype.xsd.ngimpl)(version>=0.0.0.20060615)(ver
sion<=0.0.0.20060615)),
[Module[com.springsource.com.sun.msv.datatype:0.0.0.20060615]]
package;
> (&(package=org.relaxng.datatype)(version>=1.0.0)(!(version>=2.0.0)))]
> at
org.jboss.osgi.resolver.felix.FelixResolver.resolveInternal(FelixResolve
r.java:117)
> [jbosgi-resolver-felix-1.0.13.Final.jar:1.0.13.Final]
> at
org.jboss.osgi.resolver.spi.AbstractResolver.resolve(AbstractResolver.ja
va:149)
> [jbosgi-resolver-spi-1.0.13.Final.jar:1.0.13.Final]
> at
org.jboss.osgi.framework.internal.ResolverPlugin.resolve(ResolverPlugin.
java:155)
[jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
... 11 more
--
View this message in context:
http://drools.46999.n3.nabble.com/Deploy-Drools-in-AS7-as-OSGi-bundles-t
p4020052p4020066.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
________________________________
If you reply to this email, your message will be added to the discussion
below:
http://drools.46999.n3.nabble.com/Deploy-Drools-in-AS7-as-OSGi-bundles-t
p4020052p4020067.html
To unsubscribe from Deploy Drools in AS7 as OSGi bundles, click here
<
http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubs
cribe_by_code&node=4020052&code=ZGFuLnNlYXZlckBnZS5jb218NDAyMDA1MnwtNjEw
NTk4NzU2> .
NAML
<
http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_
viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces
.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web
.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.
naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3A
email.naml>
--
View this message in context:
http://drools.46999.n3.nabble.com/Deploy-Drools-in-AS7-as-OSGi-bundles-tp...
Sent from the Drools: User forum mailing list archive at
Nabble.com.