[
https://issues.apache.org/jira/browse/FELIX-3178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153169#comment-13153169
]
Richard S. Hall commented on FELIX-3178:
----------------------------------------
Ok, I've gotten to the bottom of this second issue. It is actually completely
unrelated to the first issue, so technically we could open another bug on it,
but it's probably not necessary.
This second issue has existed for a while, I believe. Essentially, candidates
for bundle revisions are populated in a recursive fashion. The approach must
allow for cycles and does this by essentially picking up where it left off on a
given revision when it tries to populate a revision that it is already
populating.
With this approach, it is possible that a given revision can fail at a deeper
level in the recursion stack than where it started. However, there were certain
scenarios where this would go unnoticed at the higher level because resolve
failures do not necessarily get thrown to the top immediately.
To remedy this, after returning from a deeper recursion level, the algorithm
must double check to make sure that the revision it is resolving didn't already
fail in a deeper level.
> NPE in ResolverImpl
> -------------------
>
> Key: FELIX-3178
> URL: https://issues.apache.org/jira/browse/FELIX-3178
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: framework-4.0.0
> Environment: Also reproduced on 4.0.1
> Reporter: Andreas Schlosser
> Assignee: Richard S. Hall
> Priority: Blocker
> Fix For: framework-4.2.0
>
> Attachments: MANIFEST.MF, npe.z01, npe.z02, npe.zip, npe2.z01,
> npe2.z02, npe2.z03, npe2.z04, npe2.zip
>
>
> Bundle Resolution fails with NPE in both, Felix 4.0.0 and 4.0.1
> ERROR: Bundle com.springsource.com.sun.tools.xjc [119] Error starting
> file:bundles/com.springsource.com.sun.tools.xjc.jar
> (java.lang.NullPointerException)
> java.lang.NullPointerException
> at
> org.apache.felix.framework.resolver.ResolverImpl.mergeUses(ResolverImpl.java:856)
> at
> org.apache.felix.framework.resolver.ResolverImpl.calculatePackageSpaces(ResolverImpl.java:659)
> at
> org.apache.felix.framework.resolver.ResolverImpl.calculatePackageSpaces(ResolverImpl.java:609)
> at
> org.apache.felix.framework.resolver.ResolverImpl.resolve(ResolverImpl.java:181)
> at
> org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:168)
> at
> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3811)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)
> at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
> at
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
> at java.lang.Thread.run(Thread.java:662)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira