我正在尝试从连接到 weblogic 服务器的 Java 应用程序连接到 https url。
我尝试了两种方法,一种使用 URLConnection,一种使用 HttpURLConnection,当我尝试连接时,两种方法都给出相同的错误:
java.lang.RuntimeException: Exception occurred while reading the license file.
我可以很好地连接到普通的 http url,并且我的 license.bea 文件位于 IDE 列为 bea home 的目录中(在本例中为 C:\bea1001)。该文件包含 SSL/Domestic 和 SSL/Export 的条目,并且已启用读取权限。出了什么问题?
最佳答案
我通过使用这一行绕过 weblogic 的 https 处理程序来解决这个问题。
URL url = new URL(null, urlString, new sun.net.www.protocol.https.Handler());
关于java - Weblogic 在 https URLConnection 上抛出 RuntimeException 'Exception reading license file',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8326759/