[keycloak-user] Infinispan: Custom Keycloak UserStorageProvider throws NotSerializableException in ha-clustered mode

Marek Posolda mposolda at redhat.com
Tue Mar 13 16:36:45 EDT 2018


I guess those examples were not tested in cluster environment.

It seerms the issue is, that some stateful EJB is trying to serialize, 
but EJB has reference on DefaultKeycloakSession, which is not 
serializable (and shouldn't be as it's not supposed to be serialized and 
sent over network).

I am not 100% sure, but if it's possible to get rid of stateful EJB and 
use "standalone" JPA, it may help. Also it may help if you mark some 
fields transient in your EJB or write custom infinispan externalizers. 
See infinispan/Wildfly docs for more info.

Marek

On 12/03/18 13:08, Dominik Guhr wrote:
> Hi everyone,
>
> so I'm on kc 3.4.3.Final and running a custom UserStorageProvider
> ("MyAppUserStorage" below) based on the github example jpa storage
> provider. It's all working well in dev-environment, which is not clustered.
>
> But in my clustered production-kc-environment (using standalone-ha, 2
> nodes), the exception below is thrown.
> Seems like it has no effect, though, I can successfully use the app,
> even stop one node and everythings working fine.
>
> Now these logentries are at least annoying and I want to know whats
> happening here, so I hope someone could help me out. Do I have to make
> some classes @Serializable or something? (e.g. UserAdapter.java?) to
> work correctly in clustered mode?
>
> Would be great to get some help here! If you need more information or
> code, feel free to ask :)
>
> Best regards,
> Dominik
>
> Log:
> 2018-03-08 14:38:21,220 ERROR
> [org.infinispan.remoting.rpc.RpcManagerImpl] (default task-14)
> ISPN000073: Unexpected error while replicating:
> org.infinispan.commons.marshall.NotSerializableException:
> org.keycloak.services.DefaultKeycloakSession
> Caused by: an exception which occurred:
>           in field my.app.de.keycloak.MyAppUserStorage.session
>           in object my.app.de.keycloak.MyAppUserStorage at 1f4565de
>           in field
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference.value
>           in object
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference at 7122451c
>           in field
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance
>           in object
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent at 304e0b06
>           in object
> org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance at 6886f535
>           in object java.util.concurrent.ConcurrentHashMap at 51f3597e
>           in object
> org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupEntry at 3dbc21a8
>           in object org.infinispan.commands.write.PutKeyValueCommand at 63f7437d
>           in object org.infinispan.commands.tx.PrepareCommand at f4eee60c
>
> 2018-03-08 14:38:21,220 ERROR
> [org.infinispan.interceptors.InvocationContextInterceptor] (default
> task-14) ISPN000136: Error executing command PrepareCommand, writing
> keys [UUIDSessionID [3cf91933-4a12-4dd1-8454-c77a31fdd607],
> UUIDSessionID [3cf91933-4a12-4dd1-8454-c77a31fdd607]]:
> org.infinispan.commons.marshall.NotSerializableException:
> org.keycloak.services.DefaultKeycloakSession
> Caused by: an exception which occurred:
>           in field my.app.de.keycloak.MyAppUserStorage.session
>           in object my.app.de.keycloak.MyAppUserStorage at 1f4565de
>           in field
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference.value
>           in object
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference at 7122451c
>           in field
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance
>           in object
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent at 304e0b06
>           in object
> org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance at 6886f535
>           in object java.util.concurrent.ConcurrentHashMap at 51f3597e
>           in object
> org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupEntry at 3dbc21a8
>           in object org.infinispan.commands.write.PutKeyValueCommand at 63f7437d
>           in object org.infinispan.commands.tx.PrepareCommand at f4eee60c
>
> 2018-03-08 14:38:21,220 ERROR
> [org.infinispan.transaction.impl.TransactionCoordinator] (default
> task-14) ISPN000097: Error while processing a prepare in a single-phase
> transaction: org.infinispan.commons.marshall.NotSerializableException:
> org.keycloak.services.DefaultKeycloakSession
> Caused by: an exception which occurred:
>           in field my.app.de.keycloak.MyAppUserStorage.session
>           in object my.app.de.keycloak.MyAppUserStorage at 1f4565de
>           in field
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference.value
>           in object
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference at 7122451c
>           in field
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance
>           in object
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent at 304e0b06
>           in object
> org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance at 6886f535
>           in object java.util.concurrent.ConcurrentHashMap at 51f3597e
>           in object
> org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupEntry at 3dbc21a8
>           in object org.infinispan.commands.write.PutKeyValueCommand at 63f7437d
>           in object org.infinispan.commands.tx.PrepareCommand at f4eee60c
>
> 2018-03-08 14:38:21,221 WARN
> [org.infinispan.transaction.tm.DummyTransaction] (default task-14)
> ISPN000112: exception while committing: javax.transaction.xa.XAException
>           at
> org.infinispan.transaction.impl.TransactionCoordinator.handleCommitFailure(TransactionCoordinator.java:213)
>           at
> org.infinispan.transaction.impl.TransactionCoordinator.commit(TransactionCoordinator.java:159)
>           at
> org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:114)
>           at
> org.infinispan.transaction.tm.DummyTransaction.finishResource(DummyTransaction.java:401)
>           at
> org.infinispan.transaction.tm.DummyTransaction.commitResources(DummyTransaction.java:448)
>           at
> org.infinispan.transaction.tm.DummyTransaction.runCommit(DummyTransaction.java:321)
>           at
> org.infinispan.transaction.tm.DummyTransaction.commit(DummyTransaction.java:108)
>           at
> org.wildfly.clustering.ee.infinispan.InfinispanBatch.close(InfinispanBatch.java:97)
>           at
> org.jboss.as.ejb3.cache.distributable.DistributableCache.release(DistributableCache.java:154)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.releaseInstance(StatefulSessionSynchronizationInterceptor.java:200)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.handleAfterCompletion(StatefulSessionSynchronizationInterceptor.java:287)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor$StatefulSessionSynchronization.afterCompletion(StatefulSessionSynchronizationInterceptor.java:260)
>           at
> org.jboss.as.txn.service.internal.tsr.JCAOrderedLastSynchronizationList.afterCompletion(JCAOrderedLastSynchronizationList.java:147)
>           at
> org.wildfly.transaction.client.AbstractTransaction.performConsumer(AbstractTransaction.java:196)
>           at
> org.wildfly.transaction.client.AbstractTransaction$AssociatingSynchronization.afterCompletion(AbstractTransaction.java:279)
>           at
> com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
>           at
> com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:542)
>           at
> com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:101)
>           at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
>           at
> com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1289)
>           at
> com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
>           at
> com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:89)
>           at
> org.wildfly.transaction.client.LocalTransaction.commitAndDissociate(LocalTransaction.java:73)
>           at
> org.wildfly.transaction.client.ContextTransactionManager.commit(ContextTransactionManager.java:71)
>           at
> org.keycloak.transaction.JtaTransactionWrapper.commit(JtaTransactionWrapper.java:92)
>           at
> org.keycloak.services.DefaultKeycloakTransactionManager.commit(DefaultKeycloakTransactionManager.java:136)
>           at
> org.keycloak.services.filters.KeycloakTransactionCommitter.filter(KeycloakTransactionCommitter.java:43)
>           at
> org.jboss.resteasy.core.ServerResponseWriter.executeFilters(ServerResponseWriter.java:165)
>           at
> org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:87)
>           at
> org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:477)
>           at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:426)
>           at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:213)
>           at
> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:228)
>           at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
>           at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
>           at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>           at
> io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
>           at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
>           at
> org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:90)
>           at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
>           at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
>           at
> io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
>           at
> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
>           at
> io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
>           at
> org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
>           at
> io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
>           at
> io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
>           at
> io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
>           at
> io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
>           at
> io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
>           at
> io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
>           at
> io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
>           at
> io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
>           at
> org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
>           at
> io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
>           at
> io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
>           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)
> Caused by: org.infinispan.commons.marshall.NotSerializableException:
> org.keycloak.services.DefaultKeycloakSession
> Caused by: an exception which occurred:
>           in field my.app.de.keycloak.MyAppUserStorage.session
>           in object my.app.de.keycloak.MyAppUserStorage at 1f4565de
>           in field
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference.value
>           in object
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference at 7122451c
>           in field
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance
>           in object
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent at 304e0b06
>           in object
> org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance at 6886f535
>           in object java.util.concurrent.ConcurrentHashMap at 51f3597e
>           in object
> org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupEntry at 3dbc21a8
>           in object org.infinispan.commands.write.PutKeyValueCommand at 63f7437d
>           in object org.infinispan.commands.tx.PrepareCommand at f4eee60c
>
> 2018-03-08 14:38:21,222 WARN  [org.jboss.as.txn] (default task-14)
> WFLYTX0027: The pre-jca synchronization
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor$StatefulSessionSynchronization at 57f2b0a6
> associated with tx TransactionImple < ac, BasicAction:
> 0:ffff0a7f0895:-364bcb73:5a9d46fe:5906 status: ActionStatus.COMMITTED >
> failed during after completion: org.infinispan.commons.CacheException:
> javax.transaction.HeuristicRollbackException
>           at
> org.wildfly.clustering.ee.infinispan.InfinispanBatch.close(InfinispanBatch.java:102)
>           at
> org.jboss.as.ejb3.cache.distributable.DistributableCache.release(DistributableCache.java:154)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.releaseInstance(StatefulSessionSynchronizationInterceptor.java:200)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.handleAfterCompletion(StatefulSessionSynchronizationInterceptor.java:287)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor$StatefulSessionSynchronization.afterCompletion(StatefulSessionSynchronizationInterceptor.java:260)
>           at
> org.jboss.as.txn.service.internal.tsr.JCAOrderedLastSynchronizationList.afterCompletion(JCAOrderedLastSynchronizationList.java:147)
>           at
> org.wildfly.transaction.client.AbstractTransaction.performConsumer(AbstractTransaction.java:196)
>           at
> org.wildfly.transaction.client.AbstractTransaction$AssociatingSynchronization.afterCompletion(AbstractTransaction.java:279)
>           at
> com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
>           at
> com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:542)
>           at
> com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:101)
>           at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
>           at
> com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1289)
>           at
> com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
>           at
> com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:89)
>           at
> org.wildfly.transaction.client.LocalTransaction.commitAndDissociate(LocalTransaction.java:73)
>           at
> org.wildfly.transaction.client.ContextTransactionManager.commit(ContextTransactionManager.java:71)
>           at
> org.keycloak.transaction.JtaTransactionWrapper.commit(JtaTransactionWrapper.java:92)
>           at
> org.keycloak.services.DefaultKeycloakTransactionManager.commit(DefaultKeycloakTransactionManager.java:136)
>           at
> org.keycloak.services.filters.KeycloakTransactionCommitter.filter(KeycloakTransactionCommitter.java:43)
>           at
> org.jboss.resteasy.core.ServerResponseWriter.executeFilters(ServerResponseWriter.java:165)
>           at
> org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:87)
>           at
> org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:477)
>           at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:426)
>           at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:213)
>           at
> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:228)
>           at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
>           at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
>           at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>           at
> io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
>           at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
>           at
> org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:90)
>           at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
>           at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
>           at
> io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
>           at
> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
>           at
> io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
>           at
> org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
>           at
> io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
>           at
> io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
>           at
> io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
>           at
> io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
>           at
> io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
>           at
> io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
>           at
> io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
>           at
> io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
>           at
> org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
>           at
> io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
>           at
> io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
>           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)
> Caused by: javax.transaction.HeuristicRollbackException
>           at
> org.infinispan.transaction.tm.DummyTransaction.finishResource(DummyTransaction.java:433)
>           at
> org.infinispan.transaction.tm.DummyTransaction.commitResources(DummyTransaction.java:448)
>           at
> org.infinispan.transaction.tm.DummyTransaction.runCommit(DummyTransaction.java:321)
>           at
> org.infinispan.transaction.tm.DummyTransaction.commit(DummyTransaction.java:108)
>           at
> org.wildfly.clustering.ee.infinispan.InfinispanBatch.close(InfinispanBatch.java:97)
>           ... 71 more
> Caused by: javax.transaction.xa.XAException
>           at
> org.infinispan.transaction.impl.TransactionCoordinator.handleCommitFailure(TransactionCoordinator.java:213)
>           at
> org.infinispan.transaction.impl.TransactionCoordinator.commit(TransactionCoordinator.java:159)
>           at
> org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:114)
>           at
> org.infinispan.transaction.tm.DummyTransaction.finishResource(DummyTransaction.java:401)
>           ... 75 more
> Caused by: org.infinispan.commons.marshall.NotSerializableException:
> org.keycloak.services.DefaultKeycloakSession
> Caused by: an exception which occurred:
>           in field my.app.de.keycloak.MyAppUserStorage.session
>           in object my.app.de.keycloak.MyAppUserStorage at 1f4565de
>           in field
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference.value
>           in object
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference at 7122451c
>           in field
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance
>           in object
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent at 304e0b06
>           in object
> org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance at 6886f535
>           in object java.util.concurrent.ConcurrentHashMap at 51f3597e
>           in object
> org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupEntry at 3dbc21a8
>           in object org.infinispan.commands.write.PutKeyValueCommand at 63f7437d
>           in object org.infinispan.commands.tx.PrepareCommand at f4eee60c
>
> 2018-03-08 14:38:21,226 ERROR
> [org.infinispan.remoting.rpc.RpcManagerImpl] (default task-14)
> ISPN000073: Unexpected error while replicating:
> org.infinispan.commons.marshall.NotSerializableException:
> org.keycloak.services.DefaultKeycloakSession
> Caused by: an exception which occurred:
>           in field my.app.de.keycloak.MyAppUserStorage.session
>           in object my.app.de.keycloak.MyAppUserStorage at 1f4565de
>           in field
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference.value
>           in object
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference at 7122451c
>           in field
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance
>           in object
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent at 1e32e6c3
>           in object
> org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance at 6886f535
>           in object java.util.concurrent.ConcurrentHashMap at 51f3597e
>           in object
> org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupEntry at 3dbc21a8
>           in object org.infinispan.commands.write.PutKeyValueCommand at 63f7437d
>           in object org.infinispan.commands.tx.PrepareCommand at f4eee60e
>
> 2018-03-08 14:38:21,226 ERROR
> [org.infinispan.interceptors.InvocationContextInterceptor] (default
> task-14) ISPN000136: Error executing command PrepareCommand, writing
> keys [UUIDSessionID [3cf91933-4a12-4dd1-8454-c77a31fdd607],
> UUIDSessionID [3cf91933-4a12-4dd1-8454-c77a31fdd607]]:
> org.infinispan.commons.marshall.NotSerializableException:
> org.keycloak.services.DefaultKeycloakSession
> Caused by: an exception which occurred:
>           in field my.app.de.keycloak.MyAppUserStorage.session
>           in object my.app.de.keycloak.MyAppUserStorage at 1f4565de
>           in field
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference.value
>           in object
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference at 7122451c
>           in field
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance
>           in object
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent at 1e32e6c3
>           in object
> org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance at 6886f535
>           in object java.util.concurrent.ConcurrentHashMap at 51f3597e
>           in object
> org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupEntry at 3dbc21a8
>           in object org.infinispan.commands.write.PutKeyValueCommand at 63f7437d
>           in object org.infinispan.commands.tx.PrepareCommand at f4eee60e
>
> 2018-03-08 14:38:21,226 ERROR
> [org.infinispan.transaction.impl.TransactionCoordinator] (default
> task-14) ISPN000097: Error while processing a prepare in a single-phase
> transaction: org.infinispan.commons.marshall.NotSerializableException:
> org.keycloak.services.DefaultKeycloakSession
> Caused by: an exception which occurred:
>           in field my.app.de.keycloak.MyAppUserStorage.session
>           in object my.app.de.keycloak.MyAppUserStorage at 1f4565de
>           in field
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference.value
>           in object
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference at 7122451c
>           in field
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance
>           in object
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent at 1e32e6c3
>           in object
> org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance at 6886f535
>           in object java.util.concurrent.ConcurrentHashMap at 51f3597e
>           in object
> org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupEntry at 3dbc21a8
>           in object org.infinispan.commands.write.PutKeyValueCommand at 63f7437d
>           in object org.infinispan.commands.tx.PrepareCommand at f4eee60e
>
> 2018-03-08 14:38:21,227 WARN
> [org.infinispan.transaction.tm.DummyTransaction] (default task-14)
> ISPN000112: exception while committing: javax.transaction.xa.XAException
>           at
> org.infinispan.transaction.impl.TransactionCoordinator.handleCommitFailure(TransactionCoordinator.java:213)
>           at
> org.infinispan.transaction.impl.TransactionCoordinator.commit(TransactionCoordinator.java:159)
>           at
> org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:114)
>           at
> org.infinispan.transaction.tm.DummyTransaction.finishResource(DummyTransaction.java:401)
>           at
> org.infinispan.transaction.tm.DummyTransaction.commitResources(DummyTransaction.java:448)
>           at
> org.infinispan.transaction.tm.DummyTransaction.runCommit(DummyTransaction.java:321)
>           at
> org.infinispan.transaction.tm.DummyTransaction.commit(DummyTransaction.java:108)
>           at
> org.wildfly.clustering.ee.infinispan.InfinispanBatch.close(InfinispanBatch.java:97)
>           at
> org.jboss.as.ejb3.cache.distributable.DistributableCache.release(DistributableCache.java:154)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.releaseInstance(StatefulSessionSynchronizationInterceptor.java:200)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.handleAfterCompletion(StatefulSessionSynchronizationInterceptor.java:287)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor$StatefulSessionSynchronization.afterCompletion(StatefulSessionSynchronizationInterceptor.java:260)
>           at
> org.jboss.as.txn.service.internal.tsr.JCAOrderedLastSynchronizationList.afterCompletion(JCAOrderedLastSynchronizationList.java:147)
>           at
> org.wildfly.transaction.client.AbstractTransaction.performConsumer(AbstractTransaction.java:196)
>           at
> org.wildfly.transaction.client.AbstractTransaction$AssociatingSynchronization.afterCompletion(AbstractTransaction.java:279)
>           at
> com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
>           at
> com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:542)
>           at
> com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:101)
>           at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
>           at
> com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1289)
>           at
> com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
>           at
> com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:89)
>           at
> org.wildfly.transaction.client.LocalTransaction.commitAndDissociate(LocalTransaction.java:73)
>           at
> org.wildfly.transaction.client.ContextTransactionManager.commit(ContextTransactionManager.java:71)
>           at
> org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:92)
>           at
> org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:279)
>           at
> org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:332)
>           at
> org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:240)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)
>           at
> org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:609)
>           at
> org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
>           at
> org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
>           at
> org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
>           at
> org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:81)
>           at my.app.de.keycloak.MyAppUserStorage$$$view1.close(Unknown
> Source)
>           at
> org.keycloak.services.DefaultKeycloakSession.close(DefaultKeycloakSession.java:265)
>           at
> org.keycloak.services.filters.KeycloakSessionServletFilter.closeSession(KeycloakSessionServletFilter.java:130)
>           at
> org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:95)
>           at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
>           at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
>           at
> io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
>           at
> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
>           at
> io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
>           at
> org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
>           at
> io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
>           at
> io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
>           at
> io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
>           at
> io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
>           at
> io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
>           at
> io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
>           at
> io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
>           at
> io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
>           at
> org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
>           at
> io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
>           at
> io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
>           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)
> Caused by: org.infinispan.commons.marshall.NotSerializableException:
> org.keycloak.services.DefaultKeycloakSession
> Caused by: an exception which occurred:
>           in field my.app.de.keycloak.MyAppUserStorage.session
>           in object my.app.de.keycloak.MyAppUserStorage at 1f4565de
>           in field
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference.value
>           in object
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference at 7122451c
>           in field
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance
>           in object
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent at 1e32e6c3
>           in object
> org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance at 6886f535
>           in object java.util.concurrent.ConcurrentHashMap at 51f3597e
>           in object
> org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupEntry at 3dbc21a8
>           in object org.infinispan.commands.write.PutKeyValueCommand at 63f7437d
>           in object org.infinispan.commands.tx.PrepareCommand at f4eee60e
>
> 2018-03-08 14:38:21,238 WARN  [org.jboss.as.txn] (default task-14)
> WFLYTX0027: The pre-jca synchronization
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor$StatefulSessionSynchronization at 32861c5f
> associated with tx TransactionImple < ac, BasicAction:
> 0:ffff0a7f0895:-364bcb73:5a9d46fe:590c status: ActionStatus.COMMITTED >
> failed during after completion: org.infinispan.commons.CacheException:
> javax.transaction.HeuristicRollbackException
>           at
> org.wildfly.clustering.ee.infinispan.InfinispanBatch.close(InfinispanBatch.java:102)
>           at
> org.jboss.as.ejb3.cache.distributable.DistributableCache.release(DistributableCache.java:154)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.releaseInstance(StatefulSessionSynchronizationInterceptor.java:200)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.handleAfterCompletion(StatefulSessionSynchronizationInterceptor.java:287)
>           at
> org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor$StatefulSessionSynchronization.afterCompletion(StatefulSessionSynchronizationInterceptor.java:260)
>           at
> org.jboss.as.txn.service.internal.tsr.JCAOrderedLastSynchronizationList.afterCompletion(JCAOrderedLastSynchronizationList.java:147)
>           at
> org.wildfly.transaction.client.AbstractTransaction.performConsumer(AbstractTransaction.java:196)
>           at
> org.wildfly.transaction.client.AbstractTransaction$AssociatingSynchronization.afterCompletion(AbstractTransaction.java:279)
>           at
> com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
>           at
> com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:542)
>           at
> com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:101)
>           at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
>           at
> com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1289)
>           at
> com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
>           at
> com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:89)
>           at
> org.wildfly.transaction.client.LocalTransaction.commitAndDissociate(LocalTransaction.java:73)
>           at
> org.wildfly.transaction.client.ContextTransactionManager.commit(ContextTransactionManager.java:71)
>           at
> org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:92)
>           at
> org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:279)
>           at
> org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:332)
>           at
> org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:240)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)
>           at
> org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:609)
>           at
> org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
>           at
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
>           at
> org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
>           at
> org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
>           at
> org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
>           at
> org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:81)
>           at my.app.de.keycloak.MyAppUserStorage$$$view1.close(Unknown
> Source)
>           at
> org.keycloak.services.DefaultKeycloakSession.close(DefaultKeycloakSession.java:265)
>           at
> org.keycloak.services.filters.KeycloakSessionServletFilter.closeSession(KeycloakSessionServletFilter.java:130)
>           at
> org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:95)
>           at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
>           at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
>           at
> io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
>           at
> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
>           at
> io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
>           at
> org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
>           at
> io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
>           at
> io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
>           at
> io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
>           at
> io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
>           at
> io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
>           at
> io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
>           at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
>           at
> io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
>           at
> io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
>           at
> org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
>           at
> io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
>           at
> io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
>           at
> io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
>           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)
> Caused by: javax.transaction.HeuristicRollbackException
>           at
> org.infinispan.transaction.tm.DummyTransaction.finishResource(DummyTransaction.java:433)
>           at
> org.infinispan.transaction.tm.DummyTransaction.commitResources(DummyTransaction.java:448)
>           at
> org.infinispan.transaction.tm.DummyTransaction.runCommit(DummyTransaction.java:321)
>           at
> org.infinispan.transaction.tm.DummyTransaction.commit(DummyTransaction.java:108)
>           at
> org.wildfly.clustering.ee.infinispan.InfinispanBatch.close(InfinispanBatch.java:97)
>           ... 91 more
> Caused by: javax.transaction.xa.XAException
>           at
> org.infinispan.transaction.impl.TransactionCoordinator.handleCommitFailure(TransactionCoordinator.java:213)
>           at
> org.infinispan.transaction.impl.TransactionCoordinator.commit(TransactionCoordinator.java:159)
>           at
> org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:114)
>           at
> org.infinispan.transaction.tm.DummyTransaction.finishResource(DummyTransaction.java:401)
>           ... 95 more
> Caused by: org.infinispan.commons.marshall.NotSerializableException:
> org.keycloak.services.DefaultKeycloakSession
> Caused by: an exception which occurred:
>           in field my.app.de.keycloak.MyAppUserStorage.session
>           in object my.app.de.keycloak.MyAppUserStorage at 1f4565de
>           in field
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference.value
>           in object
> org.jboss.as.ee.component.ConstructorComponentFactory$ConstructorManagedReference at 7122451c
>           in field
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance
>           in object
> org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent at 1e32e6c3
>           in object
> org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance at 6886f535
>           in object java.util.concurrent.ConcurrentHashMap at 51f3597e
>           in object
> org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupEntry at 3dbc21a8
>           in object org.infinispan.commands.write.PutKeyValueCommand at 63f7437d
>           in object org.infinispan.commands.tx.PrepareCommand at f4eee60e
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user




More information about the keycloak-user mailing list