Hello,

I use H2 database in my application, but sometimes we get an error
saying java.io.EOFException. What may cause that? Here is the stack
trace:

Caused by: org.h2.jdbc.JdbcSQLException: IO Exception:
"java.io.EOFException"; "/usr/local/bea/user_projects/domains/MAN2/
berkley/messages.h2.db"; SQL statement:
 UPDATE MO_MESSAGES SET PULLDATE = NOW(), NEXT_PULL_DATE = NULL WHERE
MSG_GROUP_ID = ? [90031-126]
        at org.h2.message.Message.getSQLException(Message.java:110)
        at org.h2.message.Message.convertIOException(Message.java:325)
        at org.h2.store.FileStore.readFully(FileStore.java:286)
        at org.h2.store.PageStore.readPage(PageStore.java:963)
        at org.h2.store.PageStore.getPage(PageStore.java:484)
        at org.h2.index.PageBtreeIndex.getPage(PageBtreeIndex.java:
141)
        at org.h2.index.PageBtreeIndex.find(PageBtreeIndex.java:170)
        at org.h2.index.PageBtreeIndex.find(PageBtreeIndex.java:163)
        at org.h2.index.IndexCursor.find(IndexCursor.java:128)
        at org.h2.table.TableFilter.next(TableFilter.java:255)
        at org.h2.command.dml.Update.update(Update.java:87)
        at org.h2.command.CommandContainer.update
(CommandContainer.java:71)
        at org.h2.command.Command.executeUpdate(Command.java:199)
        at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal
(JdbcPreparedStatement.java:143)
        at org.h2.jdbc.JdbcPreparedStatement.executeBatch
(JdbcPreparedStatement.java:1102)
        at org.springframework.jdbc.core.JdbcTemplate
$4.doInPreparedStatement(JdbcTemplate.java:881)
        at org.springframework.jdbc.core.JdbcTemplate.execute
(JdbcTemplate.java:591)
        ... 14 more
Caused by: java.io.EOFException
        at java.io.RandomAccessFile.readFully(RandomAccessFile.java:
383)
        at org.h2.store.FileStore.readFully(FileStore.java:284)


Also some background info:
I was using JdbcConnectionPool implementation, but I was getting
"connection pool has been disposed" error even I did not call the
dispose method of it. So I had to write my own connection pool
implementation. In my own implementation; even I closed all
connections H2 insisted that the file lock is not released so I begin
to start H2 without a file lock.

Thank you for your help.
-- 
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