[Bug] Weblogic Server start failed
Nizernizer opened this issue · 1 comments
Nizernizer commented
error log:
java.lang.ClassCastException: weblogic.net.http.SOAPHttpsURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection
at io.dongtai.iast.core.utils.HttpClientUtils.sendRequest(HttpClientUtils.java:73)
at io.dongtai.iast.core.utils.HttpClientUtils.sendPost(HttpClientUtils.java:56)
at io.dongtai.iast.core.bytecode.sca.ScaReport.sendReport(ScaReport.java:25)
at io.dongtai.iast.core.bytecode.sca.ScaScanner$ScaScanThread.run(ScaScanner.java:217)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Set parameter a to true to solve the problem:
System.setProperty("UseSunHttpHandler", "true");
exexute commented
fix this bug with code:
import java.net.URL;
...
URL url = new URL(null, baseUrl + urlStr, baseUrl.toLowerCase().startsWith("https://") ? new sun.net.www.protocol.https.Handler() : new sun.net.www.protocol.http.Handler());