Hello Noel,
Thanks for the response. I don't have any code where i say "Close".

The stack happens when i use sun jdk 1.6.0 and during execution of
statement "prepareStatement.executeBatch"
Note: if i change jvm flavour to open-java, then everything works fine.

 Trace.db file contents are as below

Select * from StagedBag [42102-162]
12-22 00:08:31 jdbc[2]: exception
org.h2.jdbc.JdbcSQLException: Out of memory.; SQL statement:
Insert into StagedBag values(?, ?, ?, ?, ?, ?, ?, ?, ?,

?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
[90108-162]
    at org.h2.message.DbException.
getJdbcSQLException(DbException.java:329)
    at org.h2.message.DbException.get(DbException.java:158)
    at org.h2.message.DbException.convert(DbException.java:275)
    at org.h2.command.Command.executeUpdate(Command.java:230)

    at
org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:143)
    at
org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1092)
    at com.ariba.catalog.data.DBUtil.insert(DBUtil.java:67)

-Vinaya


On Thu, Dec 22, 2011 at 5:20 PM, Noel Grandin <[email protected]> wrote:

>
> yes. some part of your code closed the database connection.
>
> Vinaya wrote:
> > Hello All
> > org.h2.jdbc.JdbcSQLException: The database has been closed [90098-162]
> >       at
> > org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
> >       at org.h2.message.DbException.get(DbException.java:169)
> >       at org.h2.message.DbException.get(DbException.java:146)
> >       at org.h2.message.DbException.get(DbException.java:135)
> >       at org.h2.engine.Database.checkPowerOff(Database.java:433)
> >       at org.h2.command.Command.executeUpdate(Command.java:237)
> >       at
> >
> org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:
> > 143)
> >       at
> >
> org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:
> > 1092)
> >
> > I am getting the above error when trying to insert 1 million rows each
> > having 34 columns of Strings
> >
> > Any clue what could be the reason ?
> >
> > Thanks
> > Vinaya
> >
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to