An older H2 jar cannot open a database file made by H2 2.2 or newer
Your error
org.h2.mvstore.MVStoreException: The write format 3 is larger than the supported format 2 [2.1.214/5]2 more lines it can showFix it fast
Most common cause, 1 of 2A database tool ships its own H2 2.1 driver
Point the tool's driver setting at the same h2 jar version the application uses, from Maven Central.
# the H2 Shell from the matching jar is a quick independent check
java -cp h2-2.5.252.jar org.h2.tools.Shell -url jdbc:h2:./data/app -user sa -sql "SELECT H2VERSION()"Short answer
H2 throws The write format 3 is larger than the supported format 2 when an H2 2.0.202 to 2.1.214 jar opens a .mv.db file written by H2 2.2.220 or later. The version in brackets, such as [2.1.214/5], names the old jar. Give the IDE, console or app the same H2 2.2+ jar, for example 2.5.252.
Which cause do you have?
Compare two numbers: the format the file was written with and the H2 version that threw the error. The .mv.db file starts with a plain-text header, and the error ends with the throwing jar's version before the slash.
head -c 160 ./data/app.mv.db; echo
# look for format:3 in the header, then note the version in the error, e.g. [2.1.214/5]Then find the line you see in this list and open its fix:
- 1A database tool ships its own H2 2.1 driver
The application starts and reads the file, but the IDE data source, DBeaver connection or a separate H2 Console fails with [2.1.214/5] or an older version in brackets - 2The application resolves an older H2 than the one that created the file
The application itself fails at startup with the message, often after the file was copied from another project or rebuilt with a newer H2 Console
What does the error look like?
org.h2.mvstore.MVStoreException: The write format 3 is larger than the supported format 2 [2.1.214/5]General error: The write format 3 is larger than the supported format 2The read format 3 is larger than the supported format 2 [2.1.214/5]
Cause 1 of 2
A database tool ships its own H2 2.1 driver
You seeThe application starts and reads the file, but the IDE data source, DBeaver connection or a separate H2 Console fails with [2.1.214/5] or an older version in brackets
Check
The H2 project raised the database format version for 2.2.220 so files from 2.0 and 2.1 could be told apart, because the two sides had incompatibilities in both MVStore and metadata. A tool whose driver is still 2.1.214 therefore stops at the header of any file your newer app wrote, and says so with this write format message.
# the version the tool used is printed in the error suffix:
# ... supported format 2 [2.1.214/5] -> H2 2.1.214Fix
Point the tool's driver setting at the same h2 jar version the application uses, from Maven Central. In most database tools this is the driver or library list on the connection; remove the bundled 2.1.x jar and add the newer one.
# the H2 Shell from the matching jar is a quick independent check
java -cp h2-2.5.252.jar org.h2.tools.Shell -url jdbc:h2:./data/app -user sa -sql "SELECT H2VERSION()"Verify
The tool connects and SELECT H2VERSION() returns the same version as the application's jar.
SELECT H2VERSION();Confirmed by github.com
Cause 2 of 2
The application resolves an older H2 than the one that created the file
You seeThe application itself fails at startup with the message, often after the file was copied from another project or rebuilt with a newer H2 Console
Check
Only releases from 2.2.220 onward read format 3, as the changelog entry Increase database format version shows. If a parent POM, a BOM or a transitive dependency pins h2 at 2.1.214 or earlier, the app is now the old reader. Print the version Maven actually picked.
mvn dependency:tree -Dincludes=com.h2database:h2Fix
Set an explicit h2 version of 2.2.220 or newer in the build, so the resolved jar matches the file. Rebuild and run the app again.
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.5.252</version>
</dependency>Verify
dependency:tree shows com.h2database:h2:jar:2.5.252, and the app opens the database without the format error.
mvn dependency:tree -Dincludes=com.h2database:h2Confirmed by h2database.com
How do I stop it coming back?
- Pin the h2 version in one place in the build and copy that same jar into every IDE or console data source used on the project.
- Do not open a shared .mv.db file with a tool whose H2 version you have not checked; open a copy instead.
- Move data between H2 versions with SCRIPT and RUNSCRIPT, not by copying .mv.db files between projects.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.