google-code-export / h2database

Automatically exported from code.google.com/p/h2database
0 stars 1 forks source link

Unable to start h2 in file mode #239

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Before submitting a bug, please check the FAQ:
http://www.h2database.com/html/faq.html

What steps will reproduce the problem?
(simple SQL scripts or simple standalone applications are preferred)
1. Starting Hibernate up with a h2 file database with 
jdbc:h2:file:./data/DB;DB_CLOSE_DELAY=-1;LOCK_MODE=0;FILE_LOCK=NO;LOG=0
2.
3.

What is the expected output? What do you see instead?

org.h2.jdbc.JdbcSQLException: General error: "java.lang.RuntimeException: 
page[7400] data leaf table:979 entries:8 parent:4979 keys:[18077, 18079, 18081, 
18083, 18085, 18087, 18089, 18091] offsets:[1919, 1780, 1640, 1511, 1387, 1248, 
1108, 977] parent 4979 expected 7183" [50000-141]

What version of the product are you using? On what operating system, file
system, and virtual machine? Fails both on OSX and Windows 7

Do you know a workaround?

How important/urgent is the problem for you?
Very urgent, unable to use the database. We need to delete the files in order 
for it to startup

In your view, is this a defect or a feature request?

Please provide any additional information below.

Original issue reported on code.google.com by Soren...@gmail.com on 13 Oct 2010 at 5:25

GoogleCodeExporter commented 9 years ago
You are using FILE_LOCK=NO, which is very dangerous: 
http://h2database.com/html/features.html#database_file_locking

I'm sure the problem is that the database file is opened multiple times 
(possibly from different processes). This corrupts the database file.

Original comment by thomas.t...@gmail.com on 13 Oct 2010 at 5:45