[ 
https://issues.apache.org/jira/browse/FELIX-4960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14627658#comment-14627658
 ] 

Grzegorz Grzybek commented on FELIX-4960:
-----------------------------------------

I had similar issue, when old BundleClassLoader was used to get resources. This 
was the case described in ARIES-1161 and the 
[fix|https://github.com/apache/aries/commit/760dac830ac7a84f628a27dc680a9ba6ee1ba711]
 was to switch the key from bundle to bundle wiring.
The problem occurred after updating bundle. Old bundle wiring (and classloader) 
was invalid, but was still used leading to NPE in Felix code.

> NPE in BundleRevisionImpl.getResourcesLocal()
> ---------------------------------------------
>
>                 Key: FELIX-4960
>                 URL: https://issues.apache.org/jira/browse/FELIX-4960
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.4.0, framework-5.0.1
>            Reporter: David Bosschaert
>            Assignee: David Bosschaert
>             Fix For: framework-5.0.2
>
>
> In some situations a NPE can be observed in the 
> BundleRevisionImpl.getResourcesLocal() method.
> {code}java.lang.NullPointerException: null
>    at 
> org.apache.felix.framework.BundleRevisionImpl.getResourcesLocal(BundleRevisionImpl.java:531)
>    at 
> org.apache.felix.framework.BundleWiringImpl.findResourcesByDelegation(BundleWiringImpl.java:1191)
>    at 
> org.apache.felix.framework.BundleWiringImpl.getResourcesByDelegation(BundleWiringImpl.java:1101)
>    at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5.getResources(BundleWiringImpl.java:1888){code}
> The offending line of code is: 
> {code}  for (int i = 0; i < contentPath.size(); i++){code}
> So it seems that contentPath is null in some cases.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to