1 Reply Latest reply: Mar 15, 2013 4:50 AM by PhHein RSS

    certificate exception in JRE 1.7

    user10705439
      Hi,

      In our application we have done signjar, its working till jre version 1.6, we just created keystore and pass the keystore input in signjar command, all this we have done in ant.

      its working in JRE 1.6 , after install 1.7 we got the issues

      java.security.cert.CertificateParsingException: java.io.IOException: No data available in passed DER encoded value.
           at sun.security.x509.X509CertInfo.<init>(Unknown Source)
           at sun.security.x509.X509CertImpl.parse(Unknown Source)
           at sun.security.x509.X509CertImpl.<init>(Unknown Source)
           at sun.security.provider.X509Factory.parseX509orPKCS7Cert(Unknown Source)
           at sun.security.provider.X509Factory.engineGenerateCertificates(Unknown Source)
           at java.security.cert.CertificateFactory.generateCertificates(Unknown Source)
           at com.sun.deploy.security.WIExplorerCertStore.generateCertificate(Unknown Source)
           at com.sun.deploy.security.WIExplorerCertStore.loadCertificates(Native Method)
           at com.sun.deploy.security.WIExplorerCertStore.load(Unknown Source)
           at com.sun.deploy.security.WIExplorerCertStore.load(Unknown Source)
           at com.sun.deploy.security.LazyRootStore.loadBrowserStore(Unknown Source)
           at com.sun.deploy.security.LazyRootStore.getTrustAnchors(Unknown Source)
           at com.sun.deploy.security.TrustDecider.validateChain(Unknown Source)
           at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.getTrustedCodeSources(Unknown Source)
           at com.sun.deploy.security.CPCallbackHandler$ParentCallback.strategy(Unknown Source)
           at com.sun.deploy.security.CPCallbackHandler$ParentCallback.openClassPathElement(Unknown Source)
           at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
           at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
           at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
           at java.security.AccessController.doPrivileged(Native Method)
           at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
           at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
           at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
           at java.security.AccessController.doPrivileged(Native Method)
           at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
           at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
           at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
           at java.security.AccessController.doPrivileged(Native Method)
           at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
           at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
           at java.lang.ClassLoader.loadClass(Unknown Source)
           at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
           at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
           at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)
      Caused by: java.io.IOException: No data available in passed DER encoded value.
           at sun.security.x509.GeneralNames.<init>(Unknown Source)
           at sun.security.x509.SubjectAlternativeNameExtension.<init>(Unknown Source)
           at sun.reflect.GeneratedConstructorAccessor14.newInstance(Unknown Source)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
           at java.lang.reflect.Constructor.newInstance(Unknown Source)
           at sun.security.x509.CertificateExtensions.parseExtension(Unknown Source)
           at sun.security.x509.CertificateExtensions.init(Unknown Source)
           at sun.security.x509.CertificateExtensions.<init>(Unknown Source)
           at sun.security.x509.X509CertInfo.parse(Unknown Source)
           ... 43 more
      java.security.cert.CertificateParsingException: java.io.IOException: No data available in passed DER encoded value.
           at sun.security.x509.X509CertInfo.<init>(Unknown Source)
           at sun.security.x509.X509CertImpl.parse(Unknown Source)
           at sun.security.x509.X509CertImpl.<init>(Unknown Source)
           at sun.security.provider.X509Factory.parseX509orPKCS7Cert(Unknown Source)
           at sun.security.provider.X509Factory.engineGenerateCertificates(Unknown Source)
           at java.security.cert.CertificateFactory.generateCertificates(Unknown Source)
           at com.sun.deploy.security.WIExplorerCertStore.generateCertificate(Unknown Source)
           at com.sun.deploy.security.WIExplorerCertStore.loadCertificates(Native Method)
           at com.sun.deploy.security.WIExplorerCertStore.load(Unknown Source)
           at com.sun.deploy.security.WIExplorerCertStore.load(Unknown Source)
           at com.sun.deploy.security.X509Extended7DeployTrustManager.checkServerTrusted(Unknown Source)
           at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
           at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
           at sun.security.ssl.Handshaker.processLoop(Unknown Source)
           at sun.security.ssl.Handshaker.process_record(Unknown Source)
           at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
           at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
           at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
           at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
           at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
           at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
           at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
           at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
           at java.net.HttpURLConnection.getHeaderFieldDate(Unknown Source)
           at java.net.URLConnection.getLastModified(Unknown Source)
           at sun.net.www.protocol.https.HttpsURLConnectionImpl.getLastModified(Unknown Source)
           at com.sun.deploy.util.SecurityBaseline.checkForBaselineUpdates(Unknown Source)
           at com.sun.deploy.util.SecurityBaseline.access$300(Unknown Source)
           at com.sun.deploy.util.SecurityBaseline$1.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)
      Caused by: java.io.IOException: No data available in passed DER encoded value.
           at sun.security.x509.GeneralNames.<init>(Unknown Source)
           at sun.security.x509.SubjectAlternativeNameExtension.<init>(Unknown Source)
           at sun.reflect.GeneratedConstructorAccessor14.newInstance(Unknown Source)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
           at java.lang.reflect.Constructor.newInstance(Unknown Source)
           at sun.security.x509.CertificateExtensions.parseExtension(Unknown Source)
           at sun.security.x509.CertificateExtensions.init(Unknown Source)
           at sun.security.x509.CertificateExtensions.<init>(Unknown Source)
           at sun.security.x509.X509CertInfo.parse(Unknown Source)
           ... 30 more


      Please anyone help me to find out the root cause of the issue.