ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bala Paranj <bpar...@yahoo.com>
Subject Ant and SSL
Date Tue, 08 Aug 2006 18:40:58 GMT
I have the following section in my build.xml:

<target name="execute" depends="compile" description="run the program">
   
	<java jar="${output}/MyClient.jar" fork="true" failonerror="true">
		<sysproperty key="javax.net.ssl.keyStore" value="bin/client.keystore" />
		<sysproperty key="javax.net.ssl.keyStorePassword" value="123456" />
		<sysproperty key="javax.net.ssl.trustStore" value="bin/client.truststore" />
		<sysproperty key="javax.net.ssl.trustStorePassword" value="123456" /> 
		<arg value="localhost" />
		<arg value="8443" />
	</java>
</target>

I can run my client from within Eclipse without any problems. But when I run it using the
Ant
script I get the following error:

java.net.SocketException: Default SSL context init failed: null
	at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:163)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:372)
	at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)
	at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)

The client.keystore and the client.truststore is in the bin directory. Thanks for any help
in
fixing this problem.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message