ctron / kura-addons

Addons for Eclipse Kura™
Apache License 2.0
6 stars 4 forks source link

Failed to install drools component bundle on Kura 4 #8

Open anoopk30 opened 2 years ago

anoopk30 commented 2 years ago

I am using Kura 4.1.2 and tried to install drools component after installing drools core. It showing bundle installed but not active. When I tried to start the bundle it's showing org.osgi.framework.BundleException.

Here is my log :

2022-03-08T22:20:11,714 [DeploymentAgent] INFO  o.e.k.d.a.i.DeploymentAgent - Posting INSTALLED event for package at URL file:/tmp/de.dentrassi.kura.addons.drools.core_0.8.4-SNAPSHOT.dp: successful
2022-03-08T22:20:12,195 [pool-20-thread-1] INFO  d.d.k.a.d.i.ServiceActivator - Current Drools registry:
2022-03-08T22:20:12,195 [pool-20-thread-1] INFO  d.d.k.a.d.i.ServiceActivator -     org.kie.internal.builder.KnowledgeBuilderFactoryService
2022-03-08T22:20:12,195 [pool-20-thread-1] INFO  d.d.k.a.d.i.ServiceActivator -     org.kie.api.internal.runtime.beliefs.KieBeliefs
2022-03-08T22:20:12,195 [pool-20-thread-1] INFO  d.d.k.a.d.i.ServiceActivator -     org.drools.compiler.compiler.PMMLCompiler
2022-03-08T22:20:12,195 [pool-20-thread-1] INFO  d.d.k.a.d.i.ServiceActivator -     org.kie.api.concurrent.KieExecutors
2022-03-08T22:20:12,195 [pool-20-thread-1] INFO  d.d.k.a.d.i.ServiceActivator -     org.kie.api.KieServices
2022-03-08T22:20:12,195 [pool-20-thread-1] INFO  d.d.k.a.d.i.ServiceActivator -     org.kie.api.internal.assembler.KieAssemblers
2022-03-08T22:20:12,195 [pool-20-thread-1] INFO  d.d.k.a.d.i.ServiceActivator -     org.kie.api.internal.runtime.KieRuntimes
2022-03-08T22:20:12,195 [pool-20-thread-1] INFO  d.d.k.a.d.i.ServiceActivator -     org.kie.api.marshalling.KieMarshallers
2022-03-08T22:20:12,196 [pool-20-thread-1] INFO  d.d.k.a.d.i.ServiceActivator -     org.kie.api.io.KieResources
2022-03-08T22:20:12,196 [pool-20-thread-1] INFO  d.d.k.a.d.i.ServiceActivator -     org.kie.api.internal.weaver.KieWeavers
2022-03-08T22:20:49,037 [qtp682662820-94] INFO  o.e.k.w.s.s.FileServlet - Copying uploaded package file to file: /tmp/de.dentrassi.kura.addons.drools.component_0.8.4-SNAPSHOT.dp
2022-03-08T22:20:49,040 [qtp682662820-94] INFO  o.e.k.w.s.s.FileServlet - Installing package...
2022-03-08T22:20:49,041 [DeploymentAgent] INFO  o.e.k.d.a.i.DeploymentAgent - About to install package at URL file:/tmp/de.dentrassi.kura.addons.drools.component_0.8.4-SNAPSHOT.dp
2022-03-08T22:20:49,527 [DeploymentAgent] INFO  o.e.k.d.a.i.DeploymentAgent - Posting INSTALLED event for package at URL file:/tmp/de.dentrassi.kura.addons.drools.component_0.8.4-SNAPSHOT.dp: successful

2022-03-08T22:22:06,435 [qtp682662820-45] INFO  o.e.k.w.s.GwtDeviceServiceImpl - Starting bundle with ID: 151
2022-03-08T22:22:06,436 [qtp682662820-45] ERROR o.e.k.w.s.GwtDeviceServiceImpl - Failed to start bundle 151
org.osgi.framework.BundleException: Could not resolve module: de.dentrassi.kura.addons.drools.component [151]
  Unresolved requirement: Import-Package: org.eclipse.kura.wire; version="[1.0.0,1.1.0)"

When I changed the kura api version to 2.1.0 in pom.xml of drools components folder and tried to maven install. I got following error:

 kura-addons-master/drools/de.dentrassi.kura.addons.drools.component/src/main/java/de/dentrassi/kura/addons/drools/component/AbstractWireComponent.java:[39,50] method newWireSupport in interface org.eclipse.kura.wire.WireHelperService cannot be applied to given types;
[ERROR]   required: org.eclipse.kura.wire.WireComponent,org.osgi.framework.ServiceReference<org.eclipse.kura.wire.WireComponent>
[ERROR]   found: de.dentrassi.kura.addons.drools.component.AbstractWireComponent
[ERROR]   reason: actual and formal argument lists differ in length
ctron commented 2 years ago

Looks like some incompatibilities in the API.

Unfortunately, I fear that I won't find the time to fix this anytime soon. But I would be happy to merge and release a PR.