Expansion of ${jboss.server.config.dir} in web subsystem
rjbaty Sep 12, 2011 11:52 AMHello,
I've been trying to configure SSL on my JBossAS 7.0.1 server and get it working with this configuration in the web subsystem:
<connector name="https" protocol="HTTP/1.1" socket-binding="https" scheme="https" secure="true"> <ssl certificate-key-file="../standalone/configuration/server.keystore" password="myPass"/> </connector>
I am wondering, through for the certification-key-file attribute I would like to use
certification-key-file="${jboss.server.config.dir}/server.keystore"
as JBoss system variable. Are these not available to all subsystems on JBossAS 7?
When I used this configuration:
<connector name="https" protocol="HTTP/1.1" socket-binding="https" scheme="https" secure="true"> <ssl certificate-key-file="${jboss.server.config.dir}/server.keystore" password="myPass"/> </connector>
The server ends up throwing exceptions from the org.apache.tomcat.util.net.jsse.JSSESocketFactory class as shown below. It appears this class or subsystem does not expand the system property like other ones do. Should I enter a JIRA feature request or is there some other reaons this is working as intended?
10:49:19,868 ERROR [org.apache.tomcat.util.net.jsse.JSSESocketFactory] (MSC service thread 1-3) Failed to load keystore type JKS with path ${jboss.server.config.dir}/server.keystore due to ${jboss.server.config.dir}\server.keystore (The system cannot find the path specified): java.io.FileNotFoundException: ${jboss.server.config.dir}\server.keystore (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) [:1.6.0_21] at java.io.FileInputStream.<init>(Unknown Source) [:1.6.0_21] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:374) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:299) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:515) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:452) at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:168) at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:999) at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190) at org.apache.catalina.connector.Connector.init(Connector.java:976) at org.apache.catalina.core.StandardService.addConnector(StandardService.java:351) at org.jboss.as.web.WebServerService.addConnector(WebServerService.java:121) at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:223) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765) at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_21] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_21] at java.lang.Thread.run(Unknown Source) [:1.6.0_21]
Thanks,
Robert