Permission Denied - SocketException - Java 7 and VPN

When attempting to use the Oracle UCM Web Service, GenericSoapService, I ran into the following error using SoapUI:

I was able to track down this error to using a VPN client (Cisco AnyConnect) and Java JDK 7.

The trick is to ensure Java is using IPv4.

For SoapUI do the following:

Edit the following file: SmartBear/bin.soapUI-version.vmoptions

Add the following Java option:

While I originally discovered this issue with SoapUI (since it is built on the Java platform), I was also having an issue connecting to a remote database over a VPN connection with Oracle SQL Developer.

I eventually discovered SQL Developer also needed the above option.

For SQL Developer do the following:

Edit sqldeveloper/ide/bin/ide.conf

Add the following Java option at the bottom of the file:

You can verify that the option was added correctly in SQL Developer by going to Help -> About.

Then go to the Properties tab.

If all went correctly, you should see java.net.preferIpv4Stack set to true and you should be able to connect to your database.