<div dir="ltr"><div>Hi Guys,</div><div><br></div><div>Have you encountered this error before using mysql to store keycloak data?</div><div><br></div><div><br></div><div>- JDK 1.8</div><div><br></div><div>- mysql-connector-java-5.1.25.jar</div><div><br></div><div>- MYSQL  5.6.23-log</div><div><br></div><div>- Keycloak.json</div><div><br></div><div><div>&quot;connectionsJpa&quot;: {</div><div>        &quot;default&quot;: {</div><div>            &quot;dataSource&quot;: &quot;java:jboss/datasources/KeycloakDS&quot;,</div><div>            &quot;databaseSchema&quot;: &quot;update&quot;,</div><div>            &quot;driverDialect&quot; : &quot;org.hibernate.dialect.MySQL5InnoDBDialect&quot;</div><div>        }</div><div>    },</div></div><div><br></div>- logs<br clear="all"><div><div><br></div></div><div><div>04:23:26,251 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool -- 56) SQL Error: 1064, SQLState: 42000</div><div>04:23:26,251 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool -- 56) 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;)) order by persistent0_.USER_SESSION_ID&#39; at line 1</div><div>04:23:26,267 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/auth]] (ServerService Thread Pool -- 56) JBWEB000289: Servlet Keycloak REST Interface threw load() exception: 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;)) order by persistent0_.USER_SESSION_ID&#39; at line 1</div><div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_65]</div><div>        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_65]</div><div>        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_65]</div><div>        at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [rt.jar:1.8.0_65]</div><div>        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)</div><div>        at com.mysql.jdbc.Util.getInstance(Util.java:386)</div><div>        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)</div><div>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)</div><div>        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4119)</div><div>        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)</div><div>        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)</div><div>        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2815)</div><div>        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)</div><div>        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2322)</div><div>        at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatement.java:107)</div><div>        at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)</div><div>        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:79) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.loader.Loader.getResultSet(Loader.java:2062) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1859) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1838) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.loader.Loader.doQuery(Loader.java:906) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:348) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.loader.Loader.doList(Loader.java:2550) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.loader.Loader.doList(Loader.java:2536) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2366) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.loader.Loader.list(Loader.java:2361) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:495) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:357) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:198) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1230) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101) [hibernate-core-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div><div>        at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:268) [hibernate-entitymanager-4.2.18.Final-redhat-2.jar:4.2.18.Final-redhat-2]</div></div><div><br></div><div class="gmail_signature"></div>
</div>