Getting acom.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.getExecutedScripts(DbUpdaterEngine.java:311) ~[cuba-core-6.7.4.jar:6.7.4] exception

getting this exception just after changing the database to a cloned one, knowing that the table mentioned in the exception does exist in the new database.


15:26:10.210 INFO  c.h.cuba.core.sys.MetadataImpl - Initializing metadata
15:26:10.369 INFO  c.h.cuba.core.sys.MetadataImpl - Metadata initialized in 158ms
15:26:21.210 ERROR c.h.c.c.s.AbstractWebAppContextLoader - Error initializing application
java.lang.RuntimeException:
=================================================
ERROR: Database update failed. See details below.
=================================================
Error loading executed scripts
        at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.getExecutedScripts(DbUpdaterEngine.java:311) ~[cuba-core-6.7.4.jar:6.7.4]
        at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.findUpdateDatabaseScripts(DbUpdaterEngine.java:105) ~[cuba-core-6.7.4.jar:6.7.4]
        at com.haulmont.cuba.core.sys.AppContextLoader.checkDatabase(AppContextLoader.java:134) ~[cuba-core-6.7.4.jar:6.7.4]
        at com.haulmont.cuba.core.sys.AppContextLoader.afterInitAppContext(AppContextLoader.java:109) ~[cuba-core-6.7.4.jar:6.7.4]
        at com.haulmont.cuba.core.sys.AbstractWebAppContextLoader.contextInitialized(AbstractWebAppContextLoader.java:73) ~[cuba-global-6.7.4.jar:6.7.4]
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207) [catalina.jar:8.5.21]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.5.21]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) [catalina.jar:8.5.21]
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) [catalina.jar:8.5.21]
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) [catalina.jar:8.5.21]
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1144) [catalina.jar:8.5.21]
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1878) [catalina.jar:8.5.21]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_202]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_202]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_202]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_202]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_202]
Caused by: java.sql.SQLException: Invalid object name 'SYS_DB_CHANGELOG'. Query: select SCRIPT_NAME from SYS_DB_CHANGELOG Parameters: []
        at com.haulmont.bali.db.QueryRunner.rethrow(QueryRunner.java:462) ~[cuba-global-6.7.4.jar:6.7.4]
        at com.haulmont.bali.db.QueryRunner.query(QueryRunner.java:320) ~[cuba-global-6.7.4.jar:6.7.4]
        at com.haulmont.bali.db.QueryRunner.query(QueryRunner.java:411) ~[cuba-global-6.7.4.jar:6.7.4]
        at com.haulmont.bali.db.QueryRunner.query(QueryRunner.java:386) ~[cuba-global-6.7.4.jar:6.7.4]
        at com.haulmont.bali.db.QueryRunner.query(QueryRunner.java:430) ~[cuba-global-6.7.4.jar:6.7.4]
        at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.getExecutedScripts(DbUpdaterEngine.java:300) ~[cuba-core-6.7.4.jar:6.7.4]
        ... 17 common frames omitted
15:26:26.636 INFO  c.h.c.c.s.CubaCoreApplicationContext - Closing com.haulmont.cuba.core.sys.CubaCoreApplicationContext@4bf6d5d4: startup date [Sun May 21 15:26:05 EET 2023]; root of context hierarchy
15:26:26.637 INFO  c.h.c.c.s.CubaThreadPoolTaskScheduler - Shutting down ExecutorService 'scheduler'
May 21, 2023 3:26:26 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
May 21, 2023 3:26:26 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/app-core] startup failed due to previous errors

Hi,
Maybe the user you are connecting with, doesn’t have the access to this table, or the table belongs to another schema.

Thanks, yes the user was the mistake, I was carelessly using other database login and it didn’t have access to this table.