I run a client server app where the client is swing and the server is a spring/tomcat http invoker solution. Occasionally, I get these connection errors on the client side and I was wondering if someone might be able to suggest why. The internet always seems to be fine when they occur. I have a huge timeout value for my httpinvokers:
The errors look like so:Code:<bean id="aServiceInterceptor" class="org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor"> <property name="serviceUrl"> <value>https://x.x.x.x:8443/myservice/services/aService</value> </property> <property name="remoteInvocationFactory" ref="remoteInvocationFactory"/> <property name="httpInvokerRequestExecutor"> <bean class="org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor"> <property name="readTimeout" value="2000000"/> </bean> </property> </bean>
or occasionally they look like so:Code:org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'loadEventsFromServerToClient' on target class [class com.mbs.is.util.event.applicationevent.MassQueueServerEventsToClient] failed; nested exception is org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [https://x.x.x.x:8443/myservice/services/aService]; nested exception is java.net.SocketException: Connection reset at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:269) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529) Caused by: org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [https://x.x.x.x:8443/myservice/services/aService]; nested exception is java.net.SocketException: Connection reset at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:211) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:144) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy0.getClientApplicationEvents(Unknown Source) at com.mbs.is.util.event.applicationevent.MassQueueServerEventsToClient.loadEventsFromServerToClient(MassQueueServerEventsToClient.java:31) at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276) at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:260) ... 3 more Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source) at com.sun.net.ssl.internal.ssl.InputRecord.readV3Record(Unknown Source) at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77) at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105) at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832) 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.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397) 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 org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor.executePostMethod(CommonsHttpInvokerRequestExecutor.java:195) at org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor.doExecuteRequest(CommonsHttpInvokerRequestExecutor.java:129) at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:136) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:191) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:173) at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:141) ... 12 more
Code:com.mbs.is.view.swing.client.logging.ClientFailureException: org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [https://x.x.x.x:8443/myservice/services/aService]; nested exception is javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: SSL peer shut down incorrectly com.mbs.is.view.swing.client.logging.ConvertErrorsToClientExceptions.afterThrowing(ConvertErrorsToClientExceptions.java:73) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) java.lang.reflect.Method.invoke(Unknown Source) org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invokeHandlerMethod(ThrowsAdviceInterceptor.java:146) org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:131) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) com.mbs.is.util.event.applicationevent.CompanyEventApplicationMethodInterceptorEventFirer.invoke(CompanyEventApplicationMethodInterceptorEventFirer.java:44) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) com.mbs.is.util.event.applicationevent.CompanyEventApplicationMethodInterceptorEventFirer.invoke(CompanyEventApplicationMethodInterceptorEventFirer.java:44) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy21.importServiceLineData(Unknown Source) com.mbs.is.view.swing.importdata.importers.ServiceLineImport.run(ServiceLineImport.java:325) java.lang.Thread.run(Unknown Source)


Reply With Quote