Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-32039

Revert H2 upgrade to 2.2.220

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2023.2, 2021.43
    • Component/s: H2
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #95
    • Story Points:
      1

      Description

      The H2 upgrade to 2.2.220 is a breaking change as the previous H2 data can not be read by Nuxeo.

      When upgrading Nuxeo with this H2 upgrade we get the following exception:

      2023-08-26T14:47:26,672 WARN  [SettingsFactory] Could not obtain connection to query metadata
      java.sql.SQLException: Cannot create PoolableConnectionFactory (Unsupported database file version or invalid file header in file "/var/lib/nuxeo/h2/nuxeo.mv.db" [90048-220])
              at org.apache.commons.dbcp2.managed.BasicManagedDataSource.createPoolableConnectionFactory(BasicManagedDataSource.java:252) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:534) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:734) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              at org.nuxeo.ecm.core.persistence.NuxeoConnectionProvider.getConnection(NuxeoConnectionProvider.java:54) ~[nuxeo-core-persistence-2021.43-SNAPSHOT.jar:?]
      
      ...
      Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Unsupported database file version or invalid file header in file "/var/lib/nuxeo/h2/nuxeo.mv.db" [90048-220]
              at org.h2.message.DbException.getJdbcSQLException(DbException.java:690) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.message.DbException.get(DbException.java:212) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.mvstore.db.Store.convertMVStoreException(Store.java:158) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.mvstore.db.Store.<init>(Store.java:142) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.engine.Database.<init>(Database.java:324) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.engine.Engine.openSession(Engine.java:92) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.engine.Engine.openSession(Engine.java:222) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.engine.Engine.createSession(Engine.java:201) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:338) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:122) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.Driver.connect(Driver.java:59) ~[h2-2.2.220.jar:2.2.220]
              at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              at org.apache.commons.dbcp2.managed.LocalXAConnectionFactory.createConnection(LocalXAConnectionFactory.java:346) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              at org.apache.commons.dbcp2.managed.PoolableManagedConnectionFactory.makeObject(PoolableManagedConnectionFactory.java:75) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:103) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              at org.apache.commons.dbcp2.managed.BasicManagedDataSource.createPoolableConnectionFactory(BasicManagedDataSource.java:248) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              ... 72 more
      Caused by: org.h2.mvstore.MVStoreException: The write format 2 is smaller than the supported format 3 [2.2.220/5]
              at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:996) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.mvstore.FileStore.getUnsupportedWriteFormatException(FileStore.java:944) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.mvstore.FileStore.processCommonHeaderAttributes(FileStore.java:547) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.mvstore.RandomAccessStore.readStoreHeader(RandomAccessStore.java:227) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.mvstore.FileStore.start(FileStore.java:917) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.mvstore.MVStore.<init>(MVStore.java:289) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2036) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.mvstore.db.Store.<init>(Store.java:133) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.engine.Database.<init>(Database.java:324) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.engine.Engine.openSession(Engine.java:92) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.engine.Engine.openSession(Engine.java:222) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.engine.Engine.createSession(Engine.java:201) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:338) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:122) ~[h2-2.2.220.jar:2.2.220]
              at org.h2.Driver.connect(Driver.java:59) ~[h2-2.2.220.jar:2.2.220]
              at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              at org.apache.commons.dbcp2.managed.LocalXAConnectionFactory.createConnection(LocalXAConnectionFactory.java:346) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              at org.apache.commons.dbcp2.managed.PoolableManagedConnectionFactory.makeObject(PoolableManagedConnectionFactory.java:75) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:103) ~[commons-dbcp2-2.8.0.jar:2.8.0]
              at org.apache.commons.dbcp2.managed.BasicManagedDataSource.createPoolableConnectionFactory(BasicManagedDataSource.java:248) ~[commons-dbcp2-2.8.0.jar:2.8.0]
      

      Since the upgrade was done by dependabot, we may want to ignore this version in order to not receive the upgrade again.

      Note that this happens when upgrading any existing instance (even with mongo backend)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: