cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roy huang" <lingererhu...@hotmail.com>
Subject Re: is databasereader's bug?
Date Mon, 12 Apr 2004 07:39:27 GMT
Sorry for not trying everything.I change the jdbc driver to oracle official under jdk 1.4.Problem
solved. 
----- Original Message ----- 
From: "roy huang" <lingererhuang@hotmail.com>
To: <dev@cocoon.apache.org>
Sent: Friday, April 09, 2004 12:06 PM
Subject: Re: is databasereader's bug?


> Hi,all:
>     After some hacking way work,I believe it is not the code's error,it is database connection's
problem.
> In DatabaseReader.java,get blob stream in serialize(Response) like that:
>    byte[] buffer = new byte[8096];
>   int length = -1;
> 
>   while ((length = is.read(buffer)) > -1) {
>    out.write(buffer, 0, length);
>   }
>   is.close();
>   out.flush();
> 
> 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);
>    this.serialize(response);
>   } catch (IOException ioe) {
>    System.out.println(ioe.toString());
>     ...
> and the message is:
> java.io.IOException: [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.
> 
> WDYT?
> 
> Roy Huang
Mime
View raw message