[
https://issues.apache.org/jira/browse/FELIX-1453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740038#action_12740038
]
Felix Meschberger commented on FELIX-1453:
------------------------------------------
Yes, it most probably is a side effect of not being able to write the
bundle.location file initially.
The error happens on framework startup :
11:30:47,026 ERROR [[/]] ERROR: org.apache.felix.framework.cache.BundleCache:
Error creating archive. (java.lang.NullPointerException)
java.lang.NullPointerException
at
org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:978)
at org.apache.felix.framework.cache.BundleArchive.revise(BundleArchive.java:614)
at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:198)
at org.apache.felix.framework.cache.BundleCache.initialize(BundleCache.java:381)
at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:95)
at org.apache.felix.framework.Felix.init(Felix.java:492)
> BundleArchive.createRevisionFromLocation may throw NullPointerException
> -----------------------------------------------------------------------
>
> Key: FELIX-1453
> URL: https://issues.apache.org/jira/browse/FELIX-1453
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: felix-1.8.1
> Reporter: Felix Meschberger
>
> When BundleArchive.createRevisionFromLocation is called with the location
> being null, a NullPointerException is thrown on line 995 (Rev. 801082).
> The fix obviously seems to be to check for null on this line and actually
> pass it through like this:
> Index: src/main/java/org/apache/felix/framework/cache/BundleArchive.java
> ===================================================================
> --- src/main/java/org/apache/felix/framework/cache/BundleArchive.java
> (Revision 801082)
> +++ src/main/java/org/apache/felix/framework/cache/BundleArchive.java
> (Arbeitskopie)
> @@ -992,7 +992,7 @@
> location, true);
> }
> }
> - else if (location.startsWith(INPUTSTREAM_PROTOCOL))
> + else if (location == null ||
> location.startsWith(INPUTSTREAM_PROTOCOL))
> {
> // Assume all input streams point to JAR files.
> result = new JarRevision(m_logger, m_configMap,
> revisionRootDir,
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.