When I'm starting rich client application with JNLP it does some requests to remote servers. Some of this requests are intended to check if the servers available or not. If they aren't available the client catches, for example, UnknownHostException
and it's a completely valid and expected case.
However, if I specify proxy settings in a Java Control Panel (Windows->Start->Settings->Control Panel->Java) I get following error dialog on start:
As you could see, this dialog is completely useless and it doesn't help to find out what's wrong. Also I tried to set a trace level in a Java Console to 5, but it also didn't provide me with any useful information.
This dialog appears along with exception that is caught inside the starting application. I repeat it is caught immediately after it's thrown by HttpClient
instance (commons-httpclient-3.1) and this dialog is not displayed by the application (moreover it has completely different look'n'feel).
Here is a quote from code:
try {
HttpClient client = new HttpClient(connectionManager);
GetMethod getMethod = new GetMethod();
getMethod.setPath(targetUrl.getPath());
HostConfiguration hostConfiguration = getHostConfiguration();
client.executeMethod(hostConfiguration, getMethod);
} catch (Exception e) {
// some logging
}
executeMethod
throws UnknownHostException
or ConnectTimeoutException
here.
If I turn on 'Direct connection' in "Java Control Panel->Network Settings" dialog the issue is not reproducible, but the problem is that it's not always possible to use direct connection, sometimes proxy is required.
I found out that the issue is not reproducible on Java 1.6, but unfortunately I have to solve it somehow without upgrade. I understand that it's a very strange issue and looks more like a bug in JVM, but I hope that you could advice me anything to suppress these annoying dialogs somehow.