Java Socket超时异常读取超时

时间:2014-11-02 21:04:06

标签: java oracle sockets exception timeout

我遇到以下问题: 我的应用程序有一个这样的逻辑:每次我做一个更改,我抓住它并通过我的Webservice保存到Oracle XE 11g数据库。它工作正常大约前20-30次然后我的客户端崩溃与以下异常。奇怪的是,我的服务器没有显示异常,但如果我尝试重新连接它没有任何作用,我必须重新启动服务器。我认为这可能是因为没有关闭连接,所以我运行一个线程来断开非活动连接并完成工作,但是在20-30次更改之后我的应用程序再次崩溃仍然出现相同的错误。我试图找到代码中的地方,我错过了关闭一些资源,把它打扫干净,但如果是开放连接,那么问题应该解决。还有什么呢?

谢谢, 杰夫 这是我的错误日志:

org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
at com.sun.proxy.$Proxy53.storeBinary(Unknown Source)
at biz.JB.database.resourceManager.core.ResourceManager.storeBinary(ResourceManager.java:522)
at edu.JB.projectmanager.resources.facade.MasterResourceManager.storeBinary(MasterResourceManager.java:787)
at edu.JB.projectmanager.resources.facade.ResourceOperationFacade.storeBinary(ResourceOperationFacade.java:625)
at edu.JB.editors.petrinets.util.FileUtil.saveDiagram(FileUtil.java:340)
at edu.JB.editors.petrinets.editor.PetriNetEditor$9.run(PetriNetEditor.java:713)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at edu.JB.editors.petrinets.editor.PetriNetEditor.doSave(PetriNetEditor.java:702)
at edu.JB.synchronization.handlers.SynchronizeClientsHandler$1.onPropertyChanged(SynchronizeClientsHandler.java:60)
at edu.JB.core.ui.EditorPropertyChangeHandler.handlePropertyChanged(EditorPropertyChangeHandler.java:39)
at edu.JB.editors.petrinets.editor.PetriNetEditor$2.propertyChanged(PetriNetEditor.java:506)
at org.eclipse.ui.part.WorkbenchPart.firePropertyChange(WorkbenchPart.java:129)
at org.eclipse.gef.ui.parts.GraphicalEditor.firePropertyChange(GraphicalEditor.java:201)
at edu.JB.editors.petrinets.editor.PetriNetEditor.commandStackChanged(PetriNetEditor.java:481)
at org.eclipse.gef.commands.CommandStack.notifyListeners(CommandStack.java:312)
at org.eclipse.gef.commands.CommandStack.execute(CommandStack.java:211)
at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
at org.eclipse.gef.tools.DragEditPartsTracker.performDrag(DragEditPartsTracker.java:496)
at org.eclipse.gef.tools.DragEditPartsTracker.handleButtonUp(DragEditPartsTracker.java:351)
at edu.JB.editors.petrinets.parts.PetriNetDragEditPartsTracker.handleButtonUp(PetriNetDragEditPartsTracker.java:68)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1200)
at org.eclipse.gef.tools.SelectionTool.mouseUp(SelectionTool.java:574)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at edu.karlsruhe.horus.core.Application.start(Application.java:73)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking http://******
: Read timed out
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1339)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1323)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:628)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    ... 60 more
Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:266)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1531)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1504)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1310)
    ... 63 more

0 个答案:

没有答案