axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dzung Tran (JIRA)" <>
Subject [jira] Updated: (AXIS2-4823) Error "Address is invalid on local machine..." occurs when http.proxyHost is "" (blank) instead of null.
Date Mon, 20 Sep 2010 15:44:32 GMT


Dzung Tran updated AXIS2-4823:

    Priority: Major  (was: Critical)

> Error "Address is invalid on local machine..." occurs when http.proxyHost is "" (blank)
instead of null.
> --------------------------------------------------------------------------------------------------------
>                 Key: AXIS2-4823
>                 URL:
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5
>         Environment: Windows Sever 2003
>            Reporter: Dzung Tran
> We generate a proxy client using wsdl2Java. We do not have any proxy server enabled in
our system. However, after the system is in use for some time (a few hours), something sets
the system variable http.proxyHost to "" (blank) instead of null. That is, the call to System.getProperty(HTTP_PROXY_HOST)
returns "" instead of null. We have yet to figure out why this happens. 
> That causes the following if block in org.apache.axis2.transport.http.AbstractHTTPSender
to evaluate to true and execute, 
>         // proxy configuration
>         if (ProxyConfiguration.isProxyEnabled(msgCtx,targetURL)) {
>             log.debug("ProxyConfiguration");
>             ProxyConfiguration proxyConfiguration = new ProxyConfiguration();
>             proxyConfiguration.configure(msgCtx,client,config);
>         }
> Because of this, the program thinks a proxy connection with proxy host = "" is enabled
and it tries to use it. See below (org.apache.commons.httpclient.HttpConnection)
>     public void open() throws IOException {
>         LOG.trace("enter");
>         final String host = (proxyHostName == null) ? hostName : proxyHostName;
>         final int port = (proxyHostName == null) ? portNumber : proxyPortNumber;
>         assertNotOpen();
> And because the host is "', we get the error "Address is invalid on local machine, or
port is not valid on remote machine". 
> This prevents all transactions from being sent to the server, and requires a restart
of our services. 
> Question:
> What is setting the http.proxyHost to blank? 
> Should blank http.proxyHost be treated the same way as null? (If blanks were treated
like nulls in this case, we wouldn't have this issue.)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message