Error with last version 1.3.154

23 views
Skip to first unread message

frederic.vergnaud

unread,
Apr 7, 2011, 6:12:46 AM4/7/11
to H2 Database
Hi Thomas,
I have a very big problem with my database. When I try to connect ti
one of my tables called Message, I've the following error :

org.h2.jdbc.JdbcSQLException: General error:
java.lang.RuntimeException: parent not found:20 [50000-122]
at org.h2.message.Message.getSQLException(Message.java:106)
at org.h2.message.Message.convert(Message.java:283)
at org.h2.engine.Database.openDatabase(Database.java:262)
at org.h2.engine.Database.<init>(Database.java:222)
at org.h2.engine.Engine.openSession(Engine.java:58)
at org.h2.engine.Engine.openSession(Engine.java:142)
at org.h2.engine.Engine.getSession(Engine.java:122)
at
org.h2.engine.SessionFactoryEmbedded.createSession(SessionFactoryEmbedded.java:
17)
at
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:
245)
at org.h2.engine.SessionRemote.createSession(SessionRemote.java:223)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94)
at org.h2.Driver.connect(Driver.java:58)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at controleur.ConnectionH2.<init>(ConnectionH2.java:31)
at modele.Projet.<init>(Projet.java:62)
at
controleur.RestaurationProjet.restaureProjet(RestaurationProjet.java:
39)
at vue.FenetrePrincipale.actionPerformed(FenetrePrincipale.java:2404)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:
2028)
at javax.swing.AbstractButton
$Handler.actionPerformed(AbstractButton.java:2351)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:
387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:
242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:
809)
at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:137)
at javax.swing.plaf.basic.BasicMenuItemUI
$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6374)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6139)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4736)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4566)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:
4621)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:
4282)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4566)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:680)
at java.awt.EventQueue.access$000(EventQueue.java:86)
at java.awt.EventQueue$1.run(EventQueue.java:639)
at java.awt.EventQueue$1.run(EventQueue.java:637)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext
$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext
$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:653)
at java.awt.EventQueue$2.run(EventQueue.java:651)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext
$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:650)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:
296)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:
211)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:
201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:
196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:
188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.RuntimeException: parent not found:20
at org.h2.message.Message.throwInternalError(Message.java:186)
at org.h2.store.PageStore.addMeta(PageStore.java:1274)
at org.h2.store.PageStore.readMetaData(PageStore.java:1205)
at org.h2.store.PageStore.recover(PageStore.java:1014)
at org.h2.store.PageStore.openExisting(PageStore.java:296)
at org.h2.store.PageStore.open(PageStore.java:254)
at org.h2.engine.Database.getPageStore(Database.java:2294)
at org.h2.engine.Database.open(Database.java:625)
at org.h2.engine.Database.openDatabase(Database.java:228)
... 55 more

And in the H2 console, I success connect the database, but when I'm
trying to make a SELECT on my table Message, I've this error
message :

File not found: "/blablabla/database_name.lobs.db/
10.t20.lob.db" [90124-154] 90124/90124

I think it's a problem with a clob column. I've made some ALTER TABLE
MESSAGE ALTER COLUMN column_name CLOB, then ALTER TABLE MESSAGE ALTER
COLUMN column_name VARCHAR because finally I didn't need such a large
type of data.
I can't come back to the exact changes I've made on my software
because I don't use this table very often, but I suspect it happened
after an update from the 1.2.122 version to the 1.3.153 version (then
1.3.154 I actually use)

Thanks for your fast answer and sorry for my bad english ;)

Frédéric Vergnaud

unread,
Apr 7, 2011, 6:27:00 AM4/7/11
to H2 Database
Another problem now :

org.h2.jdbc.JdbcSQLException: Unsupported database file version or invalid file header in file /blablabla/database_name.h2.db [90048-122]
    at org.h2.message.Message.getSQLException(Message.java:106)
    at org.h2.message.Message.getSQLException(Message.java:117)
    at org.h2.message.Message.getSQLException(Message.java:76)
    at org.h2.store.PageStore.readStaticHeader(PageStore.java:563)
erreur : java.lang.NullPointerException
    at org.h2.store.PageStore.openExisting(PageStore.java:284)

    at org.h2.store.PageStore.open(PageStore.java:254)
    at org.h2.engine.Database.getPageStore(Database.java:2294)
    at org.h2.engine.Database.open(Database.java:625)
    at org.h2.engine.Database.openDatabase(Database.java:228)
    at org.h2.engine.Database.<init>(Database.java:222)
    at org.h2.engine.Engine.openSession(Engine.java:58)
    at org.h2.engine.Engine.openSession(Engine.java:142)
    at org.h2.engine.Engine.getSession(Engine.java:122)
    at org.h2.engine.SessionFactoryEmbedded.createSession(SessionFactoryEmbedded.java:17)
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:245)
    at org.h2.engine.SessionRemote.createSession(SessionRemote.java:223)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94)
    at org.h2.Driver.connect(Driver.java:58)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:207)
    at controleur.ConnectionH2.<init>(ConnectionH2.java:31)
    at modele.Projet.<init>(Projet.java:62)
    at controleur.RestaurationProjet.restaureProjet(RestaurationProjet.java:39)
    at vue.FenetrePrincipale.actionPerformed(FenetrePrincipale.java:2404)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)

    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
    at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:137)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)

    at java.awt.Component.processMouseEvent(Component.java:6374)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6139)
    at java.awt.Container.processEvent(Container.java:2085)
    at java.awt.Component.dispatchEventImpl(Component.java:4736)
    at java.awt.Container.dispatchEventImpl(Container.java:2143)
    at java.awt.Component.dispatchEvent(Component.java:4566)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
    at java.awt.Container.dispatchEventImpl(Container.java:2129)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4566)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:680)
    at java.awt.EventQueue.access$000(EventQueue.java:86)
    at java.awt.EventQueue$1.run(EventQueue.java:639)
    at java.awt.EventQueue$1.run(EventQueue.java:637)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)

    at java.awt.EventQueue$2.run(EventQueue.java:653)
    at java.awt.EventQueue$2.run(EventQueue.java:651)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:650)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

2011/4/7 frederic.vergnaud <frederic...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.


Dario Fassi

unread,
Apr 7, 2011, 8:12:54 AM4/7/11
to h2-da...@googlegroups.com
Hi,
Seems you have an older jdbc driver in your GUI client (1.2.122)  and newer database&driver in you server 1.3.154.
Look at your error codes: [50000-122] and [90124-154]

regards
Dario.


El 07/04/11 07:12, frederic.vergnaud escribió:
Hi Thomas,
I have a very big problem with my database. When I try to connect ti
one of my tables called Message, I've the following error :

org.h2.jdbc.JdbcSQLException: General error:
java.lang.RuntimeException: parent not found:20 [50000-122]

And in the H2 console, I success connect the database, but when I'm
trying to make a SELECT on my table Message, I've this error
message :

File not found: "/blablabla/database_name.lobs.db/
10.t20.lob.db" [90124-154] 90124/90124
 but I suspect it happened
after an update from the 1.2.122 version to the 1.3.153 version (then
1.3.154 I actually use)

Frédéric Vergnaud

unread,
Apr 7, 2011, 9:21:33 AM4/7/11
to h2-da...@googlegroups.com, Dario Fassi
yes, but I 've got this error when I use the latest driver (1.3.154) !
This driver can't read older database ? No, it's impossible ....

2011/4/7 Dario Fassi <dfa...@gmail.com>

Frédéric Vergnaud

unread,
Apr 7, 2011, 10:19:33 AM4/7/11
to h2-da...@googlegroups.com, Dario Fassi
Now, the error message is :

org.h2.jdbc.JdbcSQLException: Unsupported database file version or invalid file header in file /blablabla/database_name.h2.db [90048-122]

What does it means exactly ? It works great with 153 ... but if I try to open it one first time with 154, it can't, and when I try to re-use 153, it makes the error code ....

So the result is that I can't access any of my databses created with H2 ... :(

Frédéric Vergnaud

unread,
Apr 7, 2011, 11:16:56 AM4/7/11
to h2-da...@googlegroups.com, Dario Fassi
And I've tried to backup an old database with 154, then restore it with 154 : no problem with h2 console, all my data are here; but it's impossible to connect from the driver in my software with the same error message :

 org.h2.jdbc.JdbcSQLException: Unsupported database file version or invalid file header in file /blablabla/database_name.h2.db [90048-122]

Please help me, I'm so desperate ...

Thomas Mueller

unread,
Apr 7, 2011, 12:59:31 PM4/7/11
to h2-da...@googlegroups.com
Hi,

The "[*-122]" in the error code is the build number. All error codes
that end with [...-122] are generated by H2 version 1.2.122, there is
no doubt about that. I guess you have two versions of H2 in your
classpath, and the JVM picks the wrong one.

> I've the following error :
> org.h2.jdbc.JdbcSQLException: General error:
> java.lang.RuntimeException: parent not found:20 [50000-122]

> Unsupported database file version or invalid file header in file /blablabla/database_name.h2.db [90048-122]

In this case, you are using H2 version 1.2.122 from 2009-10-28.

> File not found: "/blablabla/database_name.lobs.db/
> 10.t20.lob.db" [90124-154] 90124/90124

Here, you are using H2 version 1.3.154. This can only happen when
trying to access a BLOB or CLOB (if the file is not found). By
default, for new databases, H2 version 1.3.x does not create such
separate files for BLOB and CLOB data any more. Maybe the problem has
existed before, but the row wasn't accessed at that time?

I guess it makes sense to re-create the database using the newer
version. For how to do that, see
http://h2database.com/html/features.html#compacting

Regards,
Thomas

Frédéric Vergnaud

unread,
Apr 11, 2011, 4:31:30 AM4/11/11
to h2-da...@googlegroups.com, Thomas Mueller
oh yes, I'm so sorry ! There were actually 2 projects built in the same classpath of my eclipse project :( and the one I didn't want contained an old 1.2.122 !!!
thank you very much for your quick help !
fred

2011/4/7 Thomas Mueller <thomas.to...@gmail.com>
Reply all
Reply to author
Forward
0 new messages