views:

36

answers:

1

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:

alt text

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.

A: 

It looks like I finally found the answer. Here guys experienced quite similar issue which is related to proxy settings and happens to Java 1.5 only. I'm using "Use automatic proxy configuration script" as well. And this script is unable to return correct result for some of the hosts I checked, so it returned an error.

As I understand this Java Webstart bug is a root cause.

wax