My Oracle Support Banner

Updating a Certification Line Item with REST Fails with HTTP error 500: "getSingleResult() did not retrieve any entities." (Doc ID 2711634.1)

Last updated on APRIL 27, 2023

Applies to:

Identity Manager - Version 12.2.1.3.0 and later
Information in this document applies to any platform.

Symptoms

A certification reviewer got the following certification to review containing 3 line items:

 

 

The reviewer wants to certify the entitlement Entitlement2 so he performs the following chain of REST calls

 

.Run a GET on the certifications endpoint to see the certifications he got assigned

 

 

.Using the href associated to the certification task from the previous call http://$OIM_HOST:$OIM_PORT/iam/governance/selfservice/api/v1/certifications/1/tasks/8b3f91f6-51d2-43da-a8ee-9a6c1c20d253 add /lineitems/1 to get all the lineitems associated to the and run a GET

 


 

With the above call the reviewer knows that the line item number associated to Entitlement2 is 2 (see value entityId : 2)

 

Now the reviewer will send the following payload using a PUT to certify Entitlement2:

{
   "lineItemDetails": [
      {
         "entityId": 2,
         "entityType": "Entitlement",
         "action": "certify",
         "fields": [
             {
                "name": "comment",
                "value": "Certified"
              }
          ]
      }
    ]
 }

 

as shown below:

 

The call will fail with:

"title": "getSingleResult() did not retrieve any entities.",
"status": 500,
"detail": "getSingleResult() did not retrieve any entities.",
"instance": "javax.persistence.NoResultException",

 

 

and logs will capture the following stack trace:

[2020-09-16T18:02:05.360-06:00] [XXX] [ERROR] [] [oracle.iam.rest] [tid: [ACTIVE].ExecuteThread: 'XX' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: XXXX] [ecid: XXXX] [APP: oim] [partition-name: DOMAIN] [tenant-name: GLOBAL] [DSID: XXXX] Exception[[

javax.persistence.NoResultException: getSingleResult() did not retrieve any entities.

at org.eclipse.persistence.internal.jpa.QueryImpl.throwNoResultException(QueryImpl.java:981)

at org.eclipse.persistence.internal.jpa.QueryImpl.getSingleResult(QueryImpl.java:531)

at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:400)

at oracle.iam.certification.dao.jpa.JpaUserCertificationDaoImpl.getUserAccountByEntityId(JpaUserCertificationDaoImpl.java:2150)

at oracle.iam.certification.manager.impl.UserCertificationManagerImpl.certifyUserAccount(UserCertificationManagerImpl.java:2033)

at oracle.iam.certification.manager.impl.UserCertificationManagerImpl.certifyUserAccount(UserCertificationManagerImpl.java:2010)

at oracle.iam.certification.impl.CertificationServiceImpl.certifyUserEntitlements(CertificationServiceImpl.java:3829)

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.