Hi Thomas,
Thanks for your reply.
This looks like a corrupt database. To recover the data, use the tool
> org.h2.tools.Recover to create the SQL script file, and then re-create the
> database using this script. Does it work when you do this?
No, it doesn't work. I've the same error.
- What is your database URL?
jdbc:h2:*my_folder/my_database*;AUTO_SERVER=TRUE
- Did you use LOG=0 or LOG=1? Did you read the FAQ about it?
i don't use LOG
- Did the system ever run out of disk space?
i don't know but i think it didn't.
- Could you send the full stack trace of the exception including message
text?
this is the exception in trace.db
jdbc[2]: exception
org.h2.jdbc.JdbcSQLException: General error: "java.lang.RuntimeException:
page[29799] data leaf table:192 TBCLASSART entries:16 parent:29744
keys:[3174320, 3174321, 3174322, 3174323, 3174324, 3174325, 3174326,
3174327, 3174328, 3174329, 3174330, 3174331, 3174332, 3174333, 3174334,
3174335] offsets:[1974, 1895, 1825, 1756, 1687, 1618, 1550, 1482, 1414,
1352, 1268, 1182, 1113, 1018, 952, 870] parent 29744 expected 30118"; SQL
statement:
Select * From TBCLASSART [50000-164]
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:281)
at org.h2.command.Command.executeQuery(Command.java:191)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:173)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152)
at
net.sourceforge.squirrel_sql.client.session.SQLExecuterTask.processQuery(SQLExecuterTask.java:410)
at
net.sourceforge.squirrel_sql.client.session.SQLExecuterTask.run(SQLExecuterTask.java:220)
at
net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: page[29799] data leaf table:192
TBCLASSART entries:16 parent:29744 keys:[3174320, 3174321, 3174322,
3174323, 3174324, 3174325, 3174326, 3174327, 3174328, 3174329, 3174330,
3174331, 3174332, 3174333, 3174334, 3174335] offsets:[1974, 1895, 1825,
1756, 1687, 1618, 1550, 1482, 1414, 1352, 1268, 1182, 1113, 1018, 952, 870]
parent 29744 expected 30118
at org.h2.message.DbException.throwInternalError(DbException.java:228)
at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:239)
at org.h2.index.PageDataNode.getNextPage(PageDataNode.java:226)
at org.h2.index.PageDataLeaf.getNextPage(PageDataLeaf.java:392)
at org.h2.index.PageDataCursor.nextRow(PageDataCursor.java:90)
at org.h2.index.PageDataCursor.next(PageDataCursor.java:49)
at org.h2.index.IndexCursor.next(IndexCursor.java:238)
at org.h2.table.TableFilter.next(TableFilter.java:353)
at org.h2.command.dml.Select.queryFlat(Select.java:513)
at org.h2.command.dml.Select.queryWithoutCache(Select.java:618)
at org.h2.command.dml.Query.query(Query.java:297)
at org.h2.command.dml.Query.query(Query.java:267)
at org.h2.command.dml.Query.query(Query.java:36)
at org.h2.command.CommandContainer.query(CommandContainer.java:82)
at org.h2.command.Command.executeQuery(Command.java:187)
... 6 more
- Did you use SHUTDOWN DEFRAG or the database setting DEFRAG_ALWAYS with H2
version 1.3.159 or older?
no, i didn't.
- How many connections does your application use concurrently?
usually my application use 1 connection.
- Do you use temporary tables?
no, i didn't.
- With which version of H2 was this database created?
You can find it out using:
select * from information_schema.settings where name='CREATE_BUILD'
or have a look in the SQL script created by the recover tool.
version in 147.
- Did the application run out of memory (once, or multiple times)?
no, it didn't.
- Do you use any settings or special features (for example cache settings,
two phase commit, linked tables)?
no, i didn't.
- Do you use any H2-specific system properties?
no, i didn't.
- Is the application multi-threaded?
no, it didn't.
- What operating system, file system, and virtual machine
(java -version) do you use?
OS: Windows XP, VM 1.5.18.
- How did you start the Java process (java -Xmx... and so on)?
-Xms60m
-Xmx512m
- Is it (or was it at some point) a networked file system?
no, it isn't.
- How big is the database (file sizes)?
136 MB
- How much heap memory does the Java process have?
300 MB
- Is the database usually closed normally, or is process terminated
forcefully or the computer switched off?
i don't know. maybe the computer is able to switched off.
- Is it possible to reproduce this problem using a fresh database
(sometimes, or always)?
i've try to do this but i can't reproduce problem.
i've many application installation but this is the first time that the
problem occurs.
- Are there any other exceptions (maybe in the .trace.db file)?
Could you send them please?
no, there aren't.
- Do you still have any .trace.db files, and if yes could you send them?
no, i havn't.
- Could you send the .h2.db file where this exception occurs?
yes, i can. this is the link for download:
http://www.2shared.com/file/CmS4GxS3/CORRUPTEDDB.html
Thanks.
Il giorno venerdì 31 agosto 2012 18:03:40 UTC+2, Thomas Mueller ha scritto:
>
> Hi,
>
> This looks like a corrupt database. To recover the data, use the tool
> org.h2.tools.Recover to create the SQL script file, and then re-create the
> database using this script. Does it work when you do this?
>
> With version 1.3.162 and older: on out of disk space, the database can get
> corrupt sometimes, if later write operations succeed. The same problem
> happens on other kinds of I/O exceptions (where one or some of the writes
> fail, but subsequent writes succeed). Now the file is closed on the first
> unsuccessful write operation, so that later requests fail consistently.
>
> Important corruption problems were fixed in version 1.2.135 and version
> 1.2.140 (see the change log). Known causes for corrupt databases are: if
> the database was created or used with a version older than 1.2.135, and the
> process was killed while the database was closing or writing a checkpoint.
> Using the transaction isolation level READ_UNCOMMITTED (LOCK_MODE 0) while
> at the same time using multiple connections. Disabling database file
> protection using (setting FILE_LOCK to NO in the database URL). Some other
> areas that are not fully tested are: Platforms other than Windows XP,
> Linux, Mac OS X, or JVMs other than Sun 1.5 or 1.6; the feature
> MULTI_THREADED; the features AUTO_SERVER and AUTO_RECONNECT; the file
> locking method 'Serialized'.
>
> I am very interested in analyzing and solving this problem. Corruption
> problems have top priority for me. I have a few questions:
>
> - What is your database URL?
> - Did you use LOG=0 or LOG=1? Did you read the FAQ about it?
> - Did the system ever run out of disk space?
> - Could you send the full stack trace of the exception including message
> text?
> - Did you use SHUTDOWN DEFRAG or the database setting DEFRAG_ALWAYS with
> H2 version 1.3.159 or older?
> - How many connections does your application use concurrently?
> - Do you use temporary tables?
> - With which version of H2 was this database created?
> You can find it out using:
> select * from information_schema.settings where name='CREATE_BUILD'
> or have a look in the SQL script created by the recover tool.
> - Did the application run out of memory (once, or multiple times)?
> - Do you use any settings or special features (for example cache settings,
> two phase commit, linked tables)?
> - Do you use any H2-specific system properties?
> - Is the application multi-threaded?
> - What operating system, file system, and virtual machine
> (java -version) do you use?
> - How did you start the Java process (java -Xmx... and so on)?
> - Is it (or was it at some point) a networked file system?
> - How big is the database (file sizes)?
> - How much heap memory does the Java process have?
> - Is the database usually closed normally, or is process terminated
> forcefully or the computer switched off?
> - Is it possible to reproduce this problem using a fresh database
> (sometimes, or always)?
> - Are there any other exceptions (maybe in the .trace.db file)?
> Could you send them please?
> - Do you still have any .trace.db files, and if yes could you send them?
> - Could you send the .h2.db file where this exception occurs?
>
> Regards,
> Thomas
>
>
> On Thu, Aug 30, 2012 at 8:56 AM, marialaura mobbili <
> [email protected] <javascript:>> wrote:
>
>> Hi all,
>> i've an error when executing simple query "Select * From TBCLASSART"
>> 08-30 08:38:22 jdbc[2]: exception
>> org.h2.jdbc.JdbcSQLException: General error: "java.lang.RuntimeException:
>> page[29799] data leaf table:192 TBCLASSART entries:16 parent:29744
>> keys:[3174320, 3174321, 3174322, 3174323, 3174324, 3174325, 3174326,
>> 3174327, 3174328, 3174329, 3174330, 3174331, 3174332, 3174333, 3174334,
>> 3174335] offsets:[1974, 1895, 1825, 1756, 1687, 1618, 1550, 1482, 1414,
>> 1352, 1268, 1182, 1113, 1018, 952, 870] parent 29744 expected 30118"; SQL
>> statement:
>> Select * From TBCLASSART [50000-164]
>> 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:281)
>> at org.h2.command.Command.executeQuery(Command.java:191)
>> at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:173)
>> at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152)
>> at
>> net.sourceforge.squirrel_sql.client.session.SQLExecuterTask.processQuery(SQLExecuterTask.java:410)
>> at
>> net.sourceforge.squirrel_sql.client.session.SQLExecuterTask.run(SQLExecuterTask.java:220)
>> at
>> net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:82)
>> at java.lang.Thread.run(Thread.java:619)
>> Caused by: java.lang.RuntimeException: page[29799] data leaf table:192
>> TBCLASSART entries:16 parent:29744 keys:[3174320, 3174321, 3174322,
>> 3174323, 3174324, 3174325, 3174326, 3174327, 3174328, 3174329, 3174330,
>> 3174331, 3174332, 3174333, 3174334, 3174335] offsets:[1974, 1895, 1825,
>> 1756, 1687, 1618, 1550, 1482, 1414, 1352, 1268, 1182, 1113, 1018, 952, 870]
>> parent 29744 expected 30118
>> at org.h2.message.DbException.throwInternalError(DbException.java:228)
>> at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:239)
>> at org.h2.index.PageDataNode.getNextPage(PageDataNode.java:226)
>> at org.h2.index.PageDataLeaf.getNextPage(PageDataLeaf.java:392)
>> at org.h2.index.PageDataCursor.nextRow(PageDataCursor.java:90)
>> at org.h2.index.PageDataCursor.next(PageDataCursor.java:49)
>> at org.h2.index.IndexCursor.next(IndexCursor.java:238)
>> at org.h2.table.TableFilter.next(TableFilter.java:353)
>> at org.h2.command.dml.Select.queryFlat(Select.java:513)
>> at org.h2.command.dml.Select.queryWithoutCache(Select.java:618)
>> at org.h2.command.dml.Query.query(Query.java:297)
>> at org.h2.command.dml.Query.query(Query.java:267)
>> at org.h2.command.dml.Query.query(Query.java:36)
>> at org.h2.command.CommandContainer.query(CommandContainer.java:82)
>> at org.h2.command.Command.executeQuery(Command.java:187)
>> ... 6 more
>>
>> i don't use MVCC.
>> There are any solutions?
>>
>> Thanks
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "H2 Database" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/h2-database/-/g_aJwYa3SN4J.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>.
>> For more options, visit this group at
>> http://groups.google.com/group/h2-database?hl=en.
>>
>
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/h2-database/-/MT7m6d4Kz1oJ.
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.