0
Under review

corrupted databse in V3

Tomas Platero 3 months ago updated 3 months ago 5

I have UBooquity 3 running during 5 or 6 days and after restart the machine i have this problem. Could you how can i recover the database?


6 19:46:50 [main] INFO com.ubooquity.Ubooquity - Running with the following parameters - headless: true, libraryport: -1, adminport: -1, remoteadmin: true, host: null, execdir: G:\Ubooquity 3
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - #############################
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - # Starting Ubooquity #
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - #############################
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - Java version: 17.0.11
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - Java vendor: Oracle Corporation
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - java vm name: Java HotSpot(TM) 64-Bit Server VM
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - java runtime name: Java(TM) SE Runtime Environment
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - Max heap size available: 8176 MB
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - OS name: Windows 11
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - OS version: 10.0
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - OS architecture: amd64
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - Loading local version info
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - Ubooquity 3.0.1 built on 2023-10-15 at 17:52
20240606 19:46:50 [main] INFO com.ubooquity.Ubooquity - Creating application folders
20240606 19:46:50 [main] INFO c.u.pref.PreferencesRepository - Loading preferences...
20240606 19:46:51 [main] ERROR com.ubooquity.a.a.b - Cound not get number of existing tables
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Archivo corrupto mientras se le�a el registro: "G:/Ubooquity 3/ubooquity-6.mv.db". Soluci�n Posible: use la herramienta de recuperaci�n (recovery tool)
File corrupted while reading record: "G:/Ubooquity 3/ubooquity-6.mv.db". Possible solution: use the recovery tool [90030-222]

at org.h2.message.DbException.getJdbcSQLException(DbException.java:690)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
at org.h2.message.DbException.get(DbException.java:212)
at org.h2.mvstore.db.Store.convertMVStoreException(Store.java:163)
at org.h2.mvstore.db.Store.(Store.java:142)
at org.h2.engine.Database.(Database.java:326)
at org.h2.engine.Engine.openSession(Engine.java:92)
at org.h2.engine.Engine.openSession(Engine.java:222)
at org.h2.engine.Engine.createSession(Engine.java:201)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343)
at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125)
at org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:322)
at org.h2.jdbcx.JdbcDataSource.getPooledConnection(JdbcDataSource.java:352)
at org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(JdbcConnectionPool.java:233)
at org.h2.jdbcx.JdbcConnectionPool.getConnection(JdbcConnectionPool.java:198)
at com.ubooquity.a.a.b.g(SourceFile:123)
at com.ubooquity.a.a.b.(SourceFile:49)
at com.ubooquity.Ubooquity.main(SourceFile:188)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.ubooquity.e.a.a(SourceFile:818)
at com.ubooquity.Launcher.main(SourceFile:10)
Caused by: org.h2.mvstore.MVStoreException: File is corrupted - unable to recover a valid set of chunks [2.2.222/6]
at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996)
at org.h2.mvstore.RandomAccessStore.readStoreHeader(RandomAccessStore.java:320)
at org.h2.mvstore.FileStore.start(FileStore.java:916)
at org.h2.mvstore.MVStore.(MVStore.java:289)
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035)
at org.h2.mvstore.db.Store.(Store.java:133)
... 19 common frames omitted
6 19:46:52 [main] ERROR com.ubooquity.a.a.b - Could not configure collation strength
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Archivo corrupto mientras se le�a el registro: "G:/Ubooquity 3/ubooquity-6.mv.db". Soluci�n Posible: use la herramienta de recuperaci�n (recovery tool)
File corrupted while reading record: "G:/Ubooquity 3/ubooquity-6.mv.db". Possible solution: use the recovery tool [90030-222]

at org.h2.message.DbException.getJdbcSQLException(DbException.java:690)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
at org.h2.message.DbException.get(DbException.java:212)
at org.h2.mvstore.db.Store.convertMVStoreException(Store.java:163)
at org.h2.mvstore.db.Store.(Store.java:142)
at org.h2.engine.Database.(Database.java:326)
at org.h2.engine.Engine.openSession(Engine.java:92)
at org.h2.engine.Engine.openSession(Engine.java:222)
at org.h2.engine.Engine.createSession(Engine.java:201)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343)
at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125)
at org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:322)
at org.h2.jdbcx.JdbcDataSource.getPooledConnection(JdbcDataSource.java:352)
at org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(JdbcConnectionPool.java:233)
at org.h2.jdbcx.JdbcConnectionPool.getConnection(JdbcConnectionPool.java:198)
at com.ubooquity.a.a.b.h(SourceFile:146)
at com.ubooquity.a.a.b.(SourceFile:50)
at com.ubooquity.Ubooquity.main(SourceFile:188)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.ubooquity.e.a.a(SourceFile:818)
at com.ubooquity.Launcher.main(SourceFile:10)
Caused by: org.h2.mvstore.MVStoreException: File is corrupted - unable to recover a valid set of chunks [2.2.222/6]
at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996)
at org.h2.mvstore.RandomAccessStore.readStoreHeader(RandomAccessStore.java:320)
at org.h2.mvstore.FileStore.start(FileStore.java:916)
at org.h2.mvstore.MVStore.(MVStore.java:289)
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035)
at org.h2.mvstore.db.Store.(Store.java:133)
... 19 common frames omitted
6 19:46:52 [main] ERROR com.ubooquity.Ubooquity - Exiting application because of exception
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Archivo corrupto mientras se le�a el registro: "G:/Ubooquity 3/ubooquity-6.mv.db". Soluci�n Posible: use la herramienta de recuperaci�n (recovery tool)
File corrupted while reading record: "G:/Ubooquity 3/ubooquity-6.mv.db". Possible solution: use the recovery tool [90030-222]

at org.h2.message.DbException.getJdbcSQLException(DbException.java:690)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
at org.h2.message.DbException.get(DbException.java:212)
at org.h2.mvstore.db.Store.convertMVStoreException(Store.java:163)
at org.h2.mvstore.db.Store.(Store.java:142)
at org.h2.engine.Database.(Database.java:326)
at org.h2.engine.Engine.openSession(Engine.java:92)
at org.h2.engine.Engine.openSession(Engine.java:222)
at org.h2.engine.Engine.createSession(Engine.java:201)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:343)
at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:125)
at org.h2.jdbcx.JdbcDataSource.getXAConnection(JdbcDataSource.java:322)
at org.h2.jdbcx.JdbcDataSource.getPooledConnection(JdbcDataSource.java:352)
at org.h2.jdbcx.JdbcConnectionPool.getConnectionNow(JdbcConnectionPool.java:233)
at org.h2.jdbcx.JdbcConnectionPool.getConnection(JdbcConnectionPool.java:198)
at com.ubooquity.a.a.a.b.b(SourceFile:50)
at com.ubooquity.a.a.e.g(SourceFile:162)
at com.ubooquity.a.a.b.(SourceFile:59)
at com.ubooquity.Ubooquity.main(SourceFile:188)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.ubooquity.e.a.a(SourceFile:818)
at com.ubooquity.Launcher.main(SourceFile:10)
Caused by: org.h2.mvstore.MVStoreException: File is corrupted - unable to recover a valid set of chunks [2.2.222/6]
at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996)
at org.h2.mvstore.RandomAccessStore.readStoreHeader(RandomAccessStore.java:320)
at org.h2.mvstore.FileStore.start(FileStore.java:916)
at org.h2.mvstore.MVStore.(MVStore.java:289)
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2035)
at org.h2.mvstore.db.Store.(Store.java:133)
... 20 common frames omitted 

Under review

This message comes directly from the database (H2) used inside Ubooquity. 

I didn't know such a tool existed, but I found the part of H2 documentation that explains how to use it:

https://www.h2database.com/html/advanced.html#using_recover_tool


I did not try it though.

I came here to post that very question. I will give the tool a shot thank you.


In my case the corruption was caused by my pc shutting down abnormally, which it has been doing frequently recently. Not due to this software, but usb port/bluetooth issues.


However I have noticed that compared to v2 the db seems a lot less forgiving of sudden windows shutdowns. It only happened twice on v2 in the 4 years I was running it, but has happened 6 time since v3 was released.

V3 uses a much more recent version of H2 than Ubooquity V2.

So changes in behaviour and reliability are possible, although I would have expected improvements instead of a decline in reliabilty.

In any case, abrupt shutdown can corrupt just about any file, I lost a Windows installation this way once (probably some system file that didn't survive the crash).

Apart from pluging the PC to a UPS, the easiest solution is probably a backup. Either part of a global backup policy (a good thing to have anyway), or just by lauching Ubooquity with a script that would make a copy of the database file each time Ubooquity is launched.

I agree you would think it would be more reliable maybe it just a matter of bad timing on my system when the crashes occured. Yeah, I have just created a script to backup the database once a day.

Could you share this script?