Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
4.0.6
-
None
-
None
-
None
Description
I have a feature that works correctly on Karaf 4.0.5. When I try to install it on Karaf 4.0.6, I get an error.
2016-09-24 16:03:56,955 | ERROR | nsole user karaf | ShellUtil | 43 - org.apache.karaf.shell.core - 4.0.6 | Exception caught while executing command org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=myapp; type=karaf.feature; version="[1.4.0.SNAPSHOT,1.4.0.SNAPSHOT ]"; filter:="(&(osgi.identity=myapp)(type=karaf.feature)(version>=1.4.0.SNAPSHOT)(version<=1.4.0.SNAPSHOT))" [caused by: Unable to resolve myapp/1.4.0.SNAPSHOT: missing requirement [myapp/1 .4.0.SNAPSHOT] osgi.identity; osgi.identity=com.myapp.mybundle; type=osgi.bundle; version="[1.4.0.SNAPSHOT,1.4.0.SNAPSHOT]"; resolution:=mandatory [caused by: Unable to resolve com.myapp.mybundle/1.4.0.SNAPSHOT: missing requirement [com.myapp.mybundle/1.4.0.SNAPSHOT] osgi.service; effective:=active; filter:="(&(objectClass=javax.sql.DataSource)(osgi.jndi.service.n ame=myDB))"]] at org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)[8:org.apache.karaf.features.core:4.0.6] at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:235)[8:org.apache.karaf.features.core:4.0.6] at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:158)[8:org.apache.karaf.features.core:4.0.6] at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:216)[8:org.apache.karaf.features.core:4.0.6] at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:263)[8:org.apache.karaf.features.core:4.0.6] at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1176)[8:org.apache.karaf.features.core:4.0.6] at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:1074)[8:org.apache.karaf.features.core:4.0.6] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_92] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_92] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_92] at java.lang.Thread.run(Thread.java:745)[:1.8.0_92]
The feature has a bundle com.myapp.mybundle with a blueprint file with a reference to a service registered earlier.
<reference id="dataSourceRef" interface="javax.sql.DataSource" filter="(osgi.jndi.service.name=myDB)" />
The service is registered correctly with the required interface and property.
When I install the bundle manually from the Karaf shell, it installs correctly.
When I remove the filter from the blueprint reference,
<reference id="dataSourceRef" interface="javax.sql.DataSource"
filter="(osgi.jndi.service.name=myDB)" />
both the feature and the bundle install correctly.