To reproduce this error, go to Admin -> Member -> Role management, then create new role with existing Display name. For example, "Users". You'll get an 500 error screen.
> org.hibernate.AssertionFailure: null id in org.jboss.portal.identity.db.HibernateRoleImpl entry (don't flush the Session after an exception occurs)
It also happens in Edit role and fails with BatchUpdateException:
> java.sql.BatchUpdateException: failed batch