This is a discussion on Tomcat SSL and Glue - Java ; I am using Glue to publish a webservice. The service works fine when I don't use ssl. I set Tomcat up to use an ssl connector. I un commented the ssl connector from the server.xml, created a cert using keytool. ...
I am using Glue to publish a webservice. The service works fine when I
don't use ssl.
I set Tomcat up to use an ssl connector. I un commented the ssl
connector from the server.xml, created a cert using keytool. (keytool
-genkey -alias tomcat -keyalg dsa)
I can start tomcat and access the webservices wsdl using ports 8080 and
443 using a browser.
My problem is if I try and use the webservice via code, using Glue as
the client too, I get the following error:
[STARTUP] GLUE Standard 4.0.1 (c) 2001-2003 The Mind Electric
[ERROR] java.security.cert.CertificateException: Couldn't find trusted
certificate: unable to load file
https://localhost/simpletest/services/SimpleTest.wsdl
javax.net.ssl.SSLHandshakeException:
java.security.cert.CertificateException: Couldn't find trusted certificate
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127)
at electric.http.OutboundHTTPRequest.flush(Unknown Source)
at electric.http.HTTPMessage.writeRequest(Unknown Source)
at electric.http.HTTPMessage.send(Unknown Source)
at electric.http.OutboundHTTPRequest.send(Unknown Source)
at electric.http.OutboundHTTPRequest.get(Unknown Source)
at electric.http.loader.HTTPResourceLoader.loadResource(Unknown Source)
at electric.util.resourceloader.ResourceLoaders.loadResource(Unknown
Source)
at electric.wsdl.WSDL.<init>(Unknown Source)
at electric.wsdl.loader.WSDLLoader.getWSDL(Unknown Source)
at electric.soap.registry.SOAPRegistry.bind(Unknown Source)
at electric.registry.compound.CompoundRegistry.bind(Unknown Source)
at electric.registry.Registry.getReference(Unknown Source)
at electric.registry.Registry.getProxy(Unknown Source)
at electric.registry.Registry.bind(Unknown Source)
at electric.registry.Registry.bind(Unknown Source)
at com.ecsplus.eei.clients.SimpleTest.main(SimpleTest.java:11)
Caused by: java.security.cert.CertificateException: Couldn't find
trusted certificate
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.a(DashoA6275)
at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA6275)
at
com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA6275)
... 25 more
I don't think I have manually added the cert from the server to my
client keystore correctly? I have exported the .keystore file and
imported it to the cacerts, but it still doesn't work!
Any suggestions?
Thanks,
Jeff