Removal of the model of the application via the API - 11 g

Hi all

I try to delete a query template customized via API but is "outdated data Exception error".

Code:
{} public static void deleteCustomRequestTemplate (long requestTemplateKeyValue)
System.out.println ("inside deleteCustomRequestTemplate");
OIMClient oimClient = null;
try {}
oimClient = Utility.getConnection ();
RequestTemplateService requestTemplateService = (RequestTemplateService.class) oimClient.getService;
System.out.println ("before you remove the request template');
requestTemplateService.deleteTemplate (requestTemplateKeyValue, new Timestamp (new Date () .getTime ()));
System.out.println ("application model has been deleted");
} catch (StaleDataException sde) {}
sde.printStackTrace ();
} catch (Exception e) {}
e.printStackTrace ();
}
}

Error:
oracle.iam.platform.kernel.StaleDataException: stale data while editing or deleting the ID 123 of the application model.
at oracle.iam.request.repository.RequestTemplateManager.verifyStaleData(RequestTemplateManager.java:567)
at oracle.iam.request.repository.RequestTemplateManager.deleteTemplate(RequestTemplateManager.java:495)
at oracle.iam.request.impl.RequestTemplateServiceImpl.deleteTemplate(RequestTemplateServiceImpl.java:57)
at oracle.iam.request.api.RequestTemplateServiceEJB.deleteTemplatex (unknown Source)


It means I have to restart my DB server or am I in the wrong way?

Hello

Here is the code under test, it worked fine:

RequestTemplateService requestTemplateService = (RequestTemplateService.class) oimClient.getService;
RequestTemplate requestTemplate = requestTemplateService.getTemplate ("Testing");
System.out.println ("before you remove the request template');
System.out.println ("last modified Time" + requestTemplate.getLastUpdatedTimestamp ());
requestTemplateService.deleteTemplate (requestTemplate.getId (), requestTemplate.getLastUpdatedTimestamp ());
System.out.println ("successfully removed ::");

Kind regards
Raghav.

Tags: Fusion Middleware

Similar Questions

Maybe you are looking for

  • the HP z230 sm bus controller error

    Hi Forum,I write the following question... I noticed a yellow exclamation next to my computer in the devices menu. I tried to update the driver and to help out... but nothing helps. I reinstalled the chipset driver and the drive of the AMT without su

  • Mail.app encryption does not work in El Capitan

    I've been encryption of e-mails between colleagues and had years of this work on all OS x versions and it still works on the iPhone. However, I bought a new 12 "and did a fresh install and now cannot operate on El Capitan. My certificate is in Keycha

  • VISTA HOME PREMIUM COMPATIBLE OR NOT

    CAN I DOWNLOAD AND USE THE NEW WINDOWS MEDIA PLAYER 12 ON MY VISTA HOME PREMIUM OPERATING SYSTEM

  • Does the HP 2311gt 23 "3D LED monitor support 120 Hz refresh rate?

    I just want to know if the HP 23 inch diagonal screen 3D LED 2311gt supports 120hx refresh rate. I couldn't find anything in the specifications of the product, so I asked here. The data sheet says nothing at 120 Hz, but 3D monitors usually support 12

  • Messed up computer volume!

    For awhile now, sometimes when I start my computer (Windows 7 Home Premium) it will work very well so I'll do something with audio, like reading a video and the video does not play. Hey... I start a game. No sound. I check the settings. 100% for the