Note that there are some explanatory texts on larger screens.

plurals
  1. POSetting the right truststore in JBoss 7
    text
    copied!<p>I want to send EMails from a JBoss 7 application. The SMTP server needs a TLS connection with a self signed certificate. If I try to send a EMail I get a SSLHandshakeException because the server certificate cannot be checked. To fix this I have add this: <a href="http://springinpractice.com/2012/04/29/fixing-pkix-path-building-issues-when-using-javamail-and-smtp/" rel="nofollow">http://springinpractice.com/2012/04/29/fixing-pkix-path-building-issues-when-using-javamail-and-smtp/</a> (putting the SMTP server certificate into a java truststore file)</p> <p>My problem is now how to set the truststore file to JBoss 7?</p> <p>I known at stackoverflow and on other forums there are several answer for that propblem. But I didn't found the right.</p> <p>I have already tried followings:</p> <ul> <li>adding <code>JAVA_OPTS="$JAVA_OPTS -Djavax.net.ssl.trustStore=/home/stewert.c-on/data/projects/keystore/devel.truststore -Djavax.net.ssl.trustStorePassword=123456"</code> to: <ul> <li>jboss-as-7.1.1.Final/bin/standalone.conf</li> <li>jboss-as-7.1.1.Final/bin/domain.conf</li> <li>jboss-as-7.1.1.Final/bin/appclient.conf</li> </ul></li> <li>adding <code>&lt;jsse keystore-password="123456" keystore-url="/home/stewert.c-on/data/projects/keystore/devel.keystore" truststore-password="123456" truststore-url="/home/stewert.c-on/data/projects/keystore/devel.truststore"/&gt;</code> to jboss-as-7.1.1.Final/standalone/configuration/standalone.xml</li> </ul> <p>But if I check at runtime the system environment variable with 'System.getProperty("javax.net.ssl.trustStore")' I get in every case null!</p> <p>My environment:</p> <ul> <li>Linux</li> <li>JBoss 7.1</li> <li>JDK 7</li> <li>I'm starting JBoss inside of eclipse Juno</li> </ul> <p>Anybody knows what's going wrong? Where must I set the truststore?</p> <p>Thanks, Steffen</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload