cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roy huang" <>
Subject Re: is databasereader's bug?
Date Fri, 09 Apr 2004 04:06:27 GMT
    After some hacking way work,I believe it is not the code's error,it is database connection's
In,get blob stream in serialize(Response) like that:
   byte[] buffer = new byte[8096];
  int length = -1;

  while ((length = > -1) {
   out.write(buffer, 0, length);

1.I make the buffer big enough to cache the whole file like 
    byte[] buffer = new byte[8096000];
  the first time it read the whole file into buffer,works fine.but the second time it just
can't,and the same wrong.
2.I print the exception in generate()
  try {
   Response response = ObjectModelHelper.getResponse(objectModel);
  } catch (IOException ioe) {
and the message is: [DataDirect][Oracle JDBC Driver]Object has been closed.
and the recycle() run.
the same jdbc driver in otherplace doing the same thing is fine,so I guest it may be database
management,but I'm not sure is tomcat or cocoon.


Roy Huang
View raw message