Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6947169

java.util.jar.JarException: Class is on the bootclasspath with modules build

    Details

      Description

      Exception in thread "main" java.security.NoSuchProviderException: JCE cannot authenticate the provider SunJCE
              at javax.crypto.JceSecurity.getInstance(JceSecurity.java:101)
              at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:190)
              at JCE.main(JCE.java:7)
      Caused by: java.util.jar.JarException: Class is on the bootclasspath
              at javax.crypto.JarVerifier.verify(JarVerifier.java:248)
              at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:161)
              at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:187)
              at javax.crypto.JceSecurity.getInstance(JceSecurity.java:98)
              ... 2 more

      Use this program to reproduce the failure (works fine with standard J2SDK):

      import java.security.*;
      import javax.crypto.*;
      import javax.crypto.spec.*;

      public class JCE {
              public static void main(String[] args) throws Exception {
                      SecretKeyFactory keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES", "SunJCE");
              }
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nhaustov Nicolay Haustov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: