cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roy huang" <lingererhu...@hotmail.com>
Subject is databasereader's bug?
Date Thu, 08 Apr 2004 11:26:06 GMT
Hi,all:
    I use databasereader to save file to local from database for test,but when serving big
file it always save only the beginning part of the file.I check the log,this message found:
WARN    (2004-04-08) 19:09.26:694   [test] (/attachment/file) http8080-Processor2/DatabaseReader:
Assuming client reset stream

I use the same database,jdbc driver,table to save file to local using servlet in websphere,it's
all right.I check the code,

  byte[] buffer = new byte[8192];
  int length = -1;

  while ((length = is.read(buffer)) > -1) {
   out.write(buffer, 0, length);
   System.out.println("writing!"); //insert by me for testing
  }
  is.close();
  out.flush();

For small file(several kbs) is fine,but if the file size is like 5MB,it always only save 700-1700kb,so
the file is incomplete.I can see "writing" in console stop being print.I compare the code
to my servlet code ,different is my servlet get the connection ,query and close,but databasereader.java
close connection in recycle().

environment:
cocoon: current cvs
Tomcat 4.1.30
oracle 9i

my servlet using websphere 5.1 as server

Any suggestion?

Roy Huang
Mime
View raw message