You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Dirk Rudolph (JIRA)" <ji...@apache.org> on 2014/09/25 16:33:33 UTC

[jira] [Created] (FELIX-4654) NullPointerException in BundleWiringImpl.findClassOrResourceByDelegation()

Dirk Rudolph created FELIX-4654:
-----------------------------------

             Summary: NullPointerException in BundleWiringImpl.findClassOrResourceByDelegation()
                 Key: FELIX-4654
                 URL: https://issues.apache.org/jira/browse/FELIX-4654
             Project: Felix
          Issue Type: Bug
    Affects Versions: framework-4.2.0
            Reporter: Dirk Rudolph


There is a potential NPE in the implementation of BundleWiringImpl.findClassOrResourceByDelegation(). When the Implementation tries to load a class using the classloader of the wiring null can be returned in case when the wiring has been disposed. I think in this case the null pointer should be handled properly instead of throwing an exception. 

{code}
java.lang.NullPointerException
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1472)
	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1923)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.bouncycastle.jcajce.provider.asymmetric.rsa.KeyFactorySpi.generatePublic(Unknown Source)
	at org.bouncycastle.jce.provider.BouncyCastleProvider.getPublicKey(Unknown Source)
	at org.bouncycastle.jce.provider.X509CertificateObject.getPublicKey(Unknown Source)
	at org.bouncycastle.operator.jcajce.JceAsymmetricKeyWrapper.<init>(Unknown Source)
	at org.bouncycastle.cms.jcajce.JceKeyTransRecipientInfoGenerator.<init>(Unknown Source)
{code}

Unfortunately this is really hard to reproduce. The problem occurs for me when I use Apache Sling in combination with javax.security and bouncycastle (everything installed as bundles) but in my eyes its not (only) related to that.





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