'parent not found' error with 1.2.129

42 views
Skip to first unread message

Ryan McKinley

unread,
Feb 21, 2010, 8:49:40 PM2/21/10
to h2-da...@googlegroups.com
Just upgraded to 1.2.129, and ran into an error with a clean DB (not
upgraded DB)

I'm leaving for two weeks travel, so won't have much time to look into
it, but figured I would point it out in case it rings any bells:


Caused by: java.lang.RuntimeException: org.h2.jdbc.JdbcSQLException:
General error: "java.lang.RuntimeException: parent not found:66"
[50000-129]
at voyager.common.sql.SQLPool.statement(SQLPool.java:100)
at voyager.tasks.discovery.DiscoveryTaskQueueSQL.getLocationHistogram(DiscoveryTaskQueueSQL.java:512)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416)
at org.apache.wicket.proxy.$Proxy42.getLocationHistogram(Unknown Source)
at voyager.explorer.v11.panels.manage.discovery.locations.ShowLocationsPanel$2.populateItem(ShowLocationsPanel.java:128)
at org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:576)
at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:131)
at org.apache.wicket.Component.internalBeforeRender(Component.java:1061)
at org.apache.wicket.Component.beforeRender(Component.java:1095)
at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1727)
... 56 more
Caused by: org.h2.jdbc.JdbcSQLException: General error:
"java.lang.RuntimeException: parent not found:66" [50000-129]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:317)
at org.h2.message.DbException.get(DbException.java:157)
at org.h2.message.DbException.convert(DbException.java:285)
at org.h2.engine.Database.openDatabase(Database.java:230)
at org.h2.engine.Database.<init>(Database.java:195)
at org.h2.engine.Engine.openSession(Engine.java:56)
at org.h2.engine.Engine.openSession(Engine.java:140)
at org.h2.engine.Engine.getSession(Engine.java:120)
at org.h2.engine.Session.createSession(Session.java:119)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:236)
at org.h2.engine.SessionRemote.createSession(SessionRemote.java:214)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:111)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:95)
at org.h2.Driver.connect(Driver.java:58)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:840)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.apache.commons.dbcp.DataSourceConnectionFactory.createConnection(DataSourceConnectionFactory.java:43)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:840)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
at voyager.common.sql.SQLPool.statement(SQLPool.java:95)
... 69 more
Caused by: java.lang.RuntimeException: parent not found:66
at org.h2.message.DbException.throwInternalError(DbException.java:227)
at org.h2.store.PageStore.addMeta(PageStore.java:1303)
at org.h2.store.PageStore.readMetaData(PageStore.java:1234)
at org.h2.store.PageStore.recover(PageStore.java:1046)
at org.h2.store.PageStore.openExisting(PageStore.java:300)
at org.h2.store.PageStore.open(PageStore.java:258)
at org.h2.engine.Database.getPageStore(Database.java:2014)
at org.h2.engine.Database.open(Database.java:524)
at org.h2.engine.Database.openDatabase(Database.java:200)
... 89 more


thanks
ryan

Thomas Mueller

unread,
Feb 22, 2010, 1:49:21 AM2/22/10
to h2-da...@googlegroups.com
Hi,

This looks like a serious problem. I have a few questions:

- Could you send the .h2.db and .trace.db files?

If not, then I would like to know:

- What is your database URL?
- Do you use temporary tables?
- Did you use multiple connections?
- A workarounds is: 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 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 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)?
- 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?
- Are there any other exceptions (maybe in the .trace.db file)?
Could you send them please?

Regards,
Thomas

Oliver Meincke

unread,
Feb 23, 2010, 8:24:03 AM2/23/10
to H2 Database
Hi,

I just got the same exception. I used the script tool to upgrade the
database to the new version:

General error: "java.lang.RuntimeException: parent not found:

383" [50000-129]


at org.h2.message.DbException.getJdbcSQLException(DbException.java:
317)
at org.h2.message.DbException.get(DbException.java:157)
at org.h2.message.DbException.convert(DbException.java:285)
at org.h2.engine.Database.openDatabase(Database.java:230)
at org.h2.engine.Database.<init>(Database.java:195)
at org.h2.engine.Engine.openSession(Engine.java:56)
at org.h2.engine.Engine.openSession(Engine.java:140)
at org.h2.engine.Engine.getSession(Engine.java:120)
at org.h2.engine.Session.createSession(Session.java:119)
at
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:
236)
at org.h2.engine.SessionRemote.createSession(SessionRemote.java:214)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:111)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:95)
at org.h2.Driver.connect(Driver.java:58)

at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at
org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:
133)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:
446)
... 15 more
Caused by: java.lang.RuntimeException: parent not found:383


at org.h2.message.DbException.throwInternalError(DbException.java:
227)
at org.h2.store.PageStore.addMeta(PageStore.java:1303)
at org.h2.store.PageStore.readMetaData(PageStore.java:1234)
at org.h2.store.PageStore.recover(PageStore.java:1046)
at org.h2.store.PageStore.openExisting(PageStore.java:300)
at org.h2.store.PageStore.open(PageStore.java:258)
at org.h2.engine.Database.getPageStore(Database.java:2014)
at org.h2.engine.Database.open(Database.java:524)
at org.h2.engine.Database.openDatabase(Database.java:200)

... 29 more

Sorry, I can't provide the database because it's a customer's
database, but I will try to give some additional information.

- The .trace.db file contains the following:
02-23 13:46:43 log: flush
java.lang.NullPointerException
at org.h2.engine.Database.flush(Database.java:1681)
at org.h2.store.WriterThread.run(WriterThread.java:85)
at java.lang.Thread.run(Thread.java:619)

> - What is your database URL?

jdbc:h2:file:C:\Users\om\Epikur/data/epikur;CACHE_SIZE=131072

> - Do you use temporary tables?

no

> - Did you use multiple connections?- A workarounds is: use the tool org.h2.tools.Recover to create
no

>     the SQL script file, and then re-create the database using this script.
>     Does it work when you do this?- With which version of H2was this database created?

1.1.118

> - Did the application run out of memory (once, or multiple times)?

The Script-Tool ran out of memory when trying to convert the database,
I increased the memory to 512M and it worked.

> - Do you use any H2-specific system properties?

no

> - Is the application multi-threaded?

no

> - What operating system, file system, and virtual machine
>     (java -version) do you use?

Windows 7, NTFS, 1.6.0_13-b03

> - How did you start the Java process (java -Xmx... and so on)?

-Xmx1024M

> - How big is the database (file sizes)?

.data.db: 58MB, .index.db: 18MB, lobs.db: 112MB

> - Is the database usually closed normally, or is process terminated
>     forcefully or the computer switched off?

No, database was closed normally.

Greetings,

Oliver

Thomas Mueller

unread,
Feb 26, 2010, 10:02:00 AM2/26/10
to h2-da...@googlegroups.com
Hi,

I did find and fix a problem that could be related, but it's hard to
tell if it's the same problem.

The exception message says you are using version 1.2.129, but you also
wrote you use version 1.1.118. I guess the problem is only with
version 1.2.129, right?

Regards,
Thomas

Chris Schanck

unread,
Feb 26, 2010, 11:25:28 AM2/26/10
to h2-da...@googlegroups.com
Thomas, I am also seeing this problem.

It happens in a particular sequence of events. Our app creates a mid-sized database (around 162M when I zip it up).

It creates around 2000 tables, 2-3 indexes per table.

Drops most of the indexes.

Loads the data

Recreates the indexes.

Things continue to work fine, until the database is shutdown (cia shutdown hook when the process terminates).

Then on startup we get the 'parent not found'.

If you have particular way, I can give the 162M zipped db that won't open.

Chris


Regards,
Thomas

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




--
C. Schanck

Thomas Mueller

unread,
Feb 26, 2010, 11:28:10 AM2/26/10
to h2-da...@googlegroups.com
Hi,

> If you have particular way, I can give the 162M zipped db that won't open.

Could you try again with todays release, version 1.2.130? If it still
doesn't work, could you send me the database please?

Regards,
Thomas

Oliver Meincke

unread,
Mar 1, 2010, 6:23:44 AM3/1/10
to H2 Database
Hi Thomas!

> I did find and fix a problem that could be related, but it's hard to
> tell if it's the same problem.
>

> The exception message says you are using version1.2.129, but you alsowrote you use version1.1.118. I guess the problem is only withversion1.2.129, right?

Sorry, I wanted to write: The database has been created with version
1.1.118, the exception is thrown when trying to open the converted db
with version 1.2.129.

I tried the same with the new version 1.2.130 and I get another
exception:

File corrupted while reading record: "Table not found:400 for ( /* key:
264 */ 263, 1, 400, 19373, 'OFF,0,,', '1') meta:{0=T0_DATA,
258=I258:258:org.h2.index.PageDelegateIndex@10a234, 257=T257_DATA,
260=T260_DATA, 261=I261:261:org.h2.index.PageDelegateIndex@93b59,
-1=PAGE_INDEX_DATA, 62=I62:62:org.h2.index.PageDelegateIndex@176ccc,
61=T61_DATA, 68=I68:68:org.h2.index.PageDelegateIndex@1e7f971,
70=T70_DATA, 71=I71:71:org.h2.index.PageDelegateIndex@a96fd2,
64=T64_DATA, 65=I65:65:org.h2.index.PageDelegateIndex@1ec59df,
67=T67_DATA, 76=T76_DATA, 77=I77:77:org.h2.index.PageBtreeIndex@6d98,
79=T79_DATA, 73=T73_DATA,
74=I74:74:org.h2.index.PageBtreeIndex@1b2cb9, 85=T85_DATA,
86=I86:86:org.h2.index.PageDelegateIndex@154ec5,
80=I80:80:org.h2.index.PageDelegateIndex@e67c12,
83=I83:83:org.h2.index.PageDelegateIndex@1db8962, 82=T82_DATA,
92=I92:92:org.h2.index.PageBtreeIndex@18a0a8,
95=I95:95:org.h2.index.PageBtreeIndex@db81f3, 94=T94_DATA,
89=I89:89:org.h2.index.PageDelegateIndex@130b682, 88=T88_DATA,
91=T91_DATA, 103=T103_DATA, 100=T100_DATA,
101=I101:101:org.h2.index.PageDelegateIndex@11e1aa5,
98=I98:98:org.h2.index.PageDelegateIndex@1677979, 97=T97_DATA,
110=I110:110:org.h2.index.PageDelegateIndex@581ea2, 109=T109_DATA,
106=T106_DATA, 107=I107:107:org.h2.index.PageDelegateIndex@14340bb,
104=I104:104:org.h2.index.PageDelegateIndex@4ef122,
119=I119:119:org.h2.index.PageDelegateIndex@b8f891, 118=T118_DATA,
116=I116:116:org.h2.index.PageDelegateIndex@1c7378f, 115=T115_DATA,
113=I113:113:org.h2.index.PageDelegateIndex@10b841, 112=T112_DATA,
127=T127_DATA, 125=I125:125:org.h2.index.PageDelegateIndex@1b0d235,
124=T124_DATA, 122=I122:122:org.h2.index.PageDelegateIndex@1b8cdd5,
121=T121_DATA, 137=I137:137:org.h2.index.PageDelegateIndex@1d1964d,
136=T136_DATA, 139=T139_DATA,
140=I140:140:org.h2.index.PageBtreeIndex@e2cf81,
143=I143:143:org.h2.index.PageDelegateIndex@a53e68, 142=T142_DATA,
128=I128:128:org.h2.index.PageDelegateIndex@a42c89,
131=I131:131:org.h2.index.PageDelegateIndex@67e92a, 130=T130_DATA,
133=T133_DATA, 134=I134:134:org.h2.index.PageDelegateIndex@1fccfe3,
152=T152_DATA, 153=I153:153:org.h2.index.PageDelegateIndex@b481ba,
155=T155_DATA, 156=I156:156:org.h2.index.PageDelegateIndex@b0f24a,
158=T158_DATA, 159=I159:159:org.h2.index.PageDelegateIndex@f2ff9b,
145=T145_DATA, 146=I146:146:org.h2.index.PageDelegateIndex@16b5518,
148=T148_DATA, 149=T149_DATA,
150=I150:150:org.h2.index.PageBtreeIndex@19fdafc,
171=I171:171:org.h2.index.PageDelegateIndex@1e1df6e, 170=T170_DATA,
168=I168:168:org.h2.index.PageBtreeIndex@13b9fb,
174=I174:174:org.h2.index.PageBtreeIndex@1171e30, 173=T173_DATA,
162=I162:162:org.h2.index.PageDelegateIndex@bf1a4a, 161=T161_DATA,
167=T167_DATA, 165=I165:165:org.h2.index.PageDelegateIndex@571cc4,
164=T164_DATA, 186=I186:186:org.h2.index.PageDelegateIndex@1219665,
185=T185_DATA, 191=T191_DATA, 188=T188_DATA,
189=I189:189:org.h2.index.PageBtreeIndex@18cecd, 179=T179_DATA,
176=T176_DATA, 177=I177:177:org.h2.index.PageDelegateIndex@b11287,
182=T182_DATA, 183=I183:183:org.h2.index.PageDelegateIndex@1377711,
180=I180:180:org.h2.index.PageDelegateIndex@6a00ca,
204=I204:204:org.h2.index.PageBtreeIndex@159f3f0,
207=I207:207:org.h2.index.PageBtreeIndex@9e4dc0, 206=T206_DATA,
201=I201:201:org.h2.index.PageBtreeIndex@102abdb, 200=T200_DATA,
203=T203_DATA, 197=T197_DATA,
198=I198:198:org.h2.index.PageBtreeIndex@60e277,
192=I192:192:org.h2.index.PageBtreeIndex@b40443,
195=I195:195:org.h2.index.PageBtreeIndex@83ce25, 194=T194_DATA,
221=T221_DATA, 222=I222:222:org.h2.index.PageBtreeIndex@152e9a8,
216=I216:216:org.h2.index.PageBtreeIndex@6a4268, 218=T218_DATA,
219=I219:219:org.h2.index.PageBtreeIndex@2de41d, 212=T212_DATA,
213=I213:213:org.h2.index.PageBtreeIndex@db4bcf, 215=T215_DATA,
209=T209_DATA, 210=I210:210:org.h2.index.PageBtreeIndex@14e1f2b,
239=T239_DATA, 237=I237:237:org.h2.index.PageBtreeIndex@1e07d3e,
236=T236_DATA, 234=I234:234:org.h2.index.PageBtreeIndex@13e86ec,
233=T233_DATA, 231=I231:231:org.h2.index.PageBtreeIndex@c199f,
230=T230_DATA, 228=I228:228:org.h2.index.PageBtreeIndex@6646fc,
227=T227_DATA, 225=I225:225:org.h2.index.PageBtreeIndex@be6858,
224=T224_DATA, 254=T254_DATA,
255=I255:255:org.h2.index.PageDelegateIndex@b471fe,
252=I252:252:org.h2.index.PageDelegateIndex@a7fdef, 251=T251_DATA,
248=T248_DATA, 249=I249:249:org.h2.index.PageDelegateIndex@11067af,
246=I246:246:org.h2.index.PageDelegateIndex@7348e, 245=T245_DATA,
242=T242_DATA, 243=I243:243:org.h2.index.PageDelegateIndex@10b8d03,
240=I240:240:org.h2.index.PageDelegateIndex@157011e}". Possible
solution: use the recovery tool [90030-130]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:
317)
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.message.DbException.get(DbException.java:145)
at org.h2.store.PageStore.addMeta(PageStore.java:1305)
at org.h2.store.PageStore.readMetaData(PageStore.java:1236)
at org.h2.store.PageStore.recover(PageStore.java:1045)
at org.h2.store.PageStore.openExisting(PageStore.java:301)
at org.h2.store.PageStore.open(PageStore.java:259)
at org.h2.engine.Database.getPageStore(Database.java:2005)


at org.h2.engine.Database.open(Database.java:524)
at org.h2.engine.Database.openDatabase(Database.java:200)

at org.h2.engine.Database.<init>(Database.java:195)
at org.h2.engine.Engine.openSession(Engine.java:56)

at org.h2.engine.Engine.openSession(Engine.java:141)


at org.h2.engine.Engine.getSession(Engine.java:120)
at org.h2.engine.Session.createSession(Session.java:119)
at
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:
236)
at org.h2.engine.SessionRemote.createSession(SessionRemote.java:214)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:111)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:95)
at org.h2.Driver.connect(Driver.java:58)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at
org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:
133)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:
446)
... 15 more

(Same scenario as above: Database created with version 1.1.118,
converted using version 1.1.127 and opened with version 1.1.130 -
exception thrown.)

Greetings,

Oliver

Thomas Mueller

unread,
Mar 1, 2010, 4:04:51 PM3/1/10
to h2-da...@googlegroups.com
Hi,

It looks like this is the same problem:

In versions 1.2.129 and 1.2.130, a database could not be opened
sometimes after dropping tables or indexes, and then creating new
indexes for existing tables. The exception contained the text "parent
not found" (version 1.2.129) or "Table not found" (version 1.2.130).

I will release a new version in a few days.

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages