[Solved] failed upgrade 2.2.3 to 2.2.4

Unimus support forum
Post Reply
petr
Posts: 8
Joined: Fri May 22, 2020 8:37 am

Thu Jul 28, 2022 9:11 am

Hi,

I tried to upgrade version 2.2.3 to 2.2.4 but database update failed:

Code: Select all

2022-07-28 10:51:28.557  INFO 711 --- [main] software.netcore.bootstrap.UnimusServer  : Starting UnimusServer v2.2.4 using Java 11.0.16 on ......... with PID 711 (/opt/unimus/Unimus.jar started by root in /opt/unimus)
2022-07-28 10:51:28.613  INFO 711 --- [main] software.netcore.bootstrap.UnimusServer  : The following profiles are active: unix,unimus-unix,jar,composite,unimus,core,LOCAL,PUBLIC
2022-07-28 10:52:43.788  INFO 711 --- [main] software.netcore.bootstrap.UnimusServer  : Started UnimusServer in 82.903 seconds (JVM running for 88.792)
2022-07-28 10:52:43.911  INFO 711 --- [multicaster-20] s.netcore.starter.AppStartTimeMonitor    : Application started in: 59.533 seconds
2022-07-28 10:52:44.867  INFO 711 --- [SimpleAsyncTaskExecutor-1] n.u.s.b.b.step.LoggingPathAccessibility  : Checking logging subsystem
2022-07-28 10:52:44.879  INFO 711 --- [SimpleAsyncTaskExecutor-1] n.u.s.b.b.step.DatabaseConnectionCheck   : Testing database connection
2022-07-28 10:52:45.844  INFO 711 --- [SimpleAsyncTaskExecutor-1] n.u.s.b.b.step.DatabaseConnectionCheck   : Database connection test passed
2022-07-28 10:52:45.845  INFO 711 --- [SimpleAsyncTaskExecutor-1] n.u.s.b.boot.step.DatabaseUpdate         : Connecting to database (MYSQL, jdbc:mysql://localhost:3306/unimus?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC)
2022-07-28 10:52:45.862  INFO 711 --- [SimpleAsyncTaskExecutor-1] n.u.s.b.boot.step.DatabaseUpdate         : Updating database schema
2022-07-28 10:53:47.094 ERROR 711 --- [SimpleAsyncTaskExecutor-1] n.u.s.b.boot.step.DatabaseUpdate         : Failed to update database schema. Reason = 'liquibase.exception.LockException: java.lang.ClassCastException: class java.time.LocalDateTime cannot be cast to class java.util.Date (java.time.LocalDateTime and java.util.Date are in module java.base of loader 'bootstrap')'
Is there a way to fix that?
Vik@Unimus
Posts: 158
Joined: Thu Aug 05, 2021 6:35 pm

Thu Jul 28, 2022 3:19 pm

Hello,

This specific issue is a DB lock. This can happen if a booting sequence is interrupted at a specific time frame when a DB schema is being updated. Fortunately, it can be easily unlocked manually:

1. Stop Unimus:

Code: Select all

systemctl stop unimus
2. Unlock the DB using this query directly in MySQL

Code: Select all

update DATABASECHANGELOGLOCK set locked = false;
or directly from a system CLI

Code: Select all

mysql --database='unimus' --execute 'update DATABASECHANGELOGLOCK set locked = false;'
you can just run it, I filled your Unimus DB name in it already.

3. Restart Unimus

Code: Select all

systemctl restart unimus
petr
Posts: 8
Joined: Fri May 22, 2020 8:37 am

Thu Jul 28, 2022 3:43 pm

Hi,

yes that fixed the issue. Thanks for the help.
Post Reply