0

I am getting this below error when trying to access an WSDL endpoint.

First I have created the client jar using cliengen ant task and then created a simple java class to test the wsdl end point and I am getting below error-

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)
    at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)
    at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)
    at com.certicom.tls.record.WriteHandler.write(Unknown Source)
    at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
    at java.io.FilterOutputStream.write(FilterOutputStream.java:80)
    at weblogic.webservice.binding.soap.HttpClientBinding.writeToStream(HttpClientBinding.java:430)
    at weblogic.webservice.binding.soap.HttpClientBinding.send(HttpClientBinding.java:219)
    at weblogic.webservice.core.handler.ClientHandler.handleRequest(ClientHandler.java:37)
    at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)
    at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:231)
    at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:143)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:471)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
    at weblogic.webservice.core.rpc.StubImpl._invoke(StubImpl.java:303)

Can anyone help?

BiscuitBaker
  • 1,421
  • 3
  • 23
  • 37
Subhankar Das
  • 11
  • 1
  • 1
  • 1
  • Is this two way SSL or one way? – Tim Feb 02 '15 at 14:47
  • Try adding: -Djavax.net.debug=ssl to your java args, and see if that produces more pertinent logs. – Tim Feb 02 '15 at 14:55
  • No.. It is not generating more logs..I am trying to access http wsdl end points. I can not understand why it is throwing SSLKeyException. – Subhankar Das Feb 03 '15 at 08:59
  • is that I need to have server certificate? If yes then how can I get this? – Subhankar Das Feb 03 '15 at 12:11
  • Try turning on Environment > Servers > [my server] > SSL > Advanced > Use JSSE SSL as per http://stackoverflow.com/questions/27928157/cannot-access-https-from-weblogic – nevster May 22 '15 at 04:06

4 Answers4

3

I was able to get resolve the exception by updating \Oracle\Middleware\user_projects\domains\my_domain\bin\setDomainEnv.cmd with below commands

set JAVA_OPTIONS=%JAVA_OPTIONS% -DUseSunHttpHandler=true -Dssl.SocketFactory.provider=sun.security.ssl.SSLSocketFactoryImpl -Dssl.ServerSocketFactory.provider=sun.security.ssl.SSLSocketFactoryImpl
Yusuf Kapasi
  • 577
  • 2
  • 9
1

Fixed this issue by adding following lines in JVM arguments.

-Dweblogic.security.SSL.nojce=true 
-Dweblogic.ssl.JSSEEnabled=true 
-Dweblogic.security.SSL.enableJSSE=true

Don't forget to recycle JVM. :)

RGA
  • 2,577
  • 20
  • 38
0

I was getting a similar when trying to upload a file to an S3 Bucket on AWS from a WebLogic application. I added the following lines

JAVA_OPTIONS="${JAVA_OPTIONS} -DUseSunHttpHandler=true -Dssl.SocketFactory.provider=sun.security.ssl.SSLSocketFactoryImpl -Dssl.ServerSocketFactory.provider=sun.security.ssl.SSLSocketFactoryImpl" 

just before this command

JAVA_OPTIONS="${JAVA_OPTIONS}"
export JAVA_OPTIONS

in

\Oracle\Middleware\user_projects\domains\my_domain\bin\setDomainEnv.cmd 

and my issue was resolved. Just make sure to restart WebLogic after the amendment.

anim8r
  • 11
  • 3
-1

Add this in startup params

-DUseSunHttpHandler=true 
-Dssl.SocketFactory.provider=sun.security.ssl.SSLSocketFactoryImpl 
-Dssl.ServerSocketFactory.provider=sun.security.ssl.SSLSocketFactoryImpl
Olivier Croisier
  • 6,139
  • 25
  • 34