axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] [Created] (AXIS2-5661) Axis2 1.6.2 @ Websphere 8.5 emits NumberFormatException intermittently.
Date Fri, 25 Jul 2014 05:58:39 GMT

             Summary: Axis2 1.6.2 @ Websphere 8.5 emits NumberFormatException intermittently.
                 Key: AXIS2-5661
             Project: Axis2
          Issue Type: Improvement
          Components: transports
    Affects Versions: 1.6.2
         Environment: Websphere 8.5 on Linux
            Reporter: ARUNKUMAR NOHWAR

Recently we upgraded from[Axis2-1.4.1 on Websphere-7.0] to [Axis2-1.6.2 on Websphere-8.5].
And the same application code start giving an intermittent exception. The stacktrace of the
exception can be found at the end of the description.

Analysis - 
The creation of these system properties is the root cause of the issue.
http.proxyHost  and   http.proxyPort
These system porperties are created with non-null but empty string "" values.
We find that our application has no logic to create these properties. These properties probably
created by a 3rd party library or websphere server.

Workaround -
We write a code to remove these system properties (System.clearProperty()) just before the
flow goes to Axis2 part of the application.
We cannot write this code during application startup as these properties are created intermittently
when the application is running for few days and the exception appears again.

Recommendations -
In this axis code 
package    org.apache.axis2.transport.http.util
class          HTTPProxyConfigurationUtil
method       configure(MessageContext messageContext,
                                 HttpClient httpClient,
                                 HostConfiguration config) 

the exception appears at the following line of code -
        String port = System.getProperty(HTTP_PROXY_PORT);
        if(port != null) {
            proxyPort = Integer.parseInt(port);
This is because the non-null but empty-string ("") valued key HTTP_PROXY_PORT, results in
Can we please add an empty-string value check in the "if" condition ?
Adding further thse empty-string valued keys, both host and port, might overwrite the correct
values built from axis2.xml. Hence we can apply the same checks to both of the system properties
- host and port - if conditions.

StackTrace -
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(
                at java.lang.reflect.Method.invoke(


Caused by: java.lang.NumberFormatException: For input string: ""
                at java.lang.NumberFormatException.forInputString(
                at java.lang.Integer.parseInt(
                at java.lang.Integer.parseInt(
                at org.apache.axis2.transport.http.util.HTTPProxyConfigurationUtil.configure(
                at org.apache.axis2.transport.http.AbstractHTTPSender.getHostConfiguration(
                at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(
                at org.apache.axis2.transport.http.HTTPSender.sendViaPost(
                at org.apache.axis2.transport.http.HTTPSender.send(
                at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(
                at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
                at org.apache.axis2.engine.AxisEngine.send(
                at org.apache.axis2.description.OutInAxisOperationClient.send(
                at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
                at org.apache.axis2.client.OperationClient.execute(

This message was sent by Atlassian JIRA

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

View raw message