RemoteException (403, Forbidden exception) is seen when using the API. Multiple threads are updating the same table, cm_user, causing
HibernateOptimisticLockingFailureException. The issue revolves around login module code.
The following error is seen in the powerup.log:
2016-02-16 13:16:23,350 DEBUG
[com.powerup.common.authorization.spring.ncm.NCMUserDetailsService] (http-apr-8881-exec-8) Role data for user 'NCMUser' successfully loaded
2016-02-16 13:16:23,351 ERROR
[com.powerup.configmgr.server.security.jmx.SecurityService] (http-apr-8881-exec-23) Error authenticating user NCMUser with session 0a000002eae1c23fb41883eb52010002
javax.security.auth.login.LoginException: org.springframework.orm.hibernate3.
HibernateOptimisticLockingFailureException: Object of class
[com.powerup.configmgr.server.persist.user.User] with identifier
[0a0000015b21d43f1498cd9012010020]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect):
com.powerup.configmgr.server.persist.user.User#0a0000015b21d43f1498cd9012010020 at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:698)
at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:799)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:669)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:150)
at com.powerup.configmgr.server.security.login.CompositeLoginModule.authenticate(CompositeLoginModule.java:94)
at com.powerup.configmgr.server.security.login.AbstractLoginModule.login(AbstractLoginModule.java:171)