Hey David, Thanks for the help so far, I seem to have found the problem for this one :). When looking at the mdm-parser-core’s generated manifest file I found the Require-Capability header, generated by using maven-bundle-plugin 2.5.4. I upgraded to 3.0.1 and that issue was resolved.
But alas, on to the next error :(... 13.11.2015 22:01:23.849 *ERROR* [Thread-95] org.apache.sling.extensions.threaddump.internal.Activator Uncaught exception in Thread Thread[Thread-95,5,main] org.osgi.service.subsystem.SubsystemException: org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource idoneus.mdm-parser-core [/var/folders/h1/k9tr352j615f8jrrzh5yr5b80000gn/T/inputStreamExtract734624941409606295.zip/mdm-parser-core-1.0.0-SNAPSHOT.jar] because it is exposed to package 'org.osgi.framework' from resources org.apache.felix.framework [org.apache.felix.framework [0](R 0)] and org.apache.felix.framework [org.apache.felix.framework [0](R 0)] via two dependency chains. Chain 1: idoneus.mdm-parser-core [/var/folders/h1/k9tr352j615f8jrrzh5yr5b80000gn/T/inputStreamExtract734624941409606295.zip/mdm-parser-core-1.0.0-SNAPSHOT.jar] import: (&(osgi.wiring.package=org.osgi.framework)(&(version>=1.5.0)(!(version>=2.0.0)))) | export: osgi.wiring.package: org.osgi.framework org.apache.felix.framework [org.apache.felix.framework [0](R 0)] Chain 2: idoneus.mdm-parser-core [/var/folders/h1/k9tr352j615f8jrrzh5yr5b80000gn/T/inputStreamExtract734624941409606295.zip/mdm-parser-core-1.0.0-SNAPSHOT.jar] import: (&(osgi.wiring.package=org.apache.sling.event.jobs.consumer)(&(version>=1.2.0)(!(version>=2.0.0)))) | export: osgi.wiring.package=org.apache.sling.event.jobs.consumer; uses:=org.osgi.service.event org.apache.sling.event [org.apache.sling.event [103](R 103.0)] import: (&(osgi.wiring.package=org.osgi.service.event)(version>=1.2.0)(!(version>=2.0.0))) | export: osgi.wiring.package=org.osgi.service.event; uses:=org.osgi.framework org.apache.felix.eventadmin [org.apache.felix.eventadmin [9](R 9.0)] import: (&(osgi.wiring.package=org.osgi.framework)(version>=1.3.0)(!(version>=2.0.0))) | export: osgi.wiring.package: org.osgi.framework org.apache.felix.framework [org.apache.felix.framework [0](R 0)] at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:395) Any clue in this one ? (again, when installing these two bundles, api and core, without a subsystem but with the newly generated manifest from maven-bundle-plugin 3.0.1, this issue does not arise) Thanks! Roy > On 13 Nov 2015, at 09:29, David Bosschaert <david.bosscha...@gmail.com> wrote: > > Hi Roy, > > It's looking for an provider of the osgi.service capability for the > service org.apache.sling.event.jobs.JobManager. > Normally those requirements are of type 'effective:=active'... as they > are a hint to a provisioning system but should not influence > resolution. This service is provided by Sling, but maybe it does not > have the capability in its manifest (yet). By having it > effective:=active the system should still resolve regardless of > whether the service provider actually declares that capability. > > So such a requirement is either in one of your bundles (e.g. in > mdm-parser-core-1.0.0-SNAPSHOT.jar) or in the subsystem? If so I > wonder how that requirement was generated there? The requirement > should be fine if you use the JobManager but it should have the > 'effective:=active' directive, e.g. > > Require-Capability: osgi.service; > filter:="(objectClass=com.foo.MyService)"; effective:="active" > > See also 134.16.2.2 of the OSGi Enterprise R6 spec [1]. > > Cheers, > > David > > [1] https://www.osgi.org/developer/downloads/release-6/ > > On 12 November 2015 at 23:23, Roy Teeuwen <r...@teeuwen.be> wrote: >> Hey David, >> >> I’m currently using the Sling launchpad 9-SNAPSHOT, and I can indeed >> directly install the subsystems felix webconsole, so perfect, thanks! >> >> But now when I try to iinstall an esa I get following exception. Is there >> anything extra I should to do get it working in Sling? >> >> 13.11.2015 00:18:00.060 *ERROR* [Thread-119] >> org.apache.sling.extensions.threaddump.internal.Activator Uncaught exception >> in Thread Thread[Thread-119,5,main] >> org.osgi.service.subsystem.SubsystemException: >> org.osgi.service.resolver.ResolutionException: Unable to resolve >> /var/folders/h1/k9tr352j615f8jrrzh5yr5b80000gn/T/inputStreamExtract4257393115279757160.zip/mdm-parser-core-1.0.0-SNAPSHOT.jar: >> missing requirement >> org.apache.aries.subsystem.core.archive.RequireCapabilityRequirement: >> namespace=osgi.service, attributes={}, >> directives={filter=(objectClass=org.apache.sling.event.jobs.JobManager), >> effective=active, resolution=mandatory, cardinality=single}, >> resource=/var/folders/h1/k9tr352j615f8jrrzh5yr5b80000gn/T/inputStreamExtract4257393115279757160.zip/mdm-parser-core-1.0.0-SNAPSHOT.jar >> at >> org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:395) >> at >> org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:356) >> at >> org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:98) >> at >> org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:90) >> at >> org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:54) >> at >> org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:30) >> at java.security.AccessController.doPrivileged(Native Method) >> at >> org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:646) >> at >> org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:690) >> at >> org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:278) >> at >> org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:65) >> at >> org.apache.felix.webconsole.plugins.subsystem.internal.WebConsolePlugin$1.exec(WebConsolePlugin.java:191) >> at >> org.apache.felix.webconsole.plugins.subsystem.internal.WebConsolePlugin$5.run(WebConsolePlugin.java:267) >> at java.lang.Thread.run(Thread.java:745) >> Caused by: org.osgi.service.resolver.ResolutionException: Unable to resolve >> /var/folders/h1/k9tr352j615f8jrrzh5yr5b80000gn/T/inputStreamExtract4257393115279757160.zip/mdm-parser-core-1.0.0-SNAPSHOT.jar: >> missing requirement >> org.apache.aries.subsystem.core.archive.RequireCapabilityRequirement: >> namespace=osgi.service, attributes={}, >> directives={filter=(objectClass=org.apache.sling.event.jobs.JobManager), >> effective=active, resolution=mandatory, cardinality=single}, >> resource=/var/folders/h1/k9tr352j615f8jrrzh5yr5b80000gn/T/inputStreamExtract4257393115279757160.zip/mdm-parser-core-1.0.0-SNAPSHOT.jar >> at >> org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42) >> at >> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:235) >> at >> org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:158) >> at >> org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:373) >> >> It is generated by following plugin and is a feature, so by my knowledge all >> services/bundles should just be imported/exported. The dependencies are 3 >> bundles with all the rest of their dependencies already available in the >> standard Sling 9-SNAPSHOT (if I install the 3 bundles separately through the >> webconsole, everything works fine so): >> >> <plugin> >> <groupId>org.apache.aries</groupId> >> <artifactId>esa-maven-plugin</artifactId> >> <version>1.0.0</version> >> <extensions>true</extensions> >> <configuration> >> <generateManifest>true</generateManifest> >> <startOrder>dependencies</startOrder> >> <instructions> >> >> <Subsystem-Type>osgi.subsystem.feature</Subsystem-Type> >> </instructions> >> </configuration> >> </plugin> >> >> Thanks alot! >> Greets >> Roy >> >>> On 12 Nov 2015, at 13:24, David Bosschaert <david.bosscha...@gmail.com> >>> wrote: >>> >>> Hi Roy, >>> >>> That blog post references old-ish versions of the relevant bundles. >>> You might want to take a look at >>> http://aries.apache.org/modules/subsystems.html for a newer list of >>> bundles required. >>> >>> Alternatively you can just use the latest Sling launchpad (9-SNAPSHOT, >>> which you'd have to build yourself). It has all the deps for >>> Subsystems installed. Just install the webconsole plugin on top of >>> that and it should work - I just tried it and it works for me :) >>> >>> Cheers, >>> >>> David >>> >>> On 12 November 2015 at 11:58, Roy Teeuwen <r...@teeuwen.be> wrote: >>>> Hey David, >>>> >>>> I tried your second approach. >>>> >>>> I first installed subsystems on felix by following this guide: >>>> >>>> http://coderthoughts.blogspot.be/2014/01/osgi-subsytems-on-apache-felix.html >>>> >>>> <http://coderthoughts.blogspot.be/2014/01/osgi-subsytems-on-apache-felix.html> >>>> >>>> Afterwords I tried to install a subsystem through the webconsole, but the >>>> error.log returns following exception: >>>> >>>> 12.11.2015 12:48:31.624 *ERROR* [Thread-65] >>>> org.apache.sling.extensions.threaddump.internal.Activator Uncaught >>>> exception in Thread Thread[Thread-65,5,main] >>>> org.osgi.service.subsystem.SubsystemException: >>>> java.net.MalformedURLException: Unknown protocol: inputstream >>>> at >>>> org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:101) >>>> at >>>> org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:31) >>>> at java.security.AccessController.doPrivileged(Native Method) >>>> at >>>> org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:560) >>>> at >>>> org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:252) >>>> at >>>> org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:58) >>>> at >>>> org.apache.felix.webconsole.plugins.subsystem.internal.WebConsolePlugin$1.exec(WebConsolePlugin.java:191) >>>> at >>>> org.apache.felix.webconsole.plugins.subsystem.internal.WebConsolePlugin$5.run(WebConsolePlugin.java:267) >>>> at java.lang.Thread.run(Thread.java:745) >>>> Caused by: java.net.MalformedURLException: Unknown protocol: inputstream >>>> at java.net.URL.<init>(URL.java:620) >>>> at java.net.URL.<init>(URL.java:483) >>>> at java.net.URL.<init>(URL.java:432) >>>> at java.net.URI.toURL(URI.java:1089) >>>> at >>>> org.apache.aries.subsystem.core.internal.Location.<init>(Location.java:69) >>>> at >>>> org.apache.aries.subsystem.core.internal.RawSubsystemResource.<init>(RawSubsystemResource.java:113) >>>> at >>>> org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:92) >>>> at >>>> org.apache.aries.subsystem.core.internal.InstallAction.createSubsystemResource(InstallAction.java:128) >>>> at >>>> org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:62) >>>> ... 8 common frames omitted >>>> Caused by: java.lang.IllegalStateException: Unknown protocol: inputstream >>>> at >>>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:373) >>>> at java.net.URL.<init>(URL.java:615) >>>> ... 16 common frames omitted >>>> >>>> >>>> Any idea where it’s going wrong? >>>> >>>> Greetings >>>> Roy >>>> >>>>> On 12 Nov 2015, at 11:11, David Bosschaert <david.bosscha...@gmail.com> >>>>> wrote: >>>>> >>>>> Hi Roy, >>>>> >>>>> You currently have a couple of options in Sling to install subsystems. >>>>> >>>>> 1. Directly by calling the OSGi Subsystem Service >>>>> https://osgi.org/javadoc/r6/enterprise/org/osgi/service/subsystem/Subsystem.html >>>>> but this requires you to create some code around it. >>>>> 2. With the webconsole subsystem plugin >>>>> https://svn.apache.org/repos/asf/felix/trunk/webconsole-plugins/subsystems >>>>> this plugin is currently under vote for its first release, but you can >>>>> build it yourself from that URL and install it into sling. That plugin >>>>> looks like this: http://tinypic.com/r/2z8tbpe/8 >>>>> 3. You can also feed .esa files to the OSGi Installer in sling, e.g. >>>>> by putting them in the install directory... >>>>> >>>>> If you're just experimenting, option 2 is definitely the easiest. >>>>> >>>>> Cheers, >>>>> >>>>> David >>>>> >>>>> On 12 November 2015 at 09:31, Roy Teeuwen <r...@teeuwen.be> wrote: >>>>>> Hey all, >>>>>> >>>>>> I have fetched the sling launchpad 8 from maven central and I made a >>>>>> subsystem with the esa maven plugin from apache aries. Now when I want >>>>>> to install it, I get a popup with the error “You cannot select a .esa >>>>>> file. Try again…" >>>>>> >>>>>> Is this not the way to install OSGi subsystems? And would it be possible >>>>>> to install this esa with the maven-bundle plugin? >>>>>> >>>>>> Greetings, >>>>>> Roy >>>>>> >>>>>> >>>> >>