IntelliJ Java IDE
The moose likes I/O and Streams and the fly likes Socket Closed error please help us finding a fix for the same Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Reply Bookmark "Socket Closed error please help us finding a fix for the same" Watch "Socket Closed error please help us finding a fix for the same" New topic
Author

Socket Closed error please help us finding a fix for the same

Anooptej Thotapalli
Greenhorn

Joined: Jan 23, 2012
Posts: 3
Hi everyone,

I have a web application deployed on Weblogic 10.0. In the application there is hyperlink to download a resouce (say an PDF document). Upon clicking the link, IE shows the Open/Save/Cancel dialog box. If the Open/Save/Cancel dialog box is not acted upon by the user within 1 min after it pops up, Weblogic is closing the socket. This causes IE to only download a part of the file say 784 KB or something. Whereas the entire file maybe 1MB in size. Please help in fixing this issue ASAP.

Thanks in Advance



java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at weblogic.servlet.internal.ChunkOutput.writeChunkTransfer(ChunkOutput.java:525)
at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:504)
at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:382)
at weblogic.servlet.internal.CharsetChunkOutput.flush(CharsetChunkOutput.java:249)
at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:469)
at weblogic.servlet.internal.CharsetChunkOutput.implWrite(CharsetChunkOutput.java:396)
at weblogic.servlet.internal.CharsetChunkOutput.write(CharsetChunkOutput.java:198)
at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:139)
at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:169)
at com.teja.systemi.util.AroundData.copyStream(AroundData.java:311)
at com.teja.systemi.client.servlet.servant.Newdownloadsingle.producePageData(Newdownloadsingle.java:108)
at com.teja.systemi.client.servlet.servant.BaseViewController.serve(BaseViewController.java:542)
at com.teja.systemi.client.servlet.FrontController.doRequest(FrontController.java:226)
at com.teja.systemi.client.servlet.FrontController.doPost(FrontController.java:128)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 3144
The error message is telling you exactly what's wrong--you're trying to write to a socket that is closed. There's nothing more anybody can tell you from just that stacktrace.

You best bet would be to produce an SSCCE that duplicates the problem and post it here, so that people can see what you're doing wrong in your code.

Also, using words like "ASAP" or "urgent" will discourage people from helping you. Please refrain from doing so in future posts. In other words, EaseUp.(⇐link)
Anooptej Thotapalli
Greenhorn

Joined: Jan 23, 2012
Posts: 3
HI,

We are not getting this Issue in all our instance we are facing this only in Production instance and while downloading a single file all the remaining files are downloading good.

Thanks.
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 3144
Anooptej Thotapalli wrote:HI,

We are not getting this Issue in all our instance we are facing this only in Production instance and while downloading a single file all the remaining files are downloading good.

Thanks.


There's still nowhere near enough information to diagnose the problem.
Anooptej Thotapalli
Greenhorn

Joined: Jan 23, 2012
Posts: 3
ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads]) [Newdownloadsingle] IOException at writing file back. (s:null c:null i:null)

As i have referred the log files i have found this in multiple times as IOException at writing file back. If there are any other details please mention what all required.

Thanks


Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 3144
Anooptej Thotapalli wrote:ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads]) [Newdownloadsingle] IOException at writing file back. (s:null c:null i:null)

As i have referred the log files i have found this in multiple times as IOException at writing file back. If there are any other details please mention what all required.

Thanks




I'm afraid I can't help you. The above means nothing to me, and other than the SSCCE I mentioned earlier, without the ability to see your system and know what you're doing, I wouldn't even know what to ask for.

Good luck!
 
 
subject: Socket Closed error please help us finding a fix for the same
 
Threads others viewed
Null SAXParser while creating getXmlReader() in Digeter class
SocketTimeoutException weblogic 9.2
ClassCastException
java.net.SocketException: Broken pipe
Please help me with the reason for this error..this error is when i run container tests in weblogic
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com