Class loading error when looking up security providers

Alan Bateman Alan.Bateman at oracle.com
Wed Jun 13 07:06:34 PDT 2012


On 13/06/2012 14:00, Sean Mullan wrote:
> I'm seeing several ClassNotFoundException errors when some of the security
> providers are loaded, ex: (using java.security.debug trace):
>
> ProviderConfig: Error loading provider com.sun.crypto.provider.SunJCE
> java.lang.ClassNotFoundException: com.sun.crypto.provider.SunJCE : requested by
> +jdk.auth+jdk.base+jdk.desktop+jdk.jndi+jdk.prefs+jdk.tls+sun.charsets+sun.localedata+sun.resources
> 	at org.openjdk.jigsaw.Loader.loadClass(Loader.java:116)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> 	at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:231)
> 	at sun.security.jca.ProviderConfig$2.run(ProviderConfig.java:207)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at sun.security.jca.ProviderConfig.doLoadProvider(ProviderConfig.java:207)
> 	at sun.security.jca.ProviderConfig.getProvider(ProviderConfig.java:188)
> 	at sun.security.jca.ProviderList.getProvider(ProviderList.java:233)
> 	at sun.security.jca.ProviderList.getIndex(ProviderList.java:263)
> 	at sun.security.jca.ProviderList.getProviderConfig(ProviderList.java:247)
> 	at sun.security.jca.ProviderList.getProvider(ProviderList.java:253)
> 	at java.security.Security.getProvider(Security.java:472)
> 	at javax.crypto.Cipher.getInstance(Cipher.java:587)
> 	at test.CipherTest.main(CipherTest.java:10)
>
> I'm looking into this right now, but if anyone has any tips on how to debug
> further let me know.
>
The JCA code is using the system class loader so it doesn't make sense 
when running with modules. I think this security code will need to 
changed to load the security provider as services.

-Alan.



More information about the jigsaw-dev mailing list