Thanks for your reply; sorry for my late answer, I went on with
something else in the meantime.
Another strange point is that for all other respects, this database
works fine. The same query, with other parameters, doesn't give me the
error.
I will try deleting the index.db file.
See my answers below for your information.

Keep on the good work,

Gilles.

On 8 mar, 18:58, Thomas Mueller <[email protected]> wrote:
> 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 thefile.index.db will solve the problem. Still I have a few
> questions:
>
> - What is your database URL?
'jdbc:h2:E:/MYDIR/MY_DATABASE_NAME;IFEXISTS=TRUE;CACHE_SIZE=32000'

> - Do you use Tomcat or another web server? Do you unload or reload the
> web application?
No, I use the embedded mode.

> - Did you use multiple connections?
No.

> - With which version of H2 was this database created?
79

> - Do you use any settings or special features (for example, the setting LOG=0,
>     or two phase commit, linked tables, cache settings)?
I once linked some tables from it in another database.

> - Is the application multi-threaded?
No.

> - What operating system,filesystem, and virtual machine
>     (java -version) do you use?
This problem occurred on a 64bit server with:
-Windows Server 2003 SP2
-java 1.6.0_12
-HotSpot 64bit Server VM

> - Is it (or was it at some point) a networkedfilesystem?
The database resides on the same computer.

> - How big is the database (filesizes)?
data.db = 2.260.993 kb
index.db = 1.245.185 kb

> - Is the database usually closed normally, or is process terminated forcefully
>     or the computer switched off?
It happened that the VM was forcefully stopped while running, but
normally at this point the DB was closed.
However, I could understand that this could have caused corruption.

> - Is it possible to reproduce this problem using a fresh database
>     (sometimes, or always)?
Not tried yet.

> 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:FileIDmismatchgot=-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