Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Database version not supported by Proxy (ASYNC and HOT-FOLDER modes)

This article describes why the error “The write format 1 is smaller than the supported format 2” happens and its respective solution hint.

Problem description

Due to a database incompatibility between the older proxy images versions and the new ones, it is required to update the database version when updating the proxy image.

Proxy versions later than v1.8+b92 are not affected by this issue.

After updating the proxy image and then starting in ASYNC or HOT-FOLDER mode, the database may have operations in pending execution status, which are listed in the error thrown by proxy:

Exception in thread "main" org.h2.jdbc.JdbcSQLNonTransientException: General error: "The write format 1 is smaller than the supported format 2 [2.0.202/5]" [50000-202]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:554)
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:477)
        at org.h2.message.DbException.get(DbException.java:212)
        at org.h2.mvstore.db.Store.convertMVStoreException(Store.java:166)
        at org.h2.mvstore.db.Store.<init>(Store.java:140)
        at org.h2.engine.Database.<init>(Database.java:325)
        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:342)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:117)
        at org.h2.util.JdbcUtils.getConnection(JdbcUtils.java:287)
        at org.h2.util.JdbcUtils.getConnection(JdbcUtils.java:270)
        at org.h2.tools.RunScript.process(RunScript.java:320)
        at org.h2.tools.RunScript.runTool(RunScript.java:144)
        at org.h2.tools.RunScript.main(RunScript.java:71)
Caused by: org.h2.mvstore.MVStoreException: The write format 1 is smaller than the supported format 2 [2.0.202/5]
        at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1004)
        at org.h2.mvstore.MVStore.getUnsupportedWriteFormatException(MVStore.java:1059)
        at org.h2.mvstore.MVStore.readStoreHeader(MVStore.java:878)
        at org.h2.mvstore.MVStore.<init>(MVStore.java:455)
        at org.h2.mvstore.MVStore$Builder.open(MVStore.java:4052)
        at org.h2.mvstore.db.Store.<init>(Store.java:129)
        ... 11 more
>> Database has an older version (1.4.197). Will validate if exist operations pending execution...
There are operations pending execution with the following external references:
Ext_Ref_710ae8b4-3607-4246-86ed-0800fe96fb30
Ext_Ref_8704dc7f-94fa-4745-83c1-473a7e367c41
Ext_Ref_cd4cc5cc-2ffd-4a08-a856-bce31ee5f715
Ext_Ref_9c8824e5-23f7-4e6f-b70f-69db4725ca68
Ext_Ref_a8b8df05-7250-41e6-9e2b-c2b47aab3555

However, if no pending operations exist, the proxy will automatically update the database version by deleting the current database and recreating a new one with the latest version.

Solution

To solve this error and update the database version, you can follow one of the following approaches.

  1. Wait until the proxy instance with the old docker image finishes the pending operations and then start the proxy with the new docker image. Since no operations will be pending, the proxy can recreate successfully the database with the new version.

  2. Force deleting the old database file (with or without pending data) using the parameter force.database.recreate on the docker run container. Then, you can run again without this parameter and request new operations with the documents not processed.

    1. Note, you can use the new image version for this step.

    2. Example:

      docker run -d --mount source=vol1,target=/tmp --mount type=bind,source=C:/tmp,target=/home -p 8086:8080 --memory=4g teammust/einvoice:integration-client-ws-eeeb1c66db7fc864d4203c3e857b095f29a7a2e6-87 --server.host.port=127.0.0.1:8086 --einvoice-integration-client.service.domain=https://test.must.digital/ --force.database.recreate=TRUE

It is only necessary to run the docker container with this parameter one single time for database recreation to take effect. For the next subsequent executions, you must remove the parameter.

  • No labels