cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-4879) Error when http.proxy* system properties are empty
Date Wed, 06 Mar 2013 21:26:13 GMT

     [ https://issues.apache.org/jira/browse/CXF-4879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-4879.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.5.10
                   2.6.7
                   2.7.4
         Assignee: Daniel Kulp

Fixed the main NFE described in the report.
                
> Error when http.proxy* system properties are empty
> --------------------------------------------------
>
>                 Key: CXF-4879
>                 URL: https://issues.apache.org/jira/browse/CXF-4879
>             Project: CXF
>          Issue Type: Bug
>          Components: Configuration, JAX-WS Runtime
>    Affects Versions: 2.7.3
>            Reporter: Milan Farkas
>            Assignee: Daniel Kulp
>             Fix For: 2.7.4, 2.6.7, 2.5.10
>
>
> Hi,
> we have an Apache CXF client configured using Spring. In the production environment the
following system properties exist and the are both empty:
> {code}http.proxyHost=
> http.proxyPort=
> {code} 
> This causes the following exception:
> {code}java.lang.NumberFormatException: For input string: ""
> 	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:59)
> 	at java.lang.Integer.parseInt(Integer.java:481)
> 	at java.lang.Integer.valueOf(Integer.java:565)
> 	at org.apache.cxf.transport.http.ProxyFactory.createSystemProxyConfiguration(ProxyFactory.java:75)
> 	at org.apache.cxf.transport.http.ProxyFactory.<init>(ProxyFactory.java:59)
> 	at org.apache.cxf.transport.http.HTTPConduit.<init>(HTTPConduit.java:288)
> 	at org.apache.cxf.transport.http.URLConnectionHTTPConduit.<init>(URLConnectionHTTPConduit.java:66)
> 	at org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTransportFactory.java:258)
> 	at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:238)
> 	at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:245)
> 	at org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:103)
> 	at org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:63)
> 	at org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:850)
> 	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:525)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
> 	... 57 more
> {code} 
> I think ProxyFactory.java around line 66 should handle empty string for proxyHost the
same way as NULL.
> {code}String proxyHost = SystemPropertyAction.getPropertyOrNull(HTTP_PROXY_HOST);
> if (proxyHost != null) {
>             // System is configured with a proxy, use it
> {code}
> Furthermore, it seems that even using http:conduit in our Spring config, it's not possible
to override the system properties for a jaxws:client. The following block works only if the
http.proxyHost system properties are not defined:
> {code} <http:conduit name="*.http-conduit">
>     <http:client
>     	ProxyServer="somehost"
>      	ProxyServerPort="123"/>
> </http:conduit>
> {code} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message