com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl cannot be cast to javax.net.ss
2018-07-28 22:38
1326 查看
导入sun.net.www.protocol.https.Handler,
import sun.net.www.protocol.https.Handler;
如果报错没有这个,说明你的JDK版本低了,换高版本JDK。
把url=new URL(url);
改为url = new URL(null, url, new sun.net.www.protocol.https.Handler());
阅读更多相关文章推荐
- sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
- 解决sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
- java.lang.ClassCastException: sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.n
- HttpURLConnectionImpl 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
- java.lang.ClassCastException: libcore.net.http.HttpURLConnectionImpl cannot be cast to javax.net.ssl
- weblogic.net.http.SOAPHttpsURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
- weblogic.net.http.SOAPHttpsURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
- java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredTextImpl cannot be cas
- com.mchange.v2.c3p0.impl.NewProxyConnection cannot be cast to com.mysql.jdbc
- java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredCommentImpl cannot be c
- 错误信息com.google.gson.internal.LinkedTreeMap cannot be cast to com.
- sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class
- Spring aop报错:com.sun.proxy.$Proxy cannot be cast to xxx
- java.lang.ClassCastException: de.odysseus.el.ExpressionFactoryImpl cannot be cast to javax.el.Expres
- com.google.gson.internal.LinkedTreeMap cannot be cast to entity
- com.google.gson.internal.LinkedTreeMap cannot be cast to xxx
- sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class
- org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilde