org.apache.axis2.AxisFault: Read timed out


at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)


at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203)


at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)


at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)


at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)


at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:438)


at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)


at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)


at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)


at webservice.DataWebServiceStub.dataView(DataWebServiceStub.java:1002)


at clientwebaction.DataAction.dataView(DataAction.java:161)


at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)


at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


at java.lang.reflect.Method.invoke(Method.java:597)


Caused by: java.net.SocketTimeoutException: Read timed out



解决办法:



在存根业务调用代码中进行设置,添加:


_operationClient.getOptions().setTimeOutInMilliSeconds(600000L); //600*1000毫秒(10分钟


_operationClient表示一个客户端对象。



这个设置很不合理,但是没办法了,暂时先解决了问题再研究去。




java.lang.OutOfMemoryError: Java heap space解决方法




引起java.lang.OutOfMemoryError: Java heap space异常,可能是由JAVA的堆栈设置太小的原因



根据网上的答案大致有以下两种解决方法:



1、在D:/apache-tomcat-6.0.18/bin/catalina.bat最前面加入:set JAVA_OPTS=-Xms200m -Xmx512m



注意:只有startup.bat启动tomcat,设置才能生效,如果利用windows的系统服务启动tomcat服务,上面的设置就不生效了,


就是说set JAVA_OPTS=-Xms200m -Xmx512m没起作用





2、在Eclilpse中修改启动参数,在VM arguments 加入了-Xms200m -Xmx512m,设置