尝试将Keycloak(4.0.0.Final)与MySQL(5.7)集成在一起,所有步骤都很好,但是在keycloak初始化mysql模式时出现错误,以下错误-
12:20:03,899 INFO [org.hibernate.validator.internal.util.Version] (ServerService Thread Pool -- 47) HV000001: Hibernate Validator 5.3.5.Final
12:20:05,227 INFO [org.hibernate.hql.internal.QueryTranslatorFactoryInitiator] (ServerService Thread Pool -- 47) HHH000397: Using ASTQueryTranslatorFactory
12:20:06,959 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool -- 47) SQL Error: 0, SQLState: null
12:20:06,959 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool -- 47) javax.resource.ResourceException: IJ000460: Error checking for a transaction
12:20:06,963 INFO [org.hibernate.event.internal.DefaultLoadEventListener] (ServerService Thread Pool -- 47) HHH000327: Error performing load command : org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
12:20:06,967 WARN [com.arjuna.ats.arjuna] (ServerService Thread Pool -- 47) ARJUNA012077: Abort called on already aborted atomic action 0:ffff0a15cd37:7fe78a71:5d1afcc4:11
12:20:06,990 WARN [com.arjuna.ats.arjuna] (ServerService Thread Pool -- 47) ARJUNA012077: Abort called on already aborted atomic action 0:ffff0a15cd37:7fe78a71:5d1afcc4:e
12:20:07,001 INFO [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested via an OS signal
12:20:07,001 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 47) 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)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:162)
Keycloak 4.0.0.Final和MySQL 5.7或其他版本是否存在兼容性问题?如何解决呢? 注意-使用mysql-connector-java-5.1.42.jar。