Hi,

I am sorry to say that, but it looks like a corruption problem. Just
recently I fixed a bug that could be the root cause of the problem, in
version 1.1.108. However I'm not sure. For your case, most likely
deleting the file .index.db will solve the problem. Still I have a few
questions:

- What is your database URL?
- Do you use Tomcat or another web server? Do you unload or reload the
web application?
- Did you use multiple connections?
- With which version of H2 was this database created?
    You can find it out using:
    select * from information_schema.settings where name='CREATE_BUILD'
- Do you use any settings or special features (for example, the setting LOG=0,
    or two phase commit, linked tables, cache settings)?
- Is the application multi-threaded?
- What operating system, file system, and virtual machine
    (java -version) do you use?
- Is it (or was it at some point) a networked file system?
- How big is the database (file sizes)?
- 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)?

Regards,
Thomas



On Fri, Mar 6, 2009 at 4:40 PM, Gilles <[email protected]> wrote:
>
> Hello,
>
> I'm facing a strange exception here, while running a rather extensive
> query (A and B are 61K and 15M records respectively):
> SQL:
> SELECT * FROM A INNER JOIN B ON A.Id1 = B.Id1 AND A.Id2 = B.Id2
>                WHERE
>                        A.Id1 = 1
>                        AND A.Id2 = 2
>                        AND B.Id3 = 3
>                ORDER BY Id1,Id2,Id3 ASC
> Stack trace:
>    at org.h2.message.Message.getSQLException(Message.java:103)
>    at org.h2.message.Message.convert(Message.java:257)
>    at org.h2.message.Message.convert(Message.java:228)
>    at org.h2.command.Command.executeQueryLocal(Command.java:142)
>    at org.h2.command.Command.executeQuery(Command.java:121)
>    at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:159)
>    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.lang.RuntimeException: File ID mismatch got=-1
> expected=86 pos=5319195 false org.h2.store.DiskFile:E:
> \MY_DATABASE.index.db blockCount:-1
>    at org.h2.message.Message.getInternalError(Message.java:179)
>    at org.h2.store.DiskFile.getRecord(DiskFile.java:581)
>    at org.h2.store.Storage.getRecord(Storage.java:94)
>    at org.h2.index.BtreeIndex.getPage(BtreeIndex.java:179)
>    at org.h2.index.BtreeNode.next(BtreeNode.java:268)
>    at org.h2.index.BtreeLeaf.nextUpper(BtreeLeaf.java:230)
>    at org.h2.index.BtreeLeaf.next(BtreeLeaf.java:182)
>    at org.h2.index.BtreeCursor.next(BtreeCursor.java:95)
>    at org.h2.table.TableFilter.next(TableFilter.java:317)
>    at org.h2.table.TableFilter.next(TableFilter.java:302)
>    at org.h2.command.dml.Select.queryFlat(Select.java:479)
>    at org.h2.command.dml.Select.queryWithoutCache(Select.java:547)
>    at org.h2.command.dml.Query.query(Query.java:233)
>    at org.h2.command.CommandContainer.query(CommandContainer.java:79)
>    at org.h2.command.Command.executeQueryLocal(Command.java:140)
>    ... 8 more
>
> Is it a limitation of H2, a DB corruption, or a bug? Could you suggest
> me another way?
>
> Thanks for your help!
>
> PS: I'm using H2 version 1.0.79.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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