Why does my PKCS12 keystore cause JBoss to fail to start cleanly?

Solution Verified - Updated -

Issue

  • My PKCS12 keystore causes JBoss to throw the following exception during startup:
14:22:04,383 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
14:22:04,383 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
14:22:04,426 ERROR [JSSESocketFactory] Failed to load keystore type pkcs12 with path /home/dehort/dev/java/jboss-eap-5.1/jboss-as/server/default/conf/server.keystore due to DerInputStream.getLength(): lengthTag=109, too big.
java.io.IOException: DerInputStream.getLength(): lengthTag=109, too big.
        at sun.security.util.DerInputStream.getLength(DerInputStream.java:544)
        at sun.security.util.DerValue.init(DerValue.java:347)
        at sun.security.util.DerValue.<init>(DerValue.java:303)
        at com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:1200)
        at java.security.KeyStore.load(KeyStore.java:1185)
        at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:370)
        at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:289)
        at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:502)
        at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:439)
        at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:142)
        at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
        at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:175)

Environment

  • JBoss Enterprise Application Platform
    • 4.x
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content