Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-20165

REST API endpoint lookup failing in APS after recreating an endpoint with identical name

    Details

    • Bug Priority:
      Category 2
    • ACT Numbers:

      00981582

    • Premier Customer:
      Yes

      Description

      When a REST endpoint in APS is deleted, the entries are not deleted from the DB. Instead they are marked as deleted and the entry is kept in the database. However it is removed from the endpoint UI in APS.

      Since a deleted entry is not show in the UI, a user is not aware of the existence of an endpoint with that name! So, if another endpoint is created with the same name, APS processes are returning the exception "javax.persistence.NonUniqueResultException: result returns more than one elements" in the REST call and processes get stuck at the REST call task!

      The code where this is failing is EndpointServiceImpl.java -> getConfigurationByName(name)

      Steps to reproduce the issue 

      1. Create a simple process with a REST call task. 
      2. Configure the REST call task to use an endpoint defined under Identity Management -> Tenants -> Endpoints 
      3. Publish the app and run the process. Make sure that the process runs end-end 
      4. Now delete the endpoint by going to Identity Management -> Tenants -> Endpoints 
      5. Re-create the endpoint using the same name 
      6. Go back to the process and select the endpoint, save and republish the app 
      7. Run the process once more

      Expected behaviour
      Process runs to the end without any issues and errors in logs.

      Current behaviour
      Process is stuck at the REST call task with an error "javax.persistence.NonUniqueResultException: result returns more than one elements"

      Workaround
      Delete the entry that is marked as "deleted" from the database table ENDPOINT_CONFIGURATION so that the endpoint is unique in the database.

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  dgruber Doug Gruber
                  Reporter:
                  cjoseph Ciju Joseph
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Structure Helper Panel