<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr"><span>in addition to my previous email i attach the deadlock exception stactrace:</span></div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr"><span><br></span></div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">2:53:20,188 WARN &nbsp;[org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-118) SQL Error: 60, SQLState: 61000</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">12:53:20,189 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-118) ORA-00060: deadlock detected while waiting for resource</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class=""><br id="yui_3_16_0_1_1457436713878_6305" class=""></div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">12:53:20,189 INFO &nbsp;[org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (default task-118) HHH000010: On release of batch it still contained JDBC statements</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">12:53:20,192 ERROR [org.keycloak.services.resources.ModelExceptionMapper] (default task-118) javax.persistence.PersistenceException: org.hibernate.exception.LockAcquisitionException: cou</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">ld not execute statement: org.keycloak.models.ModelException: javax.persistence.PersistenceException: org.hibernate.exception.LockAcquisitionException: could not execute statement</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.connections.jpa.PersistenceExceptionConverter.convert(PersistenceExceptionConverter.java:44)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.connections.jpa.PersistenceExceptionConverter.invoke(PersistenceExceptionConverter.java:34)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.proxy.$Proxy147.flush(Unknown Source)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.jpa.JpaUserProvider.removeUser(JpaUserProvider.java:117)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.jpa.JpaUserProvider.removeUser(JpaUserProvider.java:97)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.cache.infinispan.DefaultCacheUserProvider.removeUser(DefaultCacheUserProvider.java:283)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.UserFederationManager.deleteInvalidUser(UserFederationManager.java:113)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.UserFederationManager.validateAndProxyUser(UserFederationManager.java:135)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.UserFederationManager.getUserByUsername(UserFederationManager.java:182)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.utils.KeycloakModelUtils.findUserByNameOrEmail(KeycloakModelUtils.java:246)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.authentication.authenticators.directgrant.ValidateUsername.authenticate(ValidateUsername.java:47)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.authentication.DefaultAuthenticationFlow.processFlow(DefaultAuthenticationFlow.java:155)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.authentication.AuthenticationProcessor.authenticateOnly(AuthenticationProcessor.java:776)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.protocol.oidc.endpoints.TokenEndpoint.buildResourceOwnerPasswordCredentialsGrant(TokenEndpoint.java:369)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.protocol.oidc.endpoints.TokenEndpoint.build(TokenEndpoint.java:110)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.GeneratedMethodAccessor284.invoke(Unknown Source)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at java.lang.reflect.Method.invoke(Method.java:497)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:109)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:135)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:61)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at java.lang.Thread.run(Thread.java:745)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">Caused by: javax.persistence.PersistenceException: org.hibernate.exception.LockAcquisitionException: could not execute statement</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1683)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1338)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.GeneratedMethodAccessor280.invoke(Unknown Source)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at java.lang.reflect.Method.invoke(Method.java:497)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.connections.jpa.PersistenceExceptionConverter.invoke(PersistenceExceptionConverter.java:32)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; ... 61 more</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">Caused by: org.hibernate.exception.LockAcquisitionException: could not execute statement</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.dialect.Oracle8iDialect$2.convert(Oracle8iDialect.java:473)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3400)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3630)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:114)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:465)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:351)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1335)</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">&nbsp; &nbsp; &nbsp; &nbsp; ... 65 more</div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr"></div><div id="yui_3_16_0_1_1457436713878_6275" dir="ltr" class="">Caused by: java.sql.SQLException: ORA-00060: deadlock detected while waiting for resource</div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> Il Martedì 8 Marzo 2016 10:46, alex orl &lt;alex_orl1079@yahoo.it&gt; ha scritto:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv8832604606"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;"><div id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><span id="yiv8832604606yui_3_16_0_1_1457425260832_7777">I will try to make my use case clearer:</span></div><div id="yiv8832604606yui_3_16_0_1_1457425260832_7713">Every time a user logins into my system, so when keycloak invokes "getUserByUsername()" method or the "isValid()" &nbsp;method, &nbsp;i do the realm roles synchronization:</div><div id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div id="yiv8832604606yui_3_16_0_1_1457425260832_7713">i.e.</div><div dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">RoleModel keycloakRole;&nbsp;</div><div id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">public UserModel getUserByUsername(RealmModel realm, String username) {<br clear="none"></div><div id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div id="yiv8832604606yui_3_16_0_1_1457425260832_7713">&nbsp; &nbsp; ...<br clear="none"></div><div id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div id="yiv8832604606yui_3_16_0_1_1457425260832_7713">&nbsp;&nbsp;&nbsp;&nbsp;for ( MyRole role : MyRoleList) { &nbsp; &nbsp;</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keycloakRole = realm.addRole(myNewRole.getName());</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keycloakRole.setDescription(myNewRole.getDescription());</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">&nbsp;&nbsp;&nbsp;&nbsp;}</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">public boolean isValid(RealmModel realm, UserModel local) {<br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">&nbsp; &nbsp; &nbsp;...</div><div class="yiv8832604606" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none" class="yiv8832604606" id="yiv8832604606yui_3_16_0_1_1457425260832_8856"></div><div class="yiv8832604606" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">&nbsp;&nbsp;&nbsp;&nbsp;for ( MyRole role : MyRoleList) { &nbsp; &nbsp;</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keycloakRole = realm.addRole(myNewRole.getName());</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;keycloakRole.setDescription(myNewRole.getDescription());</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">&nbsp;&nbsp;&nbsp;&nbsp;}</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">This does work well just with a single thread user.</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">When the environment is configured with 20 concurrent threads/users trying to login, &nbsp;i get "deadlock exception". I can say the one i printed in my first email is a direct consequence of the deadlock.</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">After:</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">"optministiLock exception"</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">i get also:</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">09:51:12,677 WARN &nbsp;[org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-2) SQL Error: 1, SQLState: 23000</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">09:51:12,679 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-102) ORA-00001: unique constraint (KEYCLOAK17.UK_J3RWUVD56ONTGSUHOGM184WW2-2) violated</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none" class="yiv8832604606" id="yiv8832604606yui_3_16_0_1_1457425260832_9462"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">09:51:12,679 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-105) ORA-00001: unique constraint (KEYCLOAK17.UK_J3RWUVD56ONTGSUHOGM184WW2-2) violated</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">Now my question is:</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">- I never found a point inside the keycloak authentication flow from which triggering the synchronization operations so i guessed to make this operation inside the LOGIN phase. Is it right?</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">- doing like this, is the best way or is there a way to hook the login jpa transaction? the way that all the sync operations are flushed after the whole login transaction is committed?</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">- Or am i totally wrong and there is a specific pattern to follow for all the roles and attributes synchronize operations?</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713">thanks</div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div><div class="yiv8832604606" dir="ltr" id="yiv8832604606yui_3_16_0_1_1457425260832_7713"><br clear="none"></div> <div class="yiv8832604606qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv8832604606yqt9695145348" id="yiv8832604606yqt42671"><div class="yiv8832604606yahoo_quoted" style="display:block;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div dir="ltr"><font size="2" face="Arial"> Il Martedì 8 Marzo 2016 7:34, Stian Thorgersen &lt;sthorger@redhat.com&gt; ha scritto:<br clear="none"></font></div>  <br clear="none"><br clear="none"> <div class="yiv8832604606y_msg_container"><div id="yiv8832604606"><div><div dir="ltr"><div>As it times out after 30 seconds to obtain a connection it looks more like connections/transactions are not being closed. Is your federation provider using the same datasource? Any chance it's not closing the connections properly?<br clear="none"></div></div><div class="yiv8832604606gmail_extra"><br clear="none"><div class="yiv8832604606gmail_quote">On 7 March 2016 at 22:37, Thomas Darimont <span dir="ltr">&lt;<a rel="nofollow" shape="rect" ymailto="mailto:thomas.darimont@googlemail.com" target="_blank" href="mailto:thomas.darimont@googlemail.com">thomas.darimont@googlemail.com</a>&gt;</span> wrote:<br clear="none"><blockquote class="yiv8832604606gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr">Hello Alex,<div><br clear="none"></div><div>looks like your database connection pool is exhausted - how is your connection pool configured in wildfly?</div><div><br clear="none"></div><div>Cheers,</div><div>Thomas</div></div><div class="yiv8832604606gmail_extra"><br clear="none"><div class="yiv8832604606gmail_quote"><div><div class="yiv8832604606h5">2016-03-07 22:32 GMT+01:00 alex orl <span dir="ltr">&lt;<a rel="nofollow" shape="rect" ymailto="mailto:alex_orl1079@yahoo.it" target="_blank" href="mailto:alex_orl1079@yahoo.it">alex_orl1079@yahoo.it</a>&gt;</span>:<br clear="none"></div></div><blockquote class="yiv8832604606gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="yiv8832604606h5"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;"><div>Hi,</div><div>i wrote my custom federation provider.</div><div>All the synchronize operations (roles and user-roles) are done inside the getUserByUsername and the isValid method.</div><div>This way every time a user or a new-user logins into my system, all the roles and role-mapping are kept up to date.</div><div>All seems to work well with one user, but now i'm experiencing a lot of exceptions in a concurrence environment.</div><div>These are the tests i'm launching:</div><div>1) 20 concurrent threads, each of which tries to login, to send a REST request (to backend) and finally to logout. All 20 threads login with the same test username.</div><div>2) 200 concurrent threads, doing the same as at the previous point, with 20 differents username.</div><div><br clear="none"></div><div>Everytime each federation provider instance tries to synchronize all realm roles...adding or removing roles in concurrence, i catch this error:</div><div><br clear="none"></div><div><br clear="none"></div><div>16:10:08,228 ERROR [io.undertow.request] (default task-96) UT005023: Exception handling request to /auth/realms/MyRealm/protocol/openid-connect/token: java.lang.RuntimeException: reques</div><div>t path: /auth/realms/MyRealm/protocol/openid-connect/token</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:75)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at java.lang.Thread.run(Thread.java:745)</div><div>Caused by: org.jboss.resteasy.spi.UnhandledException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:372)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:61)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ... 29 more</div><div>Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1771)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:64)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.connections.jpa.JpaKeycloakTransaction.begin(JpaKeycloakTransaction.java:22)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.services.DefaultKeycloakTransactionManager.enlist(DefaultKeycloakTransactionManager.java:25)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:46)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:30)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.jpa.JpaUserProviderFactory.create(JpaUserProviderFactory.java:34)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.jpa.JpaUserProviderFactory.create(JpaUserProviderFactory.java:16)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:103)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.cache.infinispan.DefaultCacheUserProvider.getDelegate(DefaultCacheUserProvider.java:50)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.cache.infinispan.DefaultCacheUserProvider.getUserByUsername(DefaultCacheUserProvider.java:147)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.UserFederationManager.getUserByUsername(UserFederationManager.java:180)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.models.utils.KeycloakModelUtils.findUserByNameOrEmail(KeycloakModelUtils.java:246)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.authentication.authenticators.directgrant.ValidateUsername.authenticate(ValidateUsername.java:47)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.authentication.DefaultAuthenticationFlow.processFlow(DefaultAuthenticationFlow.java:155)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.authentication.AuthenticationProcessor.authenticateOnly(AuthenticationProcessor.java:776)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.protocol.oidc.endpoints.TokenEndpoint.buildResourceOwnerPasswordCredentialsGrant(TokenEndpoint.java:369)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.keycloak.protocol.oidc.endpoints.TokenEndpoint.build(TokenEndpoint.java:110)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.GeneratedMethodAccessor279.invoke(Unknown Source)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at java.lang.reflect.Method.invoke(Method.java:497)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:109)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:135)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ... 37 more</div><div>Caused by: org.hibernate.exception.GenericJDBCException: Could not open connection</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:235)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:171)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1471)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:61)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ... 65 more</div><div>Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/KeycloakOracleDS</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:146)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:67)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:380)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:228)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ... 70 more</div><div>Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/KeycloakOracleDS</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:646)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:430)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:737)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ... 74 more</div><div>Caused by: javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (30000 [ms])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:569)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:627)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:599)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:579)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ... 77 more</div><div><br clear="none"></div><div>16:10:08,260 ERROR [stderr] (default task-41) javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection</div><div>16:10:08,333 ERROR [stderr] (default task-41) &nbsp; at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)</div><div>16:10:08,333 ERROR [stderr] (default task-41) &nbsp; at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)</div><div><br clear="none"></div><div>What's the solution to correctly handle a concurrence environment?</div><div>What am doing wrong? Is there a way to make synchronized keycloak jpa transactions?</div><div>Thanks</div><div dir="ltr"><br clear="none"></div></div></div><br clear="none"></div></div>_______________________________________________<br clear="none">
keycloak-user mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:keycloak-user@lists.jboss.org" target="_blank" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><div class="yiv8832604606yqt1305574060" id="yiv8832604606yqtfd85031"><br clear="none"></div></blockquote></div><div class="yiv8832604606yqt1305574060" id="yiv8832604606yqtfd69457"><br clear="none"></div></div><div class="yiv8832604606yqt1305574060" id="yiv8832604606yqtfd56303">
<br clear="none">_______________________________________________<br clear="none">
keycloak-user mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:keycloak-user@lists.jboss.org" target="_blank" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br clear="none"></div></blockquote></div><div class="yiv8832604606yqt1305574060" id="yiv8832604606yqtfd98111"><br clear="none"></div></div></div></div><br clear="none"><br clear="none"></div>  </div> </div>  </div></div></div></div></div><br><br></div>  </div> </div>  </div></div></body></html>