<div dir="ltr">Just ran into an issue starting up a fresh install 1.8.0.CR2 on a new mysql db. Got this exception at first startup:<div><br></div><div><div>11:45:47,034 INFO  [org.keycloak.services.resources.KeycloakApplication] (ServerService Thread Pool -- 49) Load config from /opt/keycloak-1.8.0.CR2/standalone/configuration/keycloak-server.json</div><div>11:45:50,881 INFO  [org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider] (ServerService Thread Pool -- 49) Initializing database schema</div><div>11:45:55,265 WARN  [org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider] (ServerService Thread Pool -- 49) Database does not support drop with cascade</div><div>11:45:55,285 WARN  [org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider] (ServerService Thread Pool -- 49) Database does not support drop with cascade</div><div>11:46:00,630 ERROR [org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider] (ServerService Thread Pool -- 49) Change Set META-INF/jpa-changelog-1.8.0.xml::1.8.0-2::keycloak failed.  Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;&#39;HmacSHA1&#39;&#39; at line 1 [Failed SQL: UPDATE keycloak.CREDENTIAL SET ALGORITHM = &#39;pbkdf2&#39; WHERE TYPE in (&#39;password-history&#39;, &#39;password&#39;) AND ALGORITHM is &#39;HmacSHA1&#39;]: liquibase.exception.DatabaseException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;&#39;HmacSHA1&#39;&#39; at line 1 [Failed SQL: UPDATE keycloak.CREDENTIAL SET ALGORITHM = &#39;pbkdf2&#39; WHERE TYPE in (&#39;password-history&#39;, &#39;password&#39;) AND ALGORITHM is &#39;HmacSHA1&#39;]</div><div>        at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)</div><div>        at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)</div><div>        at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)</div><div>        at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1247)</div><div>        at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1230)</div><div>        at liquibase.changelog.ChangeSet.execute(ChangeSet.java:548)</div><div>        at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)</div><div>        at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73)</div><div>        at liquibase.Liquibase.update(Liquibase.java:210)</div><div>        at liquibase.Liquibase.update(Liquibase.java:190)</div><div>        at liquibase.Liquibase.update(Liquibase.java:186)</div><div>        at org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider.update(LiquibaseJpaUpdaterProvider.java:84)</div><div>        at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.lazyInit(DefaultJpaConnectionProviderFactory.java:153)</div><div>        at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:42)</div><div>        at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:30)</div><div>        at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)</div><div>        at org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:34)</div><div>        at org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:16)</div><div>        at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)</div><div>        at org.keycloak.models.cache.infinispan.DefaultCacheRealmProvider.getDelegate(DefaultCacheRealmProvider.java:61)</div><div>        at org.keycloak.models.cache.infinispan.DefaultCacheRealmProvider.getMigrationModel(DefaultCacheRealmProvider.java:43)</div><div>        at org.keycloak.migration.MigrationModelManager.migrate(MigrationModelManager.java:21)</div><div>        at org.keycloak.services.resources.KeycloakApplication.migrateModel(KeycloakApplication.java:137)</div><div>        at org.keycloak.services.resources.KeycloakApplication.&lt;init&gt;(KeycloakApplication.java:80)</div><div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</div><div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)</div><div>        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)</div><div>        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)</div><div>        at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:150)</div><div>        at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2209)</div><div>        at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:299)</div><div>        at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:240)</div><div>        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)</div><div>        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)</div><div>        at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)</div><div>        at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)</div><div>        at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)</div><div>        at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:231)</div><div>        at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:132)</div><div>        at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:526)</div><div>        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)</div><div>        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)</div><div>        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)</div><div>        at java.util.concurrent.FutureTask.run(FutureTask.java:266)</div><div>        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)</div><div>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)</div><div>        at java.lang.Thread.run(Thread.java:745)</div><div>        at org.jboss.threads.JBossThread.run(JBossThread.java:320)</div><div>Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;&#39;HmacSHA1&#39;&#39; at line 1</div><div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</div><div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)</div><div>        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)</div><div>        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)</div><div>        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)</div><div>        at com.mysql.jdbc.Util.getInstance(Util.java:387)</div><div>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939)</div><div>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)</div><div>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)</div><div>        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)</div><div>        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)</div><div>        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2547)</div><div>        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2505)</div><div>        at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)</div><div>        at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)</div><div>        at org.jboss.jca.adapters.jdbc.WrappedStatement.execute(WrappedStatement.java:198)</div><div>        at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314)</div><div>        ... 47 more</div><div><br></div><div>11:46:00,652 ERROR [org.keycloak.services.resources.KeycloakApplication] (ServerService Thread Pool -- 49) Failed to migrate datamodel: java.lang.RuntimeException: Failed to update database</div><div>        at org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider.update(LiquibaseJpaUpdaterProvider.java:87)</div><div>        at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.lazyInit(DefaultJpaConnectionProviderFactory.java:153)</div><div>        at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:42)</div><div>        at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:30)</div><div>        at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)</div><div>        at org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:34)</div><div>        at org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:16)</div><div>        at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)</div><div>        at org.keycloak.models.cache.infinispan.DefaultCacheRealmProvider.getDelegate(DefaultCacheRealmProvider.java:61)</div><div>        at org.keycloak.models.cache.infinispan.DefaultCacheRealmProvider.getMigrationModel(DefaultCacheRealmProvider.java:43)</div><div>        at org.keycloak.migration.MigrationModelManager.migrate(MigrationModelManager.java:21)</div><div>        at org.keycloak.services.resources.KeycloakApplication.migrateModel(KeycloakApplication.java:137)</div><div>        at org.keycloak.services.resources.KeycloakApplication.&lt;init&gt;(KeycloakApplication.java:80)</div><div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</div><div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)</div><div>        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)</div><div>        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)</div><div>        at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:150)</div><div>        at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2209)</div><div>        at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:299)</div><div>        at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:240)</div><div>        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)</div><div>        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)</div><div>        at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)</div><div>        at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)</div><div>        at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)</div><div>        at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:231)</div><div>        at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:132)</div><div>        at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:526)</div><div>        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)</div><div>        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)</div><div>        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)</div><div>        at java.util.concurrent.FutureTask.run(FutureTask.java:266)</div><div>        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)</div><div>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)</div><div>        at java.lang.Thread.run(Thread.java:745)</div><div>        at org.jboss.threads.JBossThread.run(JBossThread.java:320)</div><div>Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set META-INF/jpa-changelog-1.8.0.xml::1.8.0-2::keycloak:</div><div>     Reason: liquibase.exception.DatabaseException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;&#39;HmacSHA1&#39;&#39; at line 1 [Failed SQL: UPDATE keycloak.CREDENTIAL SET ALGORITHM = &#39;pbkdf2&#39; WHERE TYPE in (&#39;password-history&#39;, &#39;password&#39;) AND ALGORITHM is &#39;HmacSHA1&#39;]</div><div>        at liquibase.changelog.ChangeSet.execute(ChangeSet.java:584)</div><div>        at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)</div><div>        at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73)</div><div>        at liquibase.Liquibase.update(Liquibase.java:210)</div><div>        at liquibase.Liquibase.update(Liquibase.java:190)</div><div>        at liquibase.Liquibase.update(Liquibase.java:186)</div><div>        at org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider.update(LiquibaseJpaUpdaterProvider.java:84)</div><div>        ... 36 more</div><div>Caused by: liquibase.exception.DatabaseException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;&#39;HmacSHA1&#39;&#39; at line 1 [Failed SQL: UPDATE keycloak.CREDENTIAL SET ALGORITHM = &#39;pbkdf2&#39; WHERE TYPE in (&#39;password-history&#39;, &#39;password&#39;) AND ALGORITHM is &#39;HmacSHA1&#39;]</div><div>        at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)</div><div>        at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)</div><div>        at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)</div><div>        at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1247)</div><div>        at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1230)</div><div>        at liquibase.changelog.ChangeSet.execute(ChangeSet.java:548)</div><div>        ... 42 more</div><div>Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39;&#39;HmacSHA1&#39;&#39; at line 1</div><div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</div><div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)</div><div>        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)</div><div>        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)</div><div>        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)</div><div>        at com.mysql.jdbc.Util.getInstance(Util.java:387)</div><div>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939)</div><div>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)</div><div>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)</div><div>        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)</div><div>        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)</div><div>        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2547)</div><div>        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2505)</div><div>        at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)</div><div>        at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)</div><div>        at org.jboss.jca.adapters.jdbc.WrappedStatement.execute(WrappedStatement.java:198)</div><div>        at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314)</div><div>        ... 47 more</div><div><br></div><div>11:46:00,774 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 49) HHH000204: Processing PersistenceUnitInfo [</div><div>        name: keycloak-default</div><div>        ...]</div></div><div><br></div><div>Seems that other tables are being created just fine.</div><div><br></div><div>Thanks, Thorsten</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-21 12:00 GMT+01:00 Stian Thorgersen <span dir="ltr">&lt;<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p style="color:rgb(102,102,102);font-family:&#39;Trebuchet MS&#39;,Trebuchet,Verdana,sans-serif;font-size:13.2px;line-height:18.48px">We had a few issues reported against 1.8.0.CR1, so we&#39;re doing another CR release with the fixes. If everything is OK, 1.8.0.Final will be released next week.</p><p style="color:rgb(102,102,102);font-family:&#39;Trebuchet MS&#39;,Trebuchet,Verdana,sans-serif;font-size:13.2px;line-height:18.48px">There was also a feature that sneaked in. We now support sign-on with Microsoft Live.</p><p style="color:rgb(102,102,102);font-family:&#39;Trebuchet MS&#39;,Trebuchet,Verdana,sans-serif;font-size:13.2px;line-height:18.48px">For the full list of issues resolved check out <a href="https://issues.jboss.org/issues/?jql=project%20%3D%20keycloak%20and%20fixVersion%20%3D%201.8.0.CR2" style="text-decoration:none;color:rgb(136,136,136)" target="_blank">JIRA</a> and to download the release go to the <a href="http://keycloak.org/downloads" style="text-decoration:none;color:rgb(136,136,136)" target="_blank">Keycloak homepage</a>.</p></div>
<br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>