Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The following NPE happens if you have a resource with no bundle manifest:
java.lang.NullPointerException at org.apache.aries.subsystem.core.internal.BundleResource.computeManifest(BundleResource.java:62) at org.apache.aries.subsystem.core.internal.BundleResource.<init>(BundleResource.java:73) at org.apache.aries.subsystem.core.internal.RawSubsystemResource.addResource(RawSubsystemResource.java:499) at org.apache.aries.subsystem.core.internal.RawSubsystemResource.computeResources(RawSubsystemResource.java:459) at org.apache.aries.subsystem.core.internal.RawSubsystemResource.<init>(RawSubsystemResource.java:134) at org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:91) at org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:60) at org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:27) at java.security.AccessController.doPrivileged(Native Method) at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:677) at org.apache.aries.subsystem.core.internal.BasicSubsystem.install(BasicSubsystem.java:671) at com.ibm.ws.app.manager.esa.internal.DeploySubsystemAction.installSubsystem(DeploySubsystemAction.java:190) at com.ibm.ws.app.manager.esa.internal.DeploySubsystemAction.deploySubsystem(DeploySubsystemAction.java:163) at com.ibm.ws.app.manager.esa.internal.DeploySubsystemAction.deploy(DeploySubsystemAction.java:113) at com.ibm.ws.app.manager.esa.internal.SubsystemHandler.install(SubsystemHandler.java:356) at com.ibm.ws.app.manager.esa.internal.EBAToSubsystemHandler.install(EBAToSubsystemHandler.java:194) at com.ibm.ws.app.manager.internal.statemachine.StartAction.execute(StartAction.java:141) at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.enterState(ApplicationStateMachineImpl.java:1259) at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.run(ApplicationStateMachineImpl.java:874) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748)
The following happens if a jar resource is included in the ESA which has no Bundle-SymbolicName header:
java.lang.NullPointerException at org.apache.aries.subsystem.core.archive.FragmentHostCapability.initializeAttributes(FragmentHostCapability.java:38) at org.apache.aries.subsystem.core.archive.FragmentHostCapability.<init>(FragmentHostCapability.java:67) at org.apache.aries.subsystem.core.internal.BundleResource.computeOsgiWiringHostCapability(BundleResource.java:191) at org.apache.aries.subsystem.core.internal.BundleResource.computeRequirementsOtherThanService(BundleResource.java:245) at org.apache.aries.subsystem.core.internal.BundleResource.computeRequirementsAndCapabilities(BundleResource.java:216) at org.apache.aries.subsystem.core.internal.BundleResource.<init>(BundleResource.java:74) at org.apache.aries.subsystem.core.internal.RawSubsystemResource.addResource(RawSubsystemResource.java:472) at org.apache.aries.subsystem.core.internal.RawSubsystemResource.computeResources(RawSubsystemResource.java:457) at org.apache.aries.subsystem.core.internal.RawSubsystemResource.<init>(RawSubsystemResource.java:134) at org.apache.aries.subsystem.core.internal.SubsystemResource.<init>(SubsystemResource.java:91) at org.apache.aries.subsystem.core.internal.InstallAction.run(InstallAction.java:60)
In both cases we should give a good exception message to log and simply ignore the resource and continue on installing the subsystem.