websphere sslSocketFactory,SSLSocketFactory.getDefault() is null
来源:互联网 发布:Visual Studio和vscode 编辑:程序博客网 时间:2024/06/01 07:21
<bean id="trustStore_sae_ssl" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" value="#{@systemProperties}"/>
<property name="targetMethod" value="putAll" />
<property name="arguments">
<props>
<prop key="javax.net.ssl.trustStore">${javax.net.ssl.trustStore}</prop>
</props>
</property>
</bean>
<bean id="messageSender" class="org.springframework.ws.transport.http.CommonsHttpMessageSender">
<property name="connectionTimeout" value="${connection.connectionTimeout}" /><property name="readTimeout" value="${connection.readTimeout}" />
<property name="maxTotalConnections" value="${connection.maxConnectionsPerHost.maxConnections}" />
</bean>
<bean id="sae_webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
<constructor-arg ref="messageFactory"/>
<property name="marshaller" ref="jaxbMarshaller_sae"/>
<property name="unmarshaller" ref="jaxbMarshaller_sae"/>
<property name="defaultUri" value="${getOrderCR.wsServer.URL}"/>
<property name="messageSender" ref="messageSender"/>
<property name="interceptors">
<list><ref local="wsSecurityInterceptor_sae"/></list>
</property>
</bean>
in WAS, error is "SSLSocketFactory.getDefault() is null"
The reason is
http://stackoverflow.com/questions/2776149/error-accessing-a-web-service-with-ssl
file = /sbcdata/WebSphere/AppServer/java/jre/lib/security/java.security
# Default JSSE socket factories
ssl.SocketFactory.provider=com.ibm.jsse2.SSLSocketFactoryImpl
ssl.ServerSocketFactory.provider=com.ibm.jsse2.SSLServerSocketFactoryImpl
# WebSphere socket factories (in cryptosf.jar)
ssl.SocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLSocketFactory
ssl.ServerSocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLServerSocketFactory
There is no default()
So, write a bean, for example, MySSL.java
static{
Security.setProperty("ssl.SocketFactory.provider", "com.ibm.jsse2.SSLSocketFactoryImpl");
Security.setProperty("ssl.ServerSocketFactory.provider", "com.ibm.jsse2.SSLServerSocketFactoryImpl");
}
<bean class="MySSL"/>
- websphere sslSocketFactory,SSLSocketFactory.getDefault() is null
- SSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFactory.getDefault() is called t
- 自定义SSLSocketFactory
- SSLSocketFactory 的创建
- java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory的解决办法
- OpenFire SSLSocketFactory 编译报错解决
- is null && is not null
- "=NULL"和"Is NULL"
- Oracle之NULL IS NULL
- mysql <> null != null is not null
- oracle is null 和is not null
- is null 和 is not null
- parent is null PopupMenu
- What is /dev/null
- why gpDesc is NULL?
- document.getElementById(...) is null
- b is null
- NULL 与 IS 用法
- alt+f4对命令行窗口无效
- SQL注入——如何攻击(一)
- JS正则表达式验证账号、手机号、电话和邮箱
- TCP连接建立与终止
- WHERE约束
- websphere sslSocketFactory,SSLSocketFactory.getDefault() is null
- ipc$共享
- Mockito 库、powermock扩展
- 规范化的软件项目演进管理--从 Github 使用说起
- block原理详细讲解(一)
- js中获得项目名称
- x
- HSB转RGB
- bzoj1646 [Usaco2007 Open]Catch That Cow 抓住那只牛