Why is RH-SSO logging an error as "Invalid object name FED_USER_CONSENT_PROT_MAPPER" ?

Solution Verified - Updated -

Issue

  • While trying to delete an user from RH-SSO Admin Console, we received an error message and in the server logs we see this exception traces:

    2019-03-25 10:05:03,309 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-18) SQL Error: 208, SQLState: S0002
    2019-03-25 10:05:03,309 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-18) Invalid object name 'FED_USER_CONSENT_PROT_MAPPER'.
    2019-03-25 10:05:03,310 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-18) Uncaught server error: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute statement
        at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692)
        at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602)
        at org.hibernate.jpa.spi.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1700)
        at org.hibernate.jpa.spi.AbstractQueryImpl.executeUpdate(AbstractQueryImpl.java:70)
        at org.keycloak.storage.jpa.JpaUserFederatedStorageProvider.preRemove(JpaUserFederatedStorageProvider.java:850)
        at org.keycloak.storage.UserStorageManager.removeUser(UserStorageManager.java:171)
        at org.keycloak.models.cache.infinispan.UserCacheSession.removeUser(UserCacheSession.java:869)
        at org.keycloak.models.UserManager.removeUser(UserManager.java:36)
        at org.keycloak.models.UserManager.removeUser(UserManager.java:32)
        at org.keycloak.services.resources.admin.UserResource.deleteUser(UserResource.java:529)
        ...
    Caused by: org.hibernate.exception.SQLGrammarException: could not execute statement
        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106)
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
        ...
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'FED_USER_CONSENT_PROT_MAPPER'.
        at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:217)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1655)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:440)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:385)
        at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7505)
        at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2445)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:191)
        at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:166)
        at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:328)
        at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:537)
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
        ... 80 more
    

Environment

  • Red Hat Single Sing-On (RH-SSO)
    • 7.2.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In