Hi all,
We are using Keycloak 3.4.3 and loading users via Custom User Federation
from the database. We are using Postgres 9.4.12
When we are loading users from the database during
CustomUserStorageProviderFactory.create(..),
we are getting the following exception:-
It is throwing the following exception during con.createStatement();
13:46:43,385 ERROR [stderr] (default task-8) java.sql.SQLException:
IJ031070: Transaction cannot proceed: STATUS_MARKED_ROLLBACK
13:46:43,385 ERROR [stderr] (default task-8) at
org.jboss.jca.adapters.jdbc.WrapperDataSource.checkTransactionActive(WrapperDataSource.java:245)
13:46:43,386 ERROR [stderr] (default task-8) at
org.jboss.jca.adapters.jdbc.WrappedConnection.checkTransactionActive(WrappedConnection.java:1928)
13:46:43,386 ERROR [stderr] (default task-8) at
org.jboss.jca.adapters.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:1943)
13:46:43,386 ERROR [stderr] (default task-8) at
org.jboss.jca.adapters.jdbc.WrappedConnection.checkTransaction(WrappedConnection.java:1917)
13:46:43,387 ERROR [stderr] (default task-8) at
org.jboss.jca.adapters.jdbc.WrappedConnection.createStatement(WrappedConnection.java:340)
13:46:43,387 ERROR [stderr] (default task-8) at
com.test.service.UserServiceImpl.loadExistingUsers(UserServiceImpl.java:98)
13:46:43,387 ERROR [stderr] (default task-8) at com.test.Custom
UserStorageProviderFactory.create(CustomUserStorageProviderFactory.java:43)
But if we call loadExistingUsers in init method of
CustomUserStorageProviderFactory,
it works fine. Please advise, what are we doing wrong? what is the ideal
way of loading existing users in Custom User Federation?
Regards,
SR