IO Exception: java.io.IOException: Negative seek offset

993 views
Skip to first unread message

Olivier Colot

unread,
Jan 5, 2010, 6:01:20 AM1/5/10
to H2 Database
Hello,

I'm trying to load huge csv file in h2 (about 1,69Go) on a win64
platform. I get this error I cannot tackle:

IO Exception: java.io.IOException: Negative seek offset; D:\HISRUNFa
\H2\HISRUNFa.8503691703688260005.temp.db [90031-79] 90031/90031 (Aide)
org.h2.jdbc.JdbcSQLException: IO Exception: java.io.IOException:
Negative seek offset; D:\HISRUNFa\H2\HISRUNFa.
8503691703688260005.temp.db [90031-79]
at org.h2.message.Message.getSQLException(Message.java:103)
at org.h2.message.Message.convertIOException(Message.java:271)
at org.h2.store.FileStore.seek(FileStore.java:299)
at org.h2.log.UndoLogRecord.seek(UndoLogRecord.java:166)
at org.h2.log.UndoLogRecord.load(UndoLogRecord.java:177)
at org.h2.log.UndoLog.getAndRemoveLast(UndoLog.java:81)
at org.h2.engine.Session.rollbackTo(Session.java:399)
at org.h2.command.Command.executeUpdate(Command.java:234)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:163)
at org.h2.server.web.WebThread.getResult(WebThread.java:1713)
at org.h2.server.web.WebThread.query(WebThread.java:1276)
at org.h2.server.web.WebThread.process(WebThread.java:443)
at org.h2.server.web.WebThread.processRequest(WebThread.java:185)
at org.h2.server.web.WebThread.process(WebThread.java:240)
at org.h2.server.web.WebThread.run(WebThread.java:195)
Caused by: java.io.IOException: Negative seek offset
at java.io.RandomAccessFile.seek(Native Method)
at org.h2.store.FileStore.seek(FileStore.java:295)
... 12 more

Could you help me solving this problem ?

Thank you.

Thomas Mueller

unread,
Jan 8, 2010, 8:51:42 AM1/8/10
to h2-da...@googlegroups.com
Hi,

This is a bug, currently (temporary) result sets larger than 2 GB
throw this exception. I will fix it in the next release.

However, I think there is a workaround. The idea is to avoid the
temporary result sets (not only because of this problem, but also
because it is slow). How does your query look like?

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages