Cannot create a new Portal User via the Organization API in EPP 5

Solution Unverified - Updated -

Issue

I am trying to add a new user to the portal by using the Organization API.Here is our code to create the user:
       userHandlerImpl.createUser(user, true);

which fails with the following error:

INFO  [org.exoplatform.services.organization.idm.UserDAOImpl] (http-127.0.0.1-8180-1) Cannot obtain user: test01; 
org.picketlink.idm.common.exception.IdentityException: IdentityObjectType[USER] not present in the store.
    at org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getHibernateIdentityObjectType(HibernateIdentityStoreImpl.java:2586)
    at org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.findIdentityObject(HibernateIdentityStoreImpl.java:659)
    at org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository.findIdentityObject(WrapperIdentityStoreRepository.java:155)
    at org.picketlink.idm.impl.api.session.managers.PersistenceManagerImpl.findUser(PersistenceManagerImpl.java:426)
    at org.exoplatform.services.organization.idm.UserDAOImpl.getPopulatedUser(UserDAOImpl.java:638)
    at org.exoplatform.services.organization.idm.UserDAOImpl.findUserByName(UserDAOImpl.java:283)
    at com.custom.UserManager.createUser()
...
Caused by: org.hibernate.HibernateException: createCriteria is not valid without active transaction
    at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:338)
    at $Proxy214.createCriteria(Unknown Source)
    at org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getHibernateIdentityObjectType(HibernateIdentityStoreImpl.java:2560)
    ... 40 more

Environment

  • JBoss Enterprise Portal Platform (EPP)
    • 5.x

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