服务器无响应,帮忙找下错!
ception in thread "main" org.apache.commons.httpclient.NoHttpResponseException: The server corporbank.dccnet.com failed to respond
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1835)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
at org.apache.commons.httpclient.ConnectMethod.execute(ConnectMethod.java:144)
at org.apache.commons.httpclient.HttpMethodDirector.executeConnect(HttpMethodDirector.java:495)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:390)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
at com.icbc.SSL.SSLSendAndRec.main(SSLSendAndRec.java:54)
ception in thread "main" org.apache.commons.httpclient.NoHttpResponseException: The server corporbank.dccnet.com failed to respond
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1835)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
at org.apache.commons.httpclient.ConnectMethod.execute(ConnectMethod.java:144)
at org.apache.commons.httpclient.HttpMethodDirector.executeConnect(HttpMethodDirector.java:495)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:390)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
at com.icbc.SSL.SSLSendAndRec.main(SSLSendAndRec.java:54)
这个是对apache httpclient异常的官方主要讲解
你看一下这段org.apache.commons.httpclient.NoHttpResponseException
java.io.IOException
+- org.apache.commons.httpclient.NoHttpResponseExceptionIn some circumstances, usually when under heavy load, the web server may be able to receive requests but unable to process them. A lack of sufficient resources like worker threads is a good example. This may cause the server to drop the connection to the client without giving any response. HttpClient throws NoHttpResponseException when it encounters such a condition. In most cases it is safe to retry a method that failed with NoHttpResponseException.
或者哪个方法调用的时候该传HttpResponse对象没传,或者传入Null值
你说可能是那边服务器的防火墙问题吗?
只能理解成防火墙了,或者服务器有其他的安全策略?麻烦了。
server responding body :<h1>Bad Request (Invalid URL)</h1>
server responding code :HTTP/1.1 400 Bad Request