Using plain java client i'm trying to connect to other webserver, It works on standlone but when i deploy on weblogic and try to connect it give below error.
Server :weblogic 10.3
Full stack trace of SSL: with below stactrace it easily sounds that handshake is happening but again its trying to connect and failing .please suggest me where i'm doing wrong.
code snippet i'm using :
FileInputStream fisjks = null;
FileInputStream fisTrusted = null;
String keyStoreType = "jks";
String passphrase = "password";
String passphraseTrusted = "password";
KeyStore ks = KeyStore.getInstance(keyStoreType);
fisjks = new FileInputStream("C:/CFC/Certs/client.jks");
ks.load(fisjks, passphrase.toCharArray());
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
kmf.init(ks, passphrase.toCharArray());
KeyStore ks1 = KeyStore.getInstance(keyStoreType);
fisTrusted = new FileInputStream("C:/CFC/Certs/clientTruststore.jks");
ks1.load(fisTrusted, passphraseTrusted.toCharArray());
TrustManagerFactory tmf = TrustManagerFactory
.getInstance("PKIX");
tmf.init(ks1);
SSLContext sslc = SSLContext.getInstance("SSLv3");
sslc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
HttpsTransportInfo https = new HttpsTransportInfo();
https.setKeyManagers(kmf.getKeyManagers());
https.setTrustManagers(tmf.getTrustManagers());
error stack trace:
found key for : 1 chain [0] = [ [ Version: V3 Subject: [email protected], CN=dbsinlt3767, OU=deutsche bank, O=deutsche bank, L=sg, ST=sg, C=sg Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
Key: Sun RSA public key, 1024 bits modulus: 144592527724012074845004082487794424487354455673579096476940872358533141438065735825819894128056692571922940458543755331194643176374687100664359963995916933269788855991350833527371185749001888440965012790605437863243747901365797345245355690011955852557580366177837112034836139958497356357064447873318654927713 public exponent: 65537 Validity: [From: Sun Mar 13 17:23:02 SGT 2011, To: Wed Mar 07 17:23:02 SGT 2012] Issuer: [email protected], CN=dbsinws3283, OU=deutsche bank, O=deutsche bank, L=sg, ST=sg, C=sg SerialNumber: [ 1001]
Certificate Extensions: 4 [1]: ObjectId: 2.16.840.1.113730.1.13 Criticality=false Extension unknown: DER encoded OCTET string = 0000: 04 1F 16 1D 4F 70 65 6E 53 53 4C 20 47 65 6E 65 ....OpenSSL Gene 0010: 72 61 74 65 64 20 43 65 72 74 69 66 69 63 61 74 rated Certificat 0020: 65 e
[2]: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: 75 87 47 BE 09 C0 D9 C7 4F FB 5F 57 1D F7 77 99 u.G.....O._W..w. 0010: CF 12 FB DB
.... ] ][3]: ObjectId: 2.5.29.35 Criticality=false AuthorityKeyIdentifier [ KeyIdentifier [ 0000: 96 83 10 39 C4 C0 8F 54 5E 0F 85 A0 9C D4 85 71 ...9...T^......q 0010: FC 55 39 9A
.U9. ]]
* main, SEND TLSv1 ALERT: fatal, description = certificate_unknown main, WRITE: TLSv1 Alert, length = 2 [Raw write]: length = 7 0000: 15 03 01 00 02 02 2E ....... main, called closeSocket() main, handling exception: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found at weblogic.wsee.jaxrpc.ServiceImpl.throwServiceException(ServiceImpl.java:174) at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:485) at weblogic.wsee.jaxrpc.ServiceImpl.(ServiceImpl.java:119) at com.db.luup.InvoiceAgentService_Impl.(Unknown Source) at com.db.mobile.test.LuupMobileClientTest1.main(LuupMobileClientTest1.java:78) Caused by: weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:313) at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:305) at weblogic.wsee.wsdl.WsdlSchema.parse(WsdlSchema.java:136) at weblogic.wsee.wsdl.WsdlSchemaImport.parse(WsdlSchemaImport.java:99) at weblogic.wsee.wsdl.WsdlSchema.parse(WsdlSchema.java:116) at weblogic.wsee.wsdl.WsdlSchema.parse(WsdlSchema.java:73) at weblogic.wsee.wsdl.WsdlTypes.parse(WsdlTypes.java:165) at weblogic.wsee.wsdl.WsdlDefinitions.parseChild(WsdlDefinitions.java:520) at weblogic.wsee.wsdl.WsdlExtensible.parse(WsdlExtensible.java:98) at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:468) at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:403) at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:389) at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:79) at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:66) at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:476) ... 3 more Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1611) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:187) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:181) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1035) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:124) 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:1112) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1139) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234) at weblogic.wsee.util.is.InputSourceUtil.loadURL(InputSourceUtil.java:100) at weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:118) at weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:65) at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:311) ... 17 more Caused by: sun.security.validator.ValidatorException: No trusted certificate found at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:330) at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:110) at sun.security.validator.Validator.validate(Validator.java:218) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1014) ... 32 more