Class loading error when looking up security providers
Sean Mullan
sean.mullan at oracle.com
Wed Jun 13 08:10:39 PDT 2012
On 6/13/12 9:58 AM, Paul Sandoz wrote:
> Hi Sean,
>
> Looking at the code the problem is the class "com.sun.crypto.provider.SunJCE" is in the jdk.crypto module and the code to load crypto providers does:
>
> ClassLoader cl;
> if (Platform.isModuleMode()) {
> cl = Platform.getBaseModuleLoader();
> } else {
> cl = ClassLoader.getSystemClassLoader();
> }
> Class<?> provClass;
> if (cl != null) {
> provClass = cl.loadClass(className);
> } else {
> provClass = Class.forName(className);
> }
>
> So it is using the CL of the jdk.base module, which cannot see classes from the jdk.crypto module.
>
> As the comment in the source that occurs above the above snippet states, this area needs to start using services.
Ok, but I need a workaround for the time-being. If you think of anything, let me
know.
--Sean
More information about the jigsaw-dev
mailing list