JDK-8030699 : com.sun.deploy.security.X509CertificateWrapper cannot be cast to sun.security.x509.X509CertImpl
  • Type: Bug
  • Component: deploy
  • Affected Version: 8u5
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2013-12-18
  • Updated: 2014-01-13
  • Resolved: 2014-01-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u5Resolved
Related Reports
Duplicate :  
Duplicate :  
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

Comments
resolving as duplicate of JDK-809788, can be verified in b122
13-01-2014

Cannot reproduce on JDK8-b122 nightly from Dec 31st.
31-12-2013

to To be verified as a duplicate of JDK-8029788 with JDK 8-b122.
31-12-2013

he easiest way to reproduce it was just to install jdk8 and go to http://www.java.com/en/download/installed.jsp and click "Verify Java Version".
31-12-2013