[jboss-user] [Remoting] - HTTPClientInvoker: Error initializing socket factory SSL con

vbatista do-not-reply at jboss.com
Thu Aug 28 18:39:08 EDT 2008


Hi,
I am using JBoss-4.2.2.GA with JDK 1.6.0_04. My application acts as a client for an external web service which needs to be accessed through HTTPS.
I have created a trustStore with the public certificate of the web service server, and started JBoss with System Properties:
javax.net.ssl.trustStore
and
javax.net.ssl.trustStorePassword

My development environment can invoke the Web Service correctly. 
Unfortunately on my production environment (which has the same OS, JBoss and Java) I am getting the following exception

  | 2008-08-27 16:30:28,461 ERROR [org.jboss.remoting.transport.http.HTTPClientInvoker] Error creating SSL Socket Factory for client invoker.
  | java.io.IOException: Error initializing socket factory SSL context: Cannot validate the store URL: /opt/apps/jboss/bin/truststore.jks
  | 	at org.jboss.remoting.security.SSLSocketBuilder.setTrustStoreURL(SSLSocketBuilder.java:823)
  | 	at org.jboss.remoting.security.SSLSocketBuilder.getTrustStore(SSLSocketBuilder.java:797)
  | 	at org.jboss.remoting.security.SSLSocketBuilder.loadTrustManagers(SSLSocketBuilder.java:1390)
  | 	at org.jboss.remoting.security.SSLSocketBuilder.initializeSocketFactorySSLContext(SSLSocketBuilder.java:1326)
  | 	at org.jboss.remoting.security.SSLSocketBuilder.createCustomSocketFactory(SSLSocketBuilder.java:451)
  | 	at org.jboss.remoting.security.SSLSocketBuilder.createSSLSocketFactory(SSLSocketBuilder.java:431)
  | 	at org.jboss.remoting.security.SSLSocketBuilder.createSSLSocketFactory(SSLSocketBuilder.java:381)
  | 	at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.createSocketFactory(HTTPSClientInvoker.java:140)
  | 	at org.jboss.remoting.RemoteClientInvoker.<init>(RemoteClientInvoker.java:46)
  | 	at org.jboss.remoting.transport.http.HTTPClientInvoker.<init>(HTTPClientInvoker.java:105)
  | 	at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.<init>(HTTPSClientInvoker.java:63)
  | 	at org.jboss.remoting.transport.https.TransportClientFactory.createClientInvoker(TransportClientFactory.java:39)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 	at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:419)
  | 	at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:320)
  | 	at org.jboss.remoting.Client.connect(Client.java:459)
  | 	at org.jboss.ws.core.client.RemotingConnectionImpl.createRemotingClient(RemotingConnectionImpl.java:247)
  | 	at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:165)
  | 	at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
  | 	at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:337)
  | 	at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
  | 	at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
  | 	at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
  | 	at $Proxy171.send(Unknown Source)
  | 	at com.xpto.integration.SmsHelper.send(SmsHelper.java:57)
  | 	at com.xpto.services.sms.SMSSenderServiceMBean.run(SMSSenderServiceMBean.java:106)
  | 	at java.lang.Thread.run(Thread.java:619)
  | javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
  | 	at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:317)
  | 	at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:255)
  | 	at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
  | 	at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
  | 	at $Proxy171.send(Unknown Source)
  | 	at com.xpto.integration.SmsHelper.send(SmsHelper.java:57)
  | 	at com.xpto.services.sms.SMSSenderServiceMBean.run(SMSSenderServiceMBean.java:106)
  | 	at java.lang.Thread.run(Thread.java:619)
  | Caused by: java.io.IOException: Could not transmit message
  | 	at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:204)
  | 	at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
  | 	at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:337)
  | 	at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
  | 	... 6 more
  | Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
  | 	at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:333)
  | 	at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:135)
  | 	at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
  | 	at org.jboss.remoting.Client.invoke(Client.java:1634)
  | 	at org.jboss.remoting.Client.invoke(Client.java:548)
  | 	at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:183)
  | 	... 9 more
  | Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
  | 	at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
  | 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1591)
  | 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1554)
  | 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1537)
  | 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1130)
  | 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1107)
  | 	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:405)
  | 	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
  | 	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:832)
  | 	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
  | 	at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:275)
  | 	... 14 more
  | Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
  | 	at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:59)
  | 	at sun.security.validator.Validator.getInstance(Validator.java:161)
  | 	at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:108)
  | 	at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:204)
  | 	at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
  | 	at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:954)
  | 	at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:123)
  | 	at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516)
  | 	at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454)
  | 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)
  | 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096)
  | 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)
  | 	... 20 more
  | Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
  | 	at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:183)
  | 	at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:103)
  | 	at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:87)
  | 	at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:57)
  | 	... 31 more
  | 

Any one has any hint?
I really can't understand this error. The development and production environments are the same.

Any help would really be appreciated.
Thanks in advance.

Best regards,
Victor Batista

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173189#4173189

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173189



More information about the jboss-user mailing list