You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Bob Paulin (Jira)" <ji...@apache.org> on 2020/01/31 14:54:00 UTC
[jira] [Created] (KARAF-6612) Get NPE in
FeatureDeploymentListener.bundleChanged()
Bob Paulin created KARAF-6612:
---------------------------------
Summary: Get NPE in FeatureDeploymentListener.bundleChanged()
Key: KARAF-6612
URL: https://issues.apache.org/jira/browse/KARAF-6612
Project: Karaf
Issue Type: Bug
Components: karaf
Affects Versions: 4.2.8, 4.2.1
Reporter: Bob Paulin
I'm trying to run a standard distribution with all features defined as startup. When I do this the karaf instance starts but logs a number of errors:
{code:java}
2020-01-30T21:36:36,333 | ERROR | activator-1-thread-2 | FeatureDeploymentListener | 27 - org.apache.karaf.deployer.features - 4.2.8 | Unable to update deployed features for bundle: org.apache.karaf.features.extension - 4.2.8
java.lang.NullPointerException: null
at org.apache.karaf.deployer.features.FeatureDeploymentListener.bundleChanged(FeatureDeploymentListener.java:247) [!/:?]
at org.apache.karaf.deployer.features.FeatureDeploymentListener.init(FeatureDeploymentListener.java:95) [!/:?]
at org.apache.karaf.deployer.features.osgi.Activator$DeploymentFinishedListener.deploymentEvent(Activator.java:86) [!/:?]
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.registerListener(FeaturesServiceImpl.java:295) [!/:?]
at org.apache.karaf.deployer.features.osgi.Activator.doStart(Activator.java:53) [!/:?]
at org.apache.karaf.util.tracker.BaseActivator.run(BaseActivator.java:312) [!/:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]{code}
Some debugging shows the in the FeatureDeploymentListener the featuresService.listRequirements() is returning an empty map so the call to requirements.get(ROOT_REGION) is returning null before the next call to removeAll
{code:java}
Map<String, Set<String>> requirements =
featuresService.listRequirements();
requirements.get(ROOT_REGION).removeAll(reqsToRemove);
requirements.get(ROOT_REGION).addAll(reqsToAdd); {code}
Not sure if we just need a simple null check here or if I'm doing something not supported. Thanks!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)