Insufficient Privilege to Create Any Object With Agileuser Account in Scheduled Event PX

(Doc ID 1516370.1)

Last updated on JULY 09, 2017

Applies to:

Oracle Agile PLM Framework - Version and later
Information in this document applies to any platform.
***Checked for relevance on 23-Jul-2014***


When attempting to create any type of object in scheduled Event PX,
the following error occurs.

Error code : 407
Error message : Insufficient privilege.
Root Cause exception : com.agile.util.exception.CMAppException: Insufficient privilege.
  at com.agile.api.pc.Session.createError(
  at com.agile.api.pc.Session$CreateObjectAction.doSdkAction(
  at com.agile.api.common.Security.doAs(
  at com.agile.api.common.Security.doAs(
  at com.agile.api.pc.Session.createObject(
  at sr36595629681.SchedueldEventPX.doAction(
  at com.agile.px.Extensions2$PXEventActionNode.invoke(
  at com.agile.px.Extensions2.doCustomPXEvent(
  at com.agile.px.Extensions2.invokeAction(
  at com.agile.px.PxSessionBean.invokeAction(
  at com.agile.px.com_agile_px_PxSession_l8vd22_EOImpl.invokeAction(
  at com.agile.soa.event.handler.PXInitiator.invoke(
  at com.agile.soa.event.listener.PXListener$

The issue can be reproduced at will with the following steps:
1. Code Event PX like below.
public class SchedueldEventPX implements IEventAction {

public EventActionResult doAction(IAgileSession sess, INode arg1,
IEventInfo arg2) {
IAdmin admin;
String result;
try {
admin = sess.getAdminInstance();
IAgileClass cls = admin.getAgileClass(TransferOrderConstants.CLASS_CTO);

IAutoNumber[] autoNumbers = cls.getAutoNumberSources();
String nextAutoNumber = autoNumbers[0].getNextNumber();

// create a transfer order
ITransferOrder cto = (ITransferOrder) sess.createObject(
TransferOrderConstants.CLASS_CTO, nextAutoNumber);
result = "ok";
} catch (APIException e) {
// TODO Auto-generated catch block
result = e.getMessage();

return new EventActionResult(arg2, new ActionResult(ActionResult.STRING, result));


2. Setup Scheduled Event Subscriber in JavaClient

3. Leave Role blank in Event Handler

4. When the Event PX executes, error occurs in Server log and Event Handler Monitor shows: Insufficient privilege.


Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms