Database issue?
-
I see the following errors in mycontroller.log and mycontroller process appears to be down:
2017-03-31 22:17:47,223 INFO [main] [org.mycontroller.standalone.db.DataBaseUtils:116] Checking migration... 2017-03-31 22:17:47,999 ERROR [main] [org.mycontroller.standalone.db.DataBaseUtils:119] Migration exception, org.flywaydb.core.internal.dbsupport.FlywaySqlException: Unable to obtain Jdbc connection from DataSource (jdbc:h2:file:../conf/mycontroller;MVCC=TRUE) for user 'mycontroller': General error: "java.lang.ArrayIndexOutOfBoundsException: 2048" [50000-193] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- SQL State : HY000 Error Code : 50000 Message : General error: "java.lang.ArrayIndexOutOfBoundsException: 2048" [50000-193] at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:396) at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnection(DriverDataSource.java:358) at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:51) at org.flywaydb.core.Flyway.execute(Flyway.java:1367) at org.flywaydb.core.Flyway.migrate(Flyway.java:930) at org.mycontroller.standalone.db.DataBaseUtils.runDatabaseMigration(DataBaseUtils.java:117) at org.mycontroller.standalone.StartApp.startServices(StartApp.java:251) at org.mycontroller.standalone.StartApp.startMycontroller(StartApp.java:108) at org.mycontroller.standalone.StartApp.main(StartApp.java:95) Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.ArrayIndexOutOfBoundsException: 2048" [50000-193] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:168) at org.h2.message.DbException.convert(DbException.java:295) at org.h2.engine.Database.openDatabase(Database.java:304) at org.h2.engine.Database.<init>(Database.java:267) at org.h2.engine.Engine.openSession(Engine.java:64) at org.h2.engine.Engine.openSession(Engine.java:176) at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) at org.h2.engine.Engine.createSession(Engine.java:137) at org.h2.engine.Engine.createSession(Engine.java:27) at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:349) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:115) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:99) at org.h2.Driver.connect(Driver.java:69) at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:393) ... 8 common frames omitted Caused by: java.lang.ArrayIndexOutOfBoundsException: 2048 at org.h2.store.Data.readInt(Data.java:160) at org.h2.index.PageDataNode.read(PageDataNode.java:105) at org.h2.index.PageDataNode.read(PageDataNode.java:84) at org.h2.store.PageStore.getPage(PageStore.java:799) at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:232) at org.h2.index.PageDataIndex.<init>(PageDataIndex.java:85) at org.h2.table.RegularTable.<init>(RegularTable.java:83) at org.h2.store.PageStore.addMeta(PageStore.java:1696) at org.h2.store.PageStore.readMetaData(PageStore.java:1627) at org.h2.store.PageStore.recover(PageStore.java:1405) at org.h2.store.PageStore.openExisting(PageStore.java:367) at org.h2.store.PageStore.open(PageStore.java:288) at org.h2.engine.Database.getPageStore(Database.java:2482) at org.h2.engine.Database.open(Database.java:695) at org.h2.engine.Database.openDatabase(Database.java:273) ... 19 common frames omitted 2017-03-31 22:17:48,095 ERROR [main] [org.mycontroller.standalone.db.DataBaseUtils:132] Unable to close flyway connection org.flywaydb.core.internal.dbsupport.FlywaySqlException: Unable to obtain Jdbc connection from DataSource (jdbc:h2:file:../conf/mycontroller;MVCC=TRUE) for user 'mycontroller': General error: "java.lang.ArrayIndexOutOfBoundsException: 2048" [50000-193] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- SQL State : HY000 Error Code : 50000 Message : General error: "java.lang.ArrayIndexOutOfBoundsException: 2048" [50000-193] at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:396) at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnection(DriverDataSource.java:358) at org.mycontroller.standalone.db.DataBaseUtils.runDatabaseMigration(DataBaseUtils.java:127) at org.mycontroller.standalone.StartApp.startServices(StartApp.java:251) at org.mycontroller.standalone.StartApp.startMycontroller(StartApp.java:108) at org.mycontroller.standalone.StartApp.main(StartApp.java:95) Caused by: org.h2.jdbc.JdbcSQLException: General error: "java.lang.ArrayIndexOutOfBoundsException: 2048" [50000-193] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:168) at org.h2.message.DbException.convert(DbException.java:295) at org.h2.engine.Database.openDatabase(Database.java:304) at org.h2.engine.Database.<init>(Database.java:267) at org.h2.engine.Engine.openSession(Engine.java:64) at org.h2.engine.Engine.openSession(Engine.java:176) at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) at org.h2.engine.Engine.createSession(Engine.java:137) at org.h2.engine.Engine.createSession(Engine.java:27) at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:349) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:115) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:99) at org.h2.Driver.connect(Driver.java:69) at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:393) ... 5 common frames omitted Caused by: java.lang.ArrayIndexOutOfBoundsException: 2048 at org.h2.store.Data.readInt(Data.java:160) at org.h2.index.PageDataNode.read(PageDataNode.java:105) at org.h2.index.PageDataNode.read(PageDataNode.java:84) at org.h2.store.PageStore.getPage(PageStore.java:799) at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:232) at org.h2.index.PageDataIndex.<init>(PageDataIndex.java:85) at org.h2.table.RegularTable.<init>(RegularTable.java:83) at org.h2.store.PageStore.addMeta(PageStore.java:1696) at org.h2.store.PageStore.readMetaData(PageStore.java:1627) at org.h2.store.PageStore.recover(PageStore.java:1405) at org.h2.store.PageStore.openExisting(PageStore.java:367) at org.h2.store.PageStore.open(PageStore.java:288) at org.h2.engine.Database.getPageStore(Database.java:2482) at org.h2.engine.Database.open(Database.java:695) at org.h2.engine.Database.openDatabase(Database.java:273) ... 16 common frames omitted 2017-03-31 22:17:48,568 ERROR [main] [org.mycontroller.standalone.db.DaoUtils:198] Unable to load Dao, org.h2.jdbc.JdbcSQLException: General error: "java.lang.ArrayIndexOutOfBoundsException: 2048" [50000-193] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:168) at org.h2.message.DbException.convert(DbException.java:295) at org.h2.engine.Database.openDatabase(Database.java:304) at org.h2.engine.Database.<init>(Database.java:267) at org.h2.engine.Engine.openSession(Engine.java:64) at org.h2.engine.Engine.openSession(Engine.java:176) at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154) at org.h2.engine.Engine.createSession(Engine.java:137) at org.h2.engine.Engine.createSession(Engine.java:27) at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:349) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:115) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:99) at org.h2.Driver.connect(Driver.java:69) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:208) at com.j256.ormlite.jdbc.JdbcConnectionSource.makeConnection(JdbcConnectionSource.java:266) at com.j256.ormlite.jdbc.JdbcPooledConnectionSource.getReadWriteConnection(JdbcPooledConnectionSource.java:140) at com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:397) at com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:383) at com.j256.ormlite.table.TableUtils.createTableIfNotExists(TableUtils.java:75) at org.mycontroller.standalone.db.dao.BaseAbstractDaoImpl.<init>(BaseAbstractDaoImpl.java:65) at org.mycontroller.standalone.db.dao.ExternalServerDaoImpl.<init>(ExternalServerDaoImpl.java:38) at org.mycontroller.standalone.db.DaoUtils.loadAllDao(DaoUtils.java:157) at org.mycontroller.standalone.db.DataBaseUtils.runDatabaseMigration(DataBaseUtils.java:136) at org.mycontroller.standalone.StartApp.startServices(StartApp.java:251) at org.mycontroller.standalone.StartApp.startMycontroller(StartApp.java:108) at org.mycontroller.standalone.StartApp.main(StartApp.java:95) Caused by: java.lang.ArrayIndexOutOfBoundsException: 2048 at org.h2.store.Data.readInt(Data.java:160) at org.h2.index.PageDataNode.read(PageDataNode.java:105) at org.h2.index.PageDataNode.read(PageDataNode.java:84) at org.h2.store.PageStore.getPage(PageStore.java:799) at org.h2.index.PageDataIndex.getPage(PageDataIndex.java:232) at org.h2.index.PageDataIndex.<init>(PageDataIndex.java:85) at org.h2.table.RegularTable.<init>(RegularTable.java:83) at org.h2.store.PageStore.addMeta(PageStore.java:1696) at org.h2.store.PageStore.readMetaData(PageStore.java:1627) at org.h2.store.PageStore.recover(PageStore.java:1405) at org.h2.store.PageStore.openExisting(PageStore.java:367) at org.h2.store.PageStore.open(PageStore.java:288) at org.h2.engine.Database.getPageStore(Database.java:2482) at org.h2.engine.Database.open(Database.java:695) at org.h2.engine.Database.openDatabase(Database.java:273) ... 24 common frames omitted 2017-03-31 22:17:49,136 ERROR [main] [org.mycontroller.standalone.StartApp:97] Unable to start application, refer error log, java.lang.NullPointerException: null at org.mycontroller.standalone.settings.SettingsUtils.getValue(SettingsUtils.java:57) at org.mycontroller.standalone.settings.SettingsUtils.getValue(SettingsUtils.java:62) at org.mycontroller.standalone.settings.LocationSettings.getValue(LocationSettings.java:72) at org.mycontroller.standalone.settings.LocationSettings.get(LocationSettings.java:57) at org.mycontroller.standalone.AppProperties.loadPropertiesFromDb(AppProperties.java:520) at org.mycontroller.standalone.db.DataBaseUtils.runDatabaseMigration(DataBaseUtils.java:141) at org.mycontroller.standalone.StartApp.startServices(StartApp.java:251) at org.mycontroller.standalone.StartApp.startMycontroller(StartApp.java:108) at org.mycontroller.standalone.StartApp.main(StartApp.java:95) Exception in thread "MyController.org Shutdown-Hook" java.lang.NullPointerException at Acme.Serve.Serve.stopBackground(Serve.java:684) at org.jboss.resteasy.plugins.server.tjws.TJWSServletServer.stop(TJWSServletServer.java:184) at org.mycontroller.standalone.StartApp.stopHTTPWebServer(StartApp.java:222) at org.mycontroller.standalone.StartApp.stopServices(StartApp.java:303) at org.mycontroller.standalone.AppShutdownHook$1.run(AppShutdownHook.java:34)
-
@benya When it was happened? Do you try to upgrade from previous version?
-
@jkandasa I upgraded a while ago when you fixed another DB error.
New error appeared with no particular reason.
Should I restore DB from backup? -
@benya Yes, please try with backup. I do not get any clue now.
-
@jkandasa How could I wipe out database?
-
- Remove old database
- Start MyController
- Restore your backup file
- Start MyController