Re: Inserting data into a database on a Derby network server

2007-10-09 Thread John Embretsen
Hi Ture, Ture Munter wrote: For me this minor bug in my own code is not so bad as the uploaded program is only used once (by myself) to insert all data in the database. But that Derby can run out of memory if somebody forgets to close created statements is potentially a more serious bug. Of

Re: Inserting data into a database on a Derby network server

2007-10-09 Thread Kristian Waagan
John Embretsen wrote: Hi Ture, [ snip ] I didn't think it was this easy to fill up the heap (by not explicitly closing Statement objects) anymore (see e.g. DERBY-210), but there are obviously some vulnerabilities left. So thank you for sharing your code and for reporting this! Hi John,

Re: Inserting data into a database on a Derby network server

2007-10-09 Thread John Embretsen
Kristian Waagan wrote: John Embretsen wrote: Hi Ture, [ snip ] I didn't think it was this easy to fill up the heap (by not explicitly closing Statement objects) anymore (see e.g. DERBY-210), but there are obviously some vulnerabilities left. So thank you for sharing your code and for

Re: Inserting data into a database on a Derby network server

2007-10-09 Thread Kristian Waagan
John Embretsen wrote: Kristian Waagan wrote: John Embretsen wrote: Hi Ture, [ snip ] I didn't think it was this easy to fill up the heap (by not explicitly closing Statement objects) anymore (see e.g. DERBY-210), but there are obviously some vulnerabilities left. So thank you for sharing

Inserting data into a database on a Derby network server

2007-10-08 Thread Ture Munter
I'm using embedded derby in a Java SE application, however I use Derby as a network server while building the database. In that connection I ran into problems. I have a database with 65000 rows that I wanted to add to a Derby database (total size before insert around 1 records, 30MB). Each row

Re: Inserting data into a database on a Derby network server

2007-10-08 Thread Kristian Waagan
Ture Munter wrote: I'm using embedded derby in a Java SE application, however I use Derby as a network server while building the database. In that connection I ran into problems. I have a database with 65000 rows that I wanted to add to a Derby database (total size before insert around 1

Re: Inserting data into a database on a Derby network server

2007-10-08 Thread Ture Munter
Kristian Waagan [EMAIL PROTECTED] writes: Ture Munter wrote: I'm using embedded derby in a Java SE application, however I use Derby as a network server while building the database. In that connection I ran into problems. I have a database with 65000 rows that I wanted to add to a Derby

Re: Inserting data into a database on a Derby network server

2007-10-08 Thread Bryan Pendleton
The problem was solved by running Derby embedded in the program that inserted data into the database and only commit every 50th row. When you were running in the Network Server configuration, were you also committing your transaction after every 50th row? thanks, bryan

Re: Inserting data into a database on a Derby network server

2007-10-08 Thread Bryan Pendleton
database. As the data are published scientific data I can share my source code and the data. Everything is available on www.fysik.dtu.dk/~munter/derby/ Thanks for sharing your sample program. It looks like you are creating statements, but never closing them. Each call to

Re: Inserting data into a database on a Derby network server

2007-10-08 Thread Kristian Waagan
Bryan Pendleton wrote: database. As the data are published scientific data I can share my source code and the data. Everything is available on www.fysik.dtu.dk/~munter/derby/ Thanks for sharing your sample program. It looks like you are creating statements, but never closing them. Each call

Re: Inserting data into a database on a Derby network server

2007-10-08 Thread Ture Munter
Bryan Pendleton [EMAIL PROTECTED] writes: database. As the data are published scientific data I can share my source code and the data. Everything is available on www.fysik.dtu.dk/~munter/derby/ Thanks for sharing your sample program. It looks like you are creating statements,

Re: Inserting data into a database on a Derby network server

2007-10-08 Thread Ture Munter
Kristian Waagan [EMAIL PROTECTED] writes: As Bryan says, you should close your statements. Even better would be to use a PreparedStatement for all you queries (including those without any variables). Unless it is an application requirement, you could also do with just one table and