I thought that the hard dependency on the application modeller was removed some months ago. AFAIK the modeller is used as an integration with Blueprint (I could be wrong though) and I think the subsystems implementation is still spec-compliant without it.
I'm planning to do an Aries subsystems release soon, I'll run the CT for that without the modeller to make sure and will share the results here. Best regards, David On 19 March 2015 at 15:38, Manuel Holzleitner <[email protected]> wrote: > Hello, > > I would like to better understand the implication of running the subsystem > module without using the (optional) aries application modeller module? Is > the subsystem module still compliant with the OSGI spec (e.g. with regards > to capability checking, subsystem-service imports) or are there any > deviations? > > I face issues with the application modeller enabled, because the > installation of a subsystem may fail if a service is referenced by a bundle > that is contained in this subsystem. When finding the providers of this > service it seems that it looks over all the constituents in the root > subsystem to search for a provide-capability in the osgi.service namespace. > However, in this process it may processes a bundle that is not fully OSGI > compatible manifests (e.g. missing Bundle-ManifestVersion header) and then > breaks the complete installation process. In another case it fails because > it trys to compute the requirements and capabilities on the system bundle > which does not have a manifest file in felix (see exception [1], the > statement BundleManifest.fromBundle(archive); in > ModelledResourceManagerImpl returns null) > > Kind Regards, > Manuel > > org.osgi.service.subsystem.SubsystemException: > org.apache.aries.application.modelling.ModellerException: > java.lang.NullPointerException > at > org.apache.aries.subsystem.core.internal.ApplicationServiceModeller.computeRequirementsAndCapabilities(ApplicationServiceModeller.java:90) > at > org.apache.aries.subsystem.core.internal.BundleRevisionResource.computeServiceCapabilities(BundleRevisionResource.java:70) > at > org.apache.aries.subsystem.core.internal.BundleRevisionResource.getCapabilities(BundleRevisionResource.java:46) > at > org.apache.aries.subsystem.core.internal.BundleResourceInstaller$BundleConstituent.getCapabilities(BundleResourceInstaller.java:74) > at > org.apache.aries.subsystem.core.internal.SystemRepository.findProviders(SystemRepository.java:59) > at > org.apache.aries.subsystem.core.internal.SystemRepository.findProviders(SystemRepository.java:44) > at > org.apache.aries.subsystem.core.internal.SystemRepository.findProviders(SystemRepository.java:38) > at > org.apache.aries.subsystem.core.internal.SubsystemResource.addDependencies(SubsystemResource.java:278) > at > org.apache.aries.subsystem.core.internal.SubsystemResource.addDependenciesFromSystemRepository(SubsystemResource.java:309) > at > org.apache.aries.subsystem.core.internal.SubsystemResource.access$200(SubsystemResource.java:75) > at > org.apache.aries.subsystem.core.internal.SubsystemResource$2.findProviders(SubsystemResource.java:519) > at > org.apache.felix.resolver.Candidates.populateResource(Candidates.java:265) > at org.apache.felix.resolver.Candidates.populate(Candidates.java:153) > at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:148) > at > org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:410) > at > org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:393) > at > org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:101) > at > org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:92) > at > org.apache.aries.subsystem.core.internal.InstallAction.createSubsystemResource(InstallAction.java:134) > at > org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:55) > at > org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:33) > at java.security.AccessController.doPrivileged(Native Method) > at > org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:621) > at > org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:259) > at > org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:63) > at > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) > at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:43) > at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) > at org.junit.runners.ParentRunner.run(ParentRunner.java:236) > at org.junit.runner.JUnitCore.run(JUnitCore.java:157) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74) > at > com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211) > at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) > Caused by: org.apache.aries.application.modelling.ModellerException: > java.lang.NullPointerException > at > org.apache.aries.application.modelling.impl.ModelledResourceManagerImpl.getServiceElements(ModelledResourceManagerImpl.java:128) > at > org.apache.aries.application.modelling.impl.ModelledResourceManagerImpl.getServiceElements(ModelledResourceManagerImpl.java:95) > at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54) > at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119) > at com.sun.proxy.$Proxy9.getServiceElements(Unknown Source) > at > org.apache.aries.subsystem.core.internal.ApplicationServiceModeller.computeRequirementsAndCapabilities(ApplicationServiceModeller.java:44) > ... 53 more > Caused by: java.lang.NullPointerException > at > org.apache.aries.application.modelling.internal.BundleBlueprintParser.<init>(BundleBlueprintParser.java:89) > at > org.apache.aries.application.modelling.impl.ModelledResourceManagerImpl.findBlueprints(ModelledResourceManagerImpl.java:222) > at > org.apache.aries.application.modelling.impl.ModelledResourceManagerImpl.getServiceElements(ModelledResourceManagerImpl.java:117) > ... 61 more >
