Results 1 to 3 of 3
- 01-07-2009, 12:14 PM #1
Member
- Join Date
- Jan 2009
- Posts
- 1
- Rep Power
- 0
ClientAbortException: java.net.SocketException:Software caused connection abort:
I have problem while sending the data on mobile client. This is happing when I sending file(audio, image or video) of size 2 or more MB.
The exact exception is here
INFO 07 Jan 2009 13:20:03,562 (DownlaoderServlet.java:77) - fie size 1737743
INFO 07 Jan 2009 13:20:03,593 (DownlaoderServlet.java:87) - error in writing file on stream
ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error
at org.apache.catalina.connector.OutputBuffer.realWri teBytes(OutputBuffer.java:366)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(B yteChunk.java:403)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteCh unk.java:323)
at org.apache.catalina.connector.OutputBuffer.writeBy tes(OutputBuffer.java:392)
at org.apache.catalina.connector.OutputBuffer.write(O utputBuffer.java:381)
at org.apache.catalina.connector.CoyoteOutputStream.w rite(CoyoteOutputStream.java:76)
at java.util.zip.DeflaterOutputStream.deflate(Deflate rOutputStream.java:156)
at java.util.zip.DeflaterOutputStream.write(DeflaterO utputStream.java:114)
at java.util.zip.GZIPOutputStream.write(GZIPOutputStr eam.java:72)
at java.io.FilterOutputStream.write(FilterOutputStrea m.java:80)
at com.tcm.autumn.servlets.DownlaoderServlet.doGet(Do wnlaoderServlet.java:81)
at com.tcm.autumn.servlets.DownlaoderServlet.doPost(D ownlaoderServlet.java:110)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDispatcher.java:672)
if file size is less then the 2MB then file send successfully. Sir can you help me in this type of error. File reading and sending code is here.
try{
…………………………
byte[] fileInArray = null;
fileInArray = readFileByte(fileUrl);
OutputStream outStream = new GZIPOutputStream(response.getOutputStream());
output.write(fileInArray); // got exception here
……………………………
outStream.flush();
outStream.close();
}catch(Exception e){
}
public static byte[] readFileByte(String filePath) throws FileNotFoundException, IOException
{
FileInputStream fileInputStream = null;
byte[] contentByte = null;
File contentFile = new File(filePath);
int contentSize = (int) contentFile.length();
fileInputStream = new FileInputStream(contentFile);
contentByte = new byte[contentSize];
fileInputStream.read(contentByte);
fileInputStream.close();
return contentByte;
}
- 01-07-2009, 12:21 PM #2
Member
- Join Date
- Jan 2009
- Posts
- 2
- Rep Power
- 0
Hello
Hello everyone.....
- 01-15-2009, 09:01 PM #3
Member
- Join Date
- Jan 2009
- Location
- italy
- Posts
- 16
- Rep Power
- 0
The problem occur every time the filesize exceed 2MB?
The problem must be in client side: probabily the client for some reason interrupts the communication with server causing the exceptionArticle and examples about Java EE world
http://programmaremobile.blogspot.com
Similar Threads
-
java.net.SocketException: Permission denied: listen failed
By vitaliy in forum NetworkingReplies: 3Last Post: 05-22-2011, 03:16 PM -
Exception: An established connection was aborted by the software in your host machine
By vidhya.sk in forum Advanced JavaReplies: 7Last Post: 06-08-2010, 01:36 PM -
Software caused connection abort: socket write error
By kuguy in forum NetworkingReplies: 3Last Post: 04-13-2010, 03:43 PM -
java.net.SocketException: Permission denied: connect
By ToddT in forum Java AppletsReplies: 5Last Post: 03-13-2009, 12:45 PM -
Ftpclient abort download
By Papalazarou in forum New To JavaReplies: 0Last Post: 01-06-2009, 04:18 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks