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

com.sun.deploy.security.X509CertificateWrapper cannot be cast to sun.security.x509.X509CertImpl

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 8u5
    • Fix Version/s: 8u5
    • Component/s: deploy
    • Labels:
      None
    • Environment:

      Windows

      Description

      Sometimes this ClassCastException is thrown while running JUnit tests on jdk8u-cpu.
      Sometimes it appears during manual testing of JNLP applets although it is not 100% reproducible (in most cases applet run but 2 or 3 times I got this exception thrown).


      network: Connecting http://ocsp.thawte.com/ with proxy=HTTP @ www-proxy.us.oracle.com/148.87.19.20:80
      basic: exception: User has denied the privileges to the code.
      com.sun.deploy.security.BlockedException: User has denied the privileges to the code
      at sun.plugin2.applet.Plugin2ClassLoader.getTrustedCodeSources(Plugin2ClassLoader.java:1239)
      at com.sun.deploy.security.CPCallbackHandler$ParentCallback.strategy(CPCallbackHandler.java:232)
      at com.sun.deploy.security.CPCallbackHandler$ParentCallback.openClassPathElement(CPCallbackHandler.java:195)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(DeployURLClassPath.java:823)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(DeployURLClassPath.java:727)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(DeployURLClassPath.java:764)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(DeployURLClassPath.java:758)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(DeployURLClassPath.java:747)
      at com.sun.deploy.security.DeployURLClassPath$3.run(DeployURLClassPath.java:432)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.deploy.security.DeployURLClassPath.getLoader(DeployURLClassPath.java:422)
      at com.sun.deploy.security.DeployURLClassPath.getLoader(DeployURLClassPath.java:396)
      at com.sun.deploy.security.DeployURLClassPath.getResource(DeployURLClassPath.java:254)
      at sun.plugin2.applet.Plugin2ClassLoader$1.run(Plugin2ClassLoader.java:1085)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Plugin2ClassLoader.java:1075)
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:158)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:273)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:203)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:263)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:203)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:184)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Plugin2ClassLoader.java:838)
      at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Plugin2Manager.java:2506)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1628)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ClassCastException: com.sun.deploy.security.X509CertificateWrapper cannot be cast to sun.security.x509.X509CertImpl
      at sun.security.provider.certpath.OCSPResponse.verify(Unknown Source)
      at sun.security.provider.certpath.OCSP.check(Unknown Source)
      at sun.security.provider.certpath.OCSP.check(Unknown Source)
      at sun.security.provider.certpath.OCSP.check(Unknown Source)
      at com.sun.deploy.security.RevocationChecker.checkOCSP(RevocationChecker.java:193)
      at com.sun.deploy.security.RevocationChecker.check(RevocationChecker.java:142)
      at com.sun.deploy.security.TrustDecider.checkRevocationStatus(TrustDecider.java:668)
      at com.sun.deploy.security.TrustDecider.getValidationState(TrustDecider.java:510)
      at com.sun.deploy.security.TrustDecider.validateChain(TrustDecider.java:338)
      at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(TrustDecider.java:987)
      at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Plugin2ClassLoader.java:596)
      at sun.plugin2.applet.Plugin2ClassLoader.getTrustedCodeSources(Plugin2ClassLoader.java:1232)
      ... 27 more

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dtitov Daniil Titov
                Reporter:
                dtitov Daniil Titov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: