解决weblogic.net.http.SOAPHttpsURLConnection incompatible with javax.net.ssl.HttpsURLConnection
2016-10-26 16:09
477 查看
1. 按照网上的办法,可以修改代码解决问题,但是由于我们使用的是别人的jar包,不能修改代码,: URL url = new URL(null, "https://www.baidu.",new sun.net.www.protocol.https.Handler()); // 指定了handler后openConnection()返回了HttpsURLConnection类型对象 HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); 2. 配置weblogic,在startWeblogic.sh文件中添加参数:-DUseSunHttpHandler=true,我最终添加了一行:MEM_ARGS="${MEM_ARGS} -DUseSunHttpHandler=true" 路径 ${DOMAIN_HOME}/bin/startWebLogic.sh 修改(红色为要添加的): =============================================================== if [ "${DERBY_FLAG}" = "true" ] ; then ${WL_HOME}/common/derby/bin/startNetworkServer.sh >"${DOMAIN_HOME}/derby.log" 2>&1 fi JAVA_OPTIONS="${SAVE_JAVA_OPTIONS} -DUseSunHttpHandler=true" SAVE_JAVA_OPTIONS="" CLASSPATH="${SAVE_CLASSPATH}" SAVE_CLASSPATH="" trap 'stopAll' 1 2 3 15 ========================================
相关文章推荐
- [Java][Weblogic] weblogic.net.http.SOAPHttpsURLConnection incompatible with javax.net.ssl.HttpsURLConnection解决办法
- weblogic.net.http.SOAPHttpsURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
- weblogic.net.http.SOAPHttpsURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
- 微信开发:weblogic.net.http.SOAPHttpsURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
- weblogic.net.http.SOAPHttpsURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
- 解决sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
- weblogic.net.http.SOAPHttpsURLConnectionl类型解决
- sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
- HttpURLConnectionImpl cannot be cast to javax.net.ssl.HttpsURLConnection
- 关于weblogic下使用URL.openConnection获取连接返回javax.net.ssl.SSLKeyException错误
- 用httpclient发送https协议请求以及javax.net.ssl.SSLHandshakeException解决办法
- java.lang.ClassCastException: libcore.net.http.HttpURLConnectionImpl cannot be cast to javax.net.ssl
- HttpsURLConnection请求https,抛出javax.net.ssl.SSLException: hostname in certificate didn't match:
- 关于weblogic下使用URL.openConnection获取连接返回javax.net.ssl.SSLKeyException错误
- WebLogic下使用URL.openConnection获取连接返回 HttpsURLConnection与SOAPHttpsURLConnection的问题
- java.lang.ClassCastException: sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.n
- iOS UIWebView 加载https 站点出现NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL,
- xcode7 解决NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
- https应用:避免HttpClient的”javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated”异常
- https请求报错解决:javax.net.ssl.SSLException: Not trusted ...