错误Axis2客户端从Websphere6.1中的J2EE应用程序调用SSL服务

时间:2012-06-06 08:27:29

标签: ssl client websphere axis2

我遇到的问题是我的基于axis2的客户端从websphere 6.1调用ssl服务并抛出以下异常以及顶部的消息。我已按照click here中的步骤在默认信任库中使用IBM websphere管理控制台安装ssl证书。请注意这个客户端对APACHE tomcat工作正常。在这方面的任何帮助都将非常值得感谢。

setting up default SSLSocketFactory

class com.ibm.websphere.ssl.protocol.SSLSocketFactory is loaded

SSLSocketFactory instantiation failed: java.lang.ClassCastException: 
com.ibm.websphere.ssl.protocol.SSLSocketFactory incompatible with         javax.net.ssl.SSLSocketFactory

{HttpMethodDirector:439} - I/O exception (java.net.SocketException) caught when     processing request: java.lang.ClassCastException:     com.ibm.websphere.ssl.protocol.SSLSocketFactory 
incompatible with javax.net.ssl.SSLSocketFactory

{HttpMethodDirector:445} - Retrying request

{HttpMethodDirector:439} - I/O exception (java.net.SocketException) caught when     processing request: java.lang.ClassCastException:     com.ibm.websphere.ssl.protocol.SSLSocketFactory incompatible with     javax.net.ssl.SSLSocketFactory

{HttpMethodDirector:445} - Retrying request

{HttpMethodDirector:439} - I/O exception (java.net.SocketException) caught when     processing request: java.lang.ClassCastException: com.ibm.websphere.ssl.protocol.SSLSocketFactory incompatible with javax.net.ssl.SSLSocketFactory

{HttpMethodDirector:445} - Retrying request

{HTTPSender:202} - Unable to sendViaPost to url[https://sma/CBDSMS/api/GetDue.svc]
java.net.SocketException: java.lang.ClassCastException:     com.ibm.websphere.ssl.protocol.SSLSocketFactory incompatible with     javax.net.ssl.SSLSocketFactory
at javax.net.ssl.DefaultSSLSocketFactory.throwException(Unknown Source)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:116)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:560)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:438)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

1 个答案:

答案 0 :(得分:0)

请在此Web应用程序的类加载器中使用“parent last”设置。有关详细信息,请参阅here