jacebo@stripped wrote:
>
> Hi,
>
> I have a problem with the GNU JDBC for Mysql when try to construct a
> large PreparedStatement greater than 500 Kbytes in a RMI Server. It
> seems that this JDBC construct the statements all in the memory of the
> JVM. Then de JDBC crashes when is constructing it. The stack trace of
> this error is the next:
>
> java.lang.OutOfMemoryError
> at java.io.ByteArrayOutputStream.write(Compiled Code)
> at java.io.ObjectOutputStream.bufferedWrite(Compiled Code)
> at java.io.ObjectOutputStream.writeInternal(Compiled Code)
> at java.io.ObjectOutputStream.outputArray(Compiled Code)
> at java.io.ObjectOutputStream.writeObject(Compiled Code)
> at org.gjt.mm.mysql.PreparedStatement.setObject(Compiled Code)
> at org.gjt.mm.mysql.PreparedStatement.setObject(Compiled Code)
> at AppendContent.posarRecurs(Compiled Code)
> at AppendContent.main(Compiled Code)
>
> The environment is:
>
> DB: mysql-3.21.33b-gamma-sun-solaris2.6-sparc.tar //
> mysql-3.22.14-gamma-sun-solaris2.6-sparc.tar
> JDK: jdk1.1.7
> JDBC: mm.mysql.jdbc-1.0.tar.gz
> O.S.: SunOS demo 5.6 Generic_105181-03 sun4u sparc SUNW,Ultra-5_10
>
> Anybody knows who I can construct statements greater than 500 Kbytes?
> Are there any method that allows to open a DataInputStream or
> DataOutputStream upon a field of a database table?
>
> I need a method that allows to save large files upon Mysql BLOB fields
> since Java.
>
> Your answers are welcomed
>
> Bye
>
> --
> Jorge Acebo Canedo mailto:Jorge.Acebo@stripped
Hi Jorge
With the twz driver you can temporarily store ResultSet's in files ( changable via connect
option).
Perhaps it stores PreparedStatements too in these temporary files.
(Terrance?)
But perhaps you just have to increase the maximum RAM usage of your VM (-mx flag) on
startup.
Tschau
Christian
PS: Sorry for the late answer, I was on vacation.