[
https://issues.apache.org/jira/browse/FELIX-3178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134235#comment-13134235
]
Richard S. Hall commented on FELIX-3178:
----------------------------------------
Ok, I see what is going on. Previously, the framework treated caps/reqs from
attached fragments as if they came from the host, but the R4.3 API treats
attached caps/reqs as coming from the fragment making the host/fragment tuple
explicit. Internally, the resolver deals with this by wrapping any attached
caps/reqs to make it look like they come from the host hiding the host/fragment
tuple.
Unfortunately, when calculating package sources during a resolve in
getPackageSourceInternal() the wrapper is lost, which ultimately causes the NPE
since the resolve subsequently tries to wire to a fragment capability directly,
but cannot find its package space because it doesn't exist since it should be
using the host's package space instead.
I'll need to think about the proper way to resolve this issue, but given this
knowledge I should be able to create a simple test case to recreate it, so I'll
attempt to do that first.
> 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
> Priority: Blocker
> Fix For: framework-4.2.0
>
> Attachments: MANIFEST.MF, npe.z01, npe.z02, npe.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