No response to regular proxy configuration mechanisms of Java

Hi,

  • running snap behind a corporate firewall requiring to use proxies seems to have problems when accessing the product library (error message and stack trace below)
  • investigation showed that the proxy config seems not to be properly used
  • we did a quick hard coded fix in the constructor of org.esa.snap.productlibrary.opensearch.OpenSearch and added a setProxy call to AbderaClient (ie.) client.setProxy(proxyurl,proxyport);. That fixed the issue in our environment immediately. A proper solution should take the proxy parameters from the snap config

Stack trace:
FINE [org.apache.commons.httpclient.HttpConnection]: Open connection to scihub.copernicus.eu:443
FINEST [org.apache.commons.httpclient.HttpConnection]: enter HttpConnection.closeSockedAndStreams()
FINE [org.apache.commons.httpclient.HttpMethodDirector]: Closing the connection.
FINEST [org.apache.commons.httpclient.HttpConnection]: enter HttpConnection.close()
FINEST [org.apache.commons.httpclient.HttpConnection]: enter HttpConnection.closeSockedAndStreams()
INFO [org.apache.commons.httpclient.HttpMethodDirector]: I/O exception (java.net.SocketException) caught when processing request: Malformed reply from SOCKS server
FINE [org.apache.commons.httpclient.HttpMethodDirector]: Malformed reply from SOCKS server
java.net.SocketException: Malformed reply from SOCKS server
at java.net.SocksSocketImpl.readSocksReply(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.(Unknown Source)
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
at org.apache.abdera.protocol.client.util.SimpleSSLProtocolSocketFactory.createSocket(SimpleSSLProtocolSocketFactory.java:64)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
[catch] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at org.apache.abdera.protocol.client.AbderaClient.execute(AbderaClient.java:688)
at org.apache.abdera.protocol.client.AbderaClient.get(AbderaClient.java:216)
at org.apache.abdera.protocol.client.AbderaClient.get(AbderaClient.java:404)
at org.esa.snap.productlibrary.opensearch.OpenSearch.connect(OpenSearch.java:142)