Valyrion
Valyrion

Reputation: 2613

Weblogic throws RuntimeException 'Exception reading license file' on https URLConnection

I'm trying to connect to an https url from a Java application connected to a weblogic server.

I've tried two approaches, one using URLConnection and one using HttpURLConnection, both give me the same error when I try to connect :

java.lang.RuntimeException: Exception occurred while reading the license file.

I can connect to a normal http url just fine and my license.bea file is in the directory my IDE lists as bea home (being C:\bea1001 in this case) The file contains entries for SSL/Domestic and SSL/Export and it has read rights enabled. What's going wrong?

Upvotes: 1

Views: 1807

Answers (2)

viswanath patimalla
viswanath patimalla

Reputation: 218

This VM worked for me. -DUseSunHttpHandler=true

Upvotes: 0

Valyrion
Valyrion

Reputation: 2613

I got around the problem by bypassing weblogic's https handlers alltogether using this line.

URL url = new URL(null, urlString, new sun.net.www.protocol.https.Handler());

Upvotes: 1

Related Questions