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

David Bosschaert commented on FELIX-4960:
-----------------------------------------

Right - there is actually a more specific exception that is being logged from 
this line of code in getContentPath(): 
{code}((BundleImpl) m_bundle).getFramework().getLogger().log(m_bundle, 
Logger.LOG_ERROR, "Unable to get module class path.", ex);{code}
However execution continues after this leading to the NPE. I think the NPE 
should not happen in either case...

> 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