[
https://issues.apache.org/jira/browse/KARAF-6160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16787538#comment-16787538
]
ASF GitHub Bot commented on KARAF-6160:
---------------------------------------
asfgit commented on pull request #774: fix the KARAF-6160
URL: https://github.com/apache/karaf/pull/774
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> NPE when setting configCfgStore=false in the org.apache.karaf.features.cfg
> --------------------------------------------------------------------------
>
> Key: KARAF-6160
> URL: https://issues.apache.org/jira/browse/KARAF-6160
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.2.3
> Environment: Java 8
> Reporter: Xilai Dai
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 4.3.0, 4.2.4
>
>
> When setting configCfgStore=false in the org.apache.karaf.features.cfg, and
> adding a feature (with config element defined) into boot feature list, then
> {code}
> org.apache.karaf.features.core[org.apache.karaf.features.internal.service.BootFeaturesInstaller]
> : Error installing boot features
> java.lang.NullPointerException
> at
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.installFeatureConfigs(FeatureConfigInstaller.java:118)
> at
> org.apache.karaf.features.internal.service.BundleInstallSupportImpl.installConfigs(BundleInstallSupportImpl.java:297)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.installConfigs(FeaturesServiceImpl.java:1174)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:926)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1058)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:994)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> {code}
> NPE is thrown from L118 of FeatureConfigInstaller.java, the cfgFile is not
> initialized in case of configCfgStore is false!
> {code}
> File cfgFile = null;
> if (storage != null && configCfgStore) {
> cfgFile = new File(storage, cid.fullPid + ".cfg");
> }
> if (!cfgFile.exists()) { ......
> {code}
> (No this problem on Karaf 4.1.x)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)