Improve OSGI metada #35

Merged
merged 1 commit into from Mar 25, 2013

Projects

None yet

2 participants

@cmoulliard
Member

The goal of this pull requst (since kie refactoring) is to improve OSGI MetaData and retest deployment of individual bundles (instead of uber workaround). So here are the modifications done for KIE :

  • Disable activator class of org.kia.api.osgi as it generates NPE when deployed on Apache Karaf (see email send to community to discussion about that),
  • Export missing package org.kie.api.cdi which is required by bundle drools-compiler,
  • Remove singleton := true property as it generates an error on Karaf when bundle is updated (= stop, replaced and restarted)
Charles Moulliard Disable activator as it generates NPE, export missing package org.kie…
….cdi, remove singleton := true
aa09069
@ge0ffrey ge0ffrey commented on the diff Mar 25, 2013
kie-api/pom.xml
<DynamicImport-Package>*</DynamicImport-Package>
- <Bundle-Activator>org.kie.api.osgi.Activator</Bundle-Activator>
+ <!-- <Bundle-Activator>org.kie.api.osgi.Activator</Bundle-Activator> -->
@ge0ffrey
ge0ffrey Mar 25, 2013 Member

Why disable it?

@cmoulliard
Member

Because it generates the following error as the ServiceRegistry object is null.

ERROR: Bundle org.kie.api [67] EventDispatcher: Error during dispatch. (java.lang.NullPointerException)
java.lang.NullPointerException
at org.kie.api.osgi.Activator$DroolsServiceTracker.addingService(Activator.java:94)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:894)
at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:932)
at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:793)
at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:543)
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4260)
at org.apache.felix.framework.Felix.registerService(Felix.java:3275)
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346)
at org.drools.compiler.osgi.Activator.start(Activator.java:56)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1977)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1895)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
at java.lang.Thread.run(Thread.java:680)

@ge0ffrey ge0ffrey merged commit cb5a683 into kiegroup:master Mar 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment