Unable to login to JBoss Portal after exception in IDM

Solution Unverified - Updated -

Issue

  • We are using the Organization API to manipulate users inside JPP 6. It is possible that some operations fail due to database constraint violations, as can be seen in this log snippet:
ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] ORA-00001: unique constraint (PORTAL_IDM_
OWNER.JBID_IO_ATTR_UK999) violated
: org.hibernate.exception.ConstraintViolationException: ORA-00001: unique constraint (PORTAL_IDM_OWNER.JBID_IO_ATTR_UK999) violated

    at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:74) [hibernate-core-4.1.6.Final-redhat-3.jar:4.
1.6.Final-redhat-3]
...
    at org.picketlink.idm.impl.repository.RepositoryIdentityStoreSessionImpl.save(RepositoryIdentityStoreSessionImpl.java:75) [picketlink-idm-core-1.4
.1.Final-redhat-1.jar:1.4.1.Final-redhat-1]
    at org.picketlink.idm.impl.api.session.IdentitySessionImpl.save(IdentitySessionImpl.java:213) [picketlink-idm-core-1.4.1.Final-redhat-1.jar:1.4.1.
Final-redhat-1]
    at org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl.flush(PicketLinkIDMOrganizationServiceImpl.java:164) [exo.portal
.component.identity-3.5.2.Final-redhat-4.jar:3.5.2.Final-redhat-4]
    at org.exoplatform.services.organization.idm.UserDAOImpl.persistUserInfo(UserDAOImpl.java:483) [exo.portal.component.identity-3.5.2.Final-redhat-4
.jar:3.5.2.Final-redhat-4]
    at org.exoplatform.services.organization.idm.UserDAOImpl.createUser(UserDAOImpl.java:142) [exo.portal.component.identity-3.5.2.Final-redhat-4.jar:
3.5.2.Final-redhat-4]

This exception itself is not the problem, as it is understandable. But the portal fails to handle it properly, as afterwards it is no longer possible to log into the portal. Subsequent requests using this thread fail with an error similar to the following:

  org.hibernate.AssertionFailure: null id in org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship entry (don't flush the Session after an exception occurs)

The only way to recover from it is to restart the server

Environment

  • JBoss Enterprise Portal Platform (EPP)
    • 5.2.x
  • JBoss Portal Platform (JPP)
    • 6.0.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content