DEVTEST 10.6- IAM Service is not starting with MySQL 5.7 : Exception invoking method [listUnrunChangeSets] on object [liquibase.Liquibase
search cancel

DEVTEST 10.6- IAM Service is not starting with MySQL 5.7 : Exception invoking method [listUnrunChangeSets] on object [liquibase.Liquibase

book

Article ID: 220534

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

Hello ! 

 

My IAM service is not starting anymore . The problem is only seen after restarting the service. Upon the initial start of the IAM Service, the service is able to start and build out the tables. However, if the service is stopped and restarted, we see the error:

I have configured IAM with  MySQL 5.7.33 on a GCP environment. 

mysql-connector-java-8.0.25.jar  was used. 

Here is the content of my log file 

 

[root@srv-cadevtestduq01 log]# cat server.log
2021-07-22 15:53:48,680 INFO  [org.jboss.modules] (main) JBoss Modules version 1.6.1.Final
2021-07-22 15:53:48,738 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.7.SP1
2021-07-22 15:53:48,854 INFO  [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: Keycloak 3.4.3.Final (WildFly Core 3.0.8.Final) starting
2021-07-22 15:53:48,855 DEBUG [org.jboss.as.config] (MSC service thread 1-8) Configured system properties:
        awt.toolkit = sun.awt.X11.XToolkit
        com.ibm.jsse2.overrideDefaultTLS = true
        file.encoding = UTF-8
        file.encoding.pkg = sun.io
        file.separator = /
        iam.db.jdbc.driver.path = /opt/mysql-connector/mysql-connector-java-8.0.25.jar
        iam.db.vendor = mysql
        iam.keystore = /opt/CA/DevTest/IdentityAccessManager/certs/webreckeys.ks
        iam.keystore.password = <redacted>
        iam.truststore = /opt/CA/DevTest/IdentityAccessManager/certs/iam-truststore.ks
 
      
        java.runtime.version = 1.8.0_232-b09
        java.specification.name = Java Platform API Specification
        java.specification.vendor = Oracle Corporation
        java.specification.version = 1.8
        java.util.logging.manager = org.jboss.logmanager.LogManager
        java.vendor = AdoptOpenJDK
        java.vendor.url = http://java.oracle.com/
        java.vendor.url.bug = http://bugreport.sun.com/bugreport/
        java.version = 1.8.0_232
        java.vm.info = mixed mode
        java.vm.name = OpenJDK 64-Bit Server VM
        java.vm.specification.name = Java Virtual Machine Specification
        java.vm.specification.vendor = Oracle Corporation
        java.vm.specification.version = 1.8
        java.vm.vendor = AdoptOpenJDK
      , completed tasks = 93]



ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 51) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./auth: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./auth: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:84)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

Caused by: java.lang.RuntimeException: Exception invoking method [listUnrunChangeSets] on object [liquibase.Liquibase@6e022594], using arguments [null,(),false]
        at org.keycloak.common.util.reflections.Reflections.invokeMethod(Reflections.java:385)
        at org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider.getLiquibaseUnrunChangeSets(LiquibaseJpaUpdaterProvider.java:237)
        at org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider.validateChangeSet(LiquibaseJpaUpdaterProvider.java:205)
        at org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider.validate(LiquibaseJpaUpdaterProvider.java:178)

Environment

Release : 10.6

Component : CA Service Virtualization

Cause

MysQL version 5.7.33 and higher expects 8.0.26 connector jar but our 10.6 Keycloak doesn't support it.  Limitation with Keycloak.  

Resolution

Please downgrade to MySQL server to 5.7.20 and then use mysql-connector-java-5.1.47.jar