Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javax.net.ssl.SSLKeyException: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was

PriyaTBJun 14 2018 — edited Jun 22 2018

Hi All,

I am using Jdeveloper 11.1.1.9 . I am trying to access rest service from saas cloud service. using this https://docs.oracle.com/en/cloud/paas/paas-saas-cloud/ocpsi/accesing-restful-services-jcs-saas-extension-application-and… i configured a certificate in DemoTrust.jks keystore. I tried to access the Rest service from a simple java project - a class with main() method. It worked well. Then I tried to do the same from an ADF application which is deployed in the internal weblogic server. But it gives me javax.net.ssl.SSLKeyException

Caused By: com.sun.jersey.api.client.ClientHandlerException: javax.net.ssl.SSLKeyException: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received.

at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)

at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105)

at com.sun.jersey.api.client.Client.handle(Client.java:652)

at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)

at com.sun.jersey.api.client.WebResource.get(WebResource.java:193)

at com.saas.access.demo.beans.EmployeeTableData.constructEmployeesData(EmployeeTableData.java:101)

at com.saas.access.demo.beans.EmployeeTableData.<init>(EmployeeTableData.java:37)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513).....................................................................................................................................

.......................................................................................................................etc

Caused By: javax.net.ssl.SSLKeyException: FATAL Alert:BAD_CERTIFICATE - A corrupt or unuseable certificate was received.

at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireException(Unknown Source)

at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertSent(Unknown Source)

at com.certicom.tls.record.handshake.HandshakeHandler.fireAlert(Unknown Source)

at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source)

at com.certicom.tls.record.MessageInterpreter.interpretContent(Unknown Source)

at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown Source)

at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source)

at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)

It works from a plain java class in jdev, but not when deployed as adf application in integrated weblogic. Does weblogic uses a different keystore? In which keystore should I import my certificate?

I checked the keystores in the default domain of integrated weblogic server. It shows like below

pastedImage_5.png

I have imported my certificate in DemoTrust.jks. But it is not working. Am I looking into a wrong place?. What should I do to make it work ? Kindly help.

Regards,

Priya.

This post has been answered by dvohra21 on Jun 14 2018
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 20 2018
Added on Jun 14 2018
4 comments
2,711 views