title: SSL configuration in Jboss 7.1 - java.io.IOException: Invalid keystore format
body: <p>I am configuring SSL for JBOSS 7.1 in a linux server. I created the key and csr following commands</p>
  
  <pre><code>openssl genrsa -out app.key -des 2048
  
  openssl req -new -key app.key -out appCert.csr
  </code></pre>
  
  <p>I registered the certificate to entrust and received the root, chain and server certificate. The server certificate is stored in a file cert.crt</p>
  
  <p>In JBOSS 7.1 standalone.xml, I modified the connector tag as below.</p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false"&gt;
      &lt;connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/&gt;
      &lt;connector name="https" scheme="https" protocol="HTTP/1.1" socket-binding="https" enable-lookups="false" secure="true"&gt;
          &lt;ssl name="APP-ssl" password="abc123" certificate-key-file="/app/JBoss-7.1/standalone/configuration/ssl/app.key" certificate-file="/app/JBoss-7.1/standalone/configuration/ssl/cert.crt"/&gt;
  &lt;/subsystem&gt;
  </code></pre>
  
  <p>When i start the jboss server, I am getting the below error message.</p>
  
  <p>ERROR [org.apache.tomcat.util.net.jsse.JSSESocketFactory] (MSC service thread 1-2) Failed to load keystore type JKS with path /app/JBoss-7.1/standalone/configuration/ssl/app.key due to Invalid keystore format: java.io.IOException: Invalid keystore format</p>
  
  <p>The same error occurs when i place the chain certificate also. Please help me in resolving this issue.</p>