Downgrading from 13 to 9 Version of Keycloak getting Failure

Upgraded keycloak from 9 to 13 working fine .
While downgrading from 13 to 9 getting below error .
Logs -
09:41:19,434 DEBUG [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool – 61) could not extract ResultSet [n/a]: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table ‘smds-alt.REALM_DEFAULT_ROLES’ doesn’t exist
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)
09:41:19,443 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool – 61) SQL Error: 1146, SQLState: 42S02
09:41:19,443 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool – 61) Table ‘smds-alt.REALM_DEFAULT_ROLES’ doesn’t exist
09:41:19,536 INFO [org.jboss.resteasy.resteasy_jaxrs.i18n] (ServerService Thread Pool – 61) RESTEASY002205: Adding provider class org.keycloak.services.error.KeycloakErrorHandler from Application class org.keycloak.services.resources.KeycloakApplication
09:41:19,610 DEBUG [io.undertow.request.error-response] (default task-2) Setting error code 503 for exchange HttpServerExchange{ GET /auth}: java.lang.RuntimeException
09:41:19,610 DEBUG [io.undertow.request.error-response] (default task-1) Setting error code 503 for exchange HttpServerExchange{ GET /auth}: java.lang.RuntimeException
09:41:19,630 DEBUG [io.undertow.request.error-response] (default task-3) Setting error code 503 for exchange HttpServerExchange{ GET /auth}: java.lang.RuntimeException
09:41:19,613 DEBUG [io.undertow.request.error-response] (default task-2) Setting error code 503 for exchange HttpServerExchange{ GET /auth}: java.lang.RuntimeException
09:41:19,640 DEBUG [io.undertow.request.error-response] (default task-4) Setting error code 503 for exchange HttpServerExchange{ GET /auth}: java.lang.RuntimeException
09:41:20,615 DEBUG [org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager] (MSC service thread 1-2) stop: CachedConnectionManagerImpl@2cc883ae[debug=false error=false ignoreConnections=false transactionIntegration=org.jboss.jca.core.tx.jbossts.TransactionIntegrationImpl@345962cd currentObjects=null objectToConnectionManagerMap={} connectionStackTraces={}]
09:41:20,616 DEBUG [org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager] (MSC service thread 1-2) stop: CachedConnectionManagerImpl@54ed5ce[debug=false error=false ignoreConnections=false transactionIntegration=org.jboss.as.connector.services.jca.NonTxCachedConnectionManagerService$NoopTransactionIntegration@3bdbe362 currentObjects=null objectToConnectionManagerMap={} connectionStackTraces={}]
09:41:20,918 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (“add”) failed - address: ([(“subsystem” => “microprofile-metrics-smallrye”)]): java.lang.NullPointerException

1 Like

I think somewhere in the upgrade docs or a related page, I read something that due to the database migrations you are unable to use it with an older version.

But Shouldnt we have these handells from Keycloak .
How we can solve this issue if we did’nt pefrom the DATABSE backup .