OIM Schedule task query

Hi
I have installed two separate weblogic servers (non-cluster) and installed OIM 9101 on them with same Oracle Database. This system does not include any other servers. I am planning to use a hardware load balancer on top of these two OIM Weblogic servers.
I have deployed EBS trusted source recon connector. This connector has a recon schedule task which run at every 6 hrs. It was working fine on single node OIM weblogic pair. Now I have two weblogic servers with corresponding OIM servers. I wonder how the schedule task will work now. which OIM will have the priority ??
any idea about this..

Disable schedule task in one of the servers, so that it does not account for running schedule purposes. Go to xellerate/config/xlConfig.xml
You can find the scheduler section and change the StartOnDeployment parameter to false. SO that this server never runs the scheduler.
Suren- The database is same ! ! !
Thanks
Sunny

Similar Messages

  • OIM - Scheduled Tasks - Validade/Enable

    Hi All,
    I am quite new to OIM, two days working with it, and I have some questions that seem to be easy to answer but I could not find it here, neither on the internet (or I am not using the correct keywords).
    In our OIM environment we have some custom recon scheduled tasks, developed by oracle, and, as our internal processes with the targets are not working properly still, sometimes the scheduled tasks fail and when they fail they got disabled too. Most of the times they fail is because its input file, a CSV file coming from a target, is not there.
    Based on it, my questions are:
    1. I know there is a way to list all scheduled tasks and their status using the API, check this link: http://www.rameshgk.com/blog/2010/09/23/oim-scheduled-task-for-monitoring-other-scheduled-tasks/, but is there a way to do it by command line in Unix?
    2. Is there a way, when the schedulted tasks got disabled due to a failure, to enable it automatically, via API or any other method, without the need to go to web client?
    I was forgetting to comment one thing, unfortunately, I don't have access to the OIM database!
    Thanks for your attention!
    Regards.

    You can execute the scheduled task from the command line and use the following API:
    void updateScheduleTask(long scheduledTaskKey,
    java.util.Map attributes)
    throws Thor.API.Exceptions.tcAPIException,
    Thor.API.Exceptions.tcScheduledTaskNotFoundException,
    Thor.API.Exceptions.tcInvalidAttributeException,
    Thor.API.Exceptions.tcAttributeMissingException,
    tcAPIExceptionUpdates schedule task information based on the attribute that are passed to this method
    Parameters:
    scheduledTaskKey - the scheduled task key
    attributes - a map of updated attributes valid attributes
    •Task Scheduler.ClassName
    •Task Scheduler.Disable
    •Task Scheduler.Frequency Type
    •Task Scheduler.Interval
    •Task Scheduler.Key
    •Task Scheduler.Last Start Time
    •Task Scheduler.Last Stop Time
    •Task Scheduler.Max Retries
    •Task Scheduler.Name
    •Task Scheduler.Next Start Time
    •Task Scheduler.Retry Count
    •Task Scheduler.Start Time
    •Task Scheduler.Status
    You can provide the Frequency Type and Next Start Time and then it should be picked up. Just like when you are in the design console and you have it set to run once and you clear the entries in the time and set it to the current one.
    -Kevin
    Please don't forget to give points where earned on helpful posts.

  • OIM scheduled task

    Hi,
    can we delelte the existing scheduled task in OIM which we have already created or no?
    Thanks

    Yes you can delete scheduled tasks. However, the security level on the attributes might be set to not allow you to delete those. You would have to update the TSA table and remove the TSA_DATA_LEVEL.
    -Kevin

  • OIM schedule task not working properly (error - MISFIRE_INSTRUCTION_RE....)

    Hello,
    we're doing trusted reconciliation from DB and it is implemented through a GTC connector (OIM 10g BP 15).
    After we did a sync of OIM from prod to this environment, we're seeing issue using this related trusted recon scheduled job. Here is the error :
    DEBUG,24 Jan 2012 15:09:12,321,[XELLERATE.SCHEDULER],Loading Scheduled task class com.thortech.xl.scheduler.core.quartz.QuartzWrapperusing ADP classloader
    DEBUG,24 Jan 2012 15:09:12,321,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader entered.
    DEBUG,24 Jan 2012 15:09:12,321,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader left.
    DEBUG,24 Jan 2012 15:09:12,340,[XELLERATE.SCHEDULER],Class/Method: QuartzSchedulerImpl/getQuartzTrigger entered.
    DEBUG,24 Jan 2012 15:09:12,340,[XELLERATE.SCHEDULER],Creating Custom Trigger with StartTime 2012-01-24 with repeat interval of 21600000 secs
    DEBUG,24 Jan 2012 15:09:12,340,[XELLERATE.SCHEDULER],triggerFreq : CUSTOM
    DEBUG,24 Jan 2012 15:09:12,340,[XELLERATE.SCHEDULER],triggerImpl : Trigger 'DEFAULT.MYMDB_GTC': triggerClass: 'org.quartz.SimpleTrigger isVolatile: false calendar: 'null' misfireInstruction: 0
    DEBUG,24 Jan 2012 15:09:12,340,[XELLERATE.SCHEDULER],trigger Misfire instruction : MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_EXISTING_COUNT
    DEBUG,24 Jan 2012 15:09:12,340,[XELLERATE.SCHEDULER],Class/Method: QuartzSchedulerImpl/getQuartzTrigger left.
    DEBUG,24 Jan 2012 15:09:12,340,[XELLERATE.SCHEDULER],MYMDB_GTC trigger is related to DEFAULT.MYMDB_GTC and new job is DEFAULT.MYMDB_GTC
    DEBUG,24 Jan 2012 15:09:12,340,[XELLERATE.SCHEDULER],Scheduling task : MYMDB_GTC with trigger : Trigger 'DEFAULT.MYMDB_GTC': triggerClass: 'org.quartz.SimpleTrigger isVolatile: false calendar: 'null' misfireInstruction: 5
    DEBUG,24 Jan 2012 15:09:12,392,[XELLERATE.SCHEDULER],Loading Scheduled task class com.thortech.xl.scheduler.core.quartz.QuartzWrapperusing ADP classloader
    DEBUG,24 Jan 2012 15:09:12,392,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader entered.
    DEBUG,24 Jan 2012 15:09:12,392,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader left.
    DEBUG,24 Jan 2012 15:09:12,407,[XELLERATE.SCHEDULER],Class/Method: QuartzSchedulerImpl/updateXellerateForTrigger entered.
    DEBUG,24 Jan 2012 15:09:12,407,[XELLERATE.SCHEDULER],Updating Trigger Details: lastStartTime : 2012-01-24 lastStopTime : Tue Jan 24 15:09:12 PST 2012 nextStartTime : 2012-01-24
    DEBUG,24 Jan 2012 15:09:12,411,[XELLERATE.SCHEDULER],LefMethodDebug
    DEBUG,24 Jan 2012 15:09:12,411,[XELLERATE.SCHEDULER],Class/Method: QuartzSchedulerImpl/updateScheduledTask left.
    DEBUG,24 Jan 2012 15:09:14,035,[XELLERATE.SCHEDULER],Loading Scheduled task class com.thortech.xl.scheduler.core.quartz.QuartzWrapperusing ADP classloader
    DEBUG,24 Jan 2012 15:09:14,035,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader entered.
    DEBUG,24 Jan 2012 15:09:14,035,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader left.
    DEBUG,24 Jan 2012 15:09:14,066,[XELLERATE.SCHEDULER],Loading Scheduled task class com.thortech.xl.scheduler.core.quartz.QuartzWrapperusing ADP classloader
    DEBUG,24 Jan 2012 15:09:14,066,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader entered.
    DEBUG,24 Jan 2012 15:09:14,066,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader left.
    INFO,24 Jan 2012 15:09:14,093,[XELLERATE.SERVER],Quartz Executing Scheduled task : MYMDB_GTC
    DEBUG,24 Jan 2012 15:09:14,099,[XELLERATE.SCHEDULER],Class/Method: SchedulerUtil/eventPreInsert entered.
    DEBUG,24 Jan 2012 15:09:14,099,[XELLERATE.SCHEDULER],Class/Method: SchedulerUtil/getSchedulerInstanc left.
    DEBUG,24 Jan 2012 15:09:14,175,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader entered.
    DEBUG,24 Jan 2012 15:09:14,175,[XELLERATE.ADAPTERS],Class/Method: tcADPClassLoader/getClassLoader left.
    Any idea what could be wrong here?
    Thanks,

    Hello,
    I tried "Edit" the GTC connector and "SAVE" the connector back without doing any editing. I hope that will not cause any difference in the deployed corresponding GTC schedule task which used to work earlier.
    Anyways, i also checked the trusted source database and populated some new values in there and tried reconciling again (incremental reconciliation configured). Surprisingly i see some new error in the logs. Is this because of the unnecessary "Edit" operation i performed ?
    ==========================================================================================================
    ERROR,31 Jan 2012 16:22:49,269,[XELLERATE.GC.FRAMEWORKRECONCILIATION],Reconciliation Encountered error:
    java.lang.IllegalArgumentException: Cannot format given Object as a Date
    at java.text.DateFormat.format(DateFormat.java:281)
    at java.text.Format.format(Format.java:140)
    at com.thortech.xl.gc.impl.common.DBFacade.getStringFromSQLObject(Unknown Source)
    at com.thortech.xl.gc.impl.common.DBFacade.retrieveRecord(Unknown Source)
    at com.thortech.xl.gc.impl.common.DBFacade.getRecord(Unknown Source)
    at com.thortech.xl.gc.impl.common.DBFacade.getTargetRecord(Unknown Source)
    at com.thortech.xl.gc.impl.recon.DBReconTransportProvider.getFirstPage(Unknown Source)
    at com.thortech.xl.gc.runtime.GCScheduleTask.execute(Unknown Source)
    at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionAction.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown Source)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)
    DEBUG,31 Jan 2012 16:22:49,270,[XELLERATE.SCHEDULER.TASK],Class/Method: SchedulerBaseTask/setResult entered.
    DEBUG,31 Jan 2012 16:22:49,270,[XELLERATE.SCHEDULER.TASK],Class/Method: SchedulerBaseTask/setResult left.
    WARN,31 Jan 2012 16:22:49,270,[XELLERATE.GC.FRAMEWORKRECONCILIATION],Though Reconciliation Scheduled task has encountered an error, Reconciliation Transport providers have been "ended" smoothly. Any provider operation that occurs during that "end" or "clean-up" phase would have been executed e.g. Data archival. In case you want that data to be a part of next Reconciliation execution, restore it from Staging. Provider logs must be containing details about storage entities that would have been archived
    DEBUG,31 Jan 2012 16:22:49,270,[XELLERATE.SCHEDULER.TASK],Class/Method: SchedulerBaseTask/run left.
    ========================================================================================

  • Copy an OOTB OIM Scheduled Task and Modify

    Hi,
    Anyone successfully copy an OOTB OIM 11g 11.1.1.5.4 Scheduled Task, modify it and create a new scheduled task?

    You may do that. But writing a new scheduled task would be a cleaner solution.
    You may refer to any existing one and write a new sch task.

  • OIM Schedule Task parameter

    Hi,
    Can anyone tell me what is schedule task parameter and its uses?
    Thanks in Advance

    This was discussed not that long ago: API to get list of  Scheduled tasks and their Attributes and values
    Best regards
    /M

  • OIM Scheduled tasks stop running

    Hi All,
    for some reason scheduled tasks are not running even after trying to force it manually
    any ideas would be helpful
    Thanx
    Fred

    Hi ,
    check the log file, to identify why it;s stopping , any exception .
    Also, If you are using oc4j as app server then , you need to give current time+1 min. in start time to allow cronjob trigger your task.
    Regards,
    Ankit

  • OIM Process tasks Query

    Just wondering how the process tasks are related to the process form fields. E.g. where can I map that if the first name on process form is modified, OIM should trigger the 'First Name Changed' process task. I know about USR_PROCESS_TRIGGERS, but I am talking about the task which is mapped to the connector and is responsible for updating data in target application.
    Thanks

    if the first name on process form is modifiedIt triggers First Name Updated. It's architecture of OIM that it triggers 'Label Updated' task when you update Process Form. May be some event handlers are attached. Not sure 100% as didn't search for this.

  • How to Deploy the Scheduler Task OIM 11g

    Hi.
    I have deployed the scheduler task in OIM 11g and also I have configured the Scheduler task in OIM Admin Console. The Java Scheduler class was not invoked when I run the Scheduler task.
    I have done the following configuration to develop and deploy the scheduler task in OIM.
    1) Developing the Java Class File.
    package edu.sfsu.oim11g.scheduler;
    import java.util.HashMap;
    import oracle.iam.scheduler.vo.TaskSupport;
    import edu.sfsu.oim11g.logger.SfsuLogger;
    public class SfsuTrustedSourceReconciliation extends TaskSupport {
         //private Logger logger= Logger.getLogger(SfsuTrustedSourceReconciliation.class);
         private SfsuLogger logger= new SfsuLogger("SFSU-LOGGER");
         private String className=this.getClass().getCanonicalName();
         private String methodName="";
         public SfsuTrustedSourceReconciliation() {
              methodName="SfsuTrustedSourceReconciliation";
              debug("SfsuTrustedSourceReconciliation() Called");
         @Override
         public void execute(HashMap arg0) throws Exception {
              // TODO Auto-generated method stub
              methodName="execute";
              debug("SfsuTrustedSourceReconciliation Arguments "+arg0);
         @Override
         public HashMap getAttributes() {
              // TODO Auto-generated method stub
              return null;
         @Override
         public void setAttributes() {
              // TODO Auto-generated method stub
         private void debug(Object message)
              logger.info(className+" : "+methodName+" : "+message);
    2) Custom Scheduler XML File
    This file is located in
    /home/oracle/confg_files/schedulers/db/SfsuTrustedSourceReconciliation.xml
    <scheduledTasks xmlns="http://xmlns.oracle.com/oim/scheduler">
         <task>
         <name>SfsuTrustedSourceReconciliation</name>
              <class>edu.sfsu.oim11g.scheduler.SfsuTrustedSourceReconciliation</class>
              <description>Reconciliation IDSync Data</description>
              <retry>5</retry>
              <parameters>
                   <string-param required="true" encrypted="false" helpText="Source Data Source">Source Resource Data Source Name</string-param>
                   <string-param required="true" encrypted="false" helpText="Config Data Source">Config Resource Data Source Name</string-param>
                   <string-param required="true" encrypted="false" helpText="Reconciliation Type is Full Or Cincremental. Default is Incremental">Reconciliation Type</string-param>
                   <number-param required="true" encrypted="false" helpText="Max Records" >Max Records</number-param>
              </parameters>
         </task>
    </scheduledTasks>
    3) Plugin File Configuration.
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins>
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="edu.sfsu.oim11g.eventhandlers.SfsuPostProcessEventHandler" version="1.0" name="SfsuPostprocessExtension"/>
    </plugins>
    <plugins pluginpoint="oracle.iam.scheduler.vo.TaskSupport">
    <plugin pluginclass="edu.sfsu.oim11g.scheduler.SfsuTrustedSourceReconciliation" version="1.0" name="SfsuTrustedSourceReconciliation"/>
    </plugins>
    </oimplugins>
    The event handler is successfully deployed and working fine without any issue.
    4) making the scheduler jar file.
    5) Making the scheduler zip with the following directory format.
    plugin.xml
    lib/scheduler.jar
    6) Registering the Schedule task and event handler as a Plugin.
    ant -f pluginregistration.xml register
    7) Importing the SfsuTrustedSourceReconciliation.xml file into the MDS.
    7.1) weblogic.properties
    wls_servername=oim_server1
    application_name=oim
    metadata_from_loc=/home/oracle/configfiles/schedulers
    7.2) Running the weblogicImportMetadata.sh file
    It imported the SfsuTrustedSourceReconciliation.xml file into the MDS Schema and it is available in the MDS_PATH table in MDS schema
    Path_Name : SfsuTrustedSourceReconciliation.xml
    PATH_FULL : /db/SfsuTrustedSourceReconciliation.xml
    8) Imported the EventHandlers.xml file into the MDS Schema.
    9) Run the PurgeCache.sh file
    10) Restarted the OIM Server.
    11) Loggin into the OIM Admin Console and Created the Scheduler job based on the SfsuTrustedSourceReconciliation listed in the scheduler.
    12) Run the Scheduler job and log file entries are not logged into the log file. My Log File Configuration
    <log_handler name='sfsu-handler' level='FINEST' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
    <property name='logreader:' value='off'/>
    <property name='path' value='/u01/app/wl-10.3.5.0/Oracle/Middleware/user_projects/domains/oim_domain/servers/oim_server1/logs/sfsu-connector.log'/>
    <property name='format' value='ODL-Text'/>
    <property name='useThreadName' value='true'/>
    <property name='locale' value='en'/>
    <property name='maxFileSize' value='5242880'/>
    <property name='maxLogSize' value='52428800'/>
    <property name='encoding' value='UTF-8'/>
    </log_handler>
    <logger name="SFSU-LOGGER" level="FINEST" useParentHandlers="false">
    <handler name="sfsu-handler"/>
    <handler name="console-handler"/>
    </logger>
    Is there any special configuration Do i need to do invoke my Scheduler Java Class File.
    Help is Greatly Appreciated.

    Seems like you did it all right but just piece which if you can modify and test. The plugin.xml has two artifacts eventhandler and the schduler. Can you try creating separate plugin.xml with one for the scheduler zipped up with /lib/scheduleClass.jar and test it?
    Just deregister everything before trying it and let us know how it goes.
    Also the logger as I see is a custom logger, so it is extending the OOTB Logger? Just put some sysouts in the code and check for those in the server out file to be sure.
    Edited by: bbagaria on Jul 22, 2011 5:15 PM

  • Schedule task not working in OIM11gr2

    Hi Experts,
    I have coded a schedule task, using the plugin approach, the steps i have followed are:
    1. Created the custom code jar
    2. Created plugin.xml
    the above 2 files are added in plugin and registerd in OIM
    3. Created the task.xml and registered in MDSWhile creating the job i could see it shows up in the tasks but when i executed thejob it is giving me below error:
    I tried putting it in using UploadJars.sh utility and placed thejar in schedule tasks folder but did not work.
    An error occurred while loading the plugin class. Class null was not found.
    Please provide help this is really urgent!!
    thanks

    This is how my Task.xml (MDS file) looks
    <?xml version='1.0' encoding='UTF-8'?>
    <scheduledTasks xmlns="http://xmlns.oracle.com/oim/scheduler">
    <task>
    <name>RIMReconTask</name>
    <class>com.abc.iam.customtask.rim.RIMReconST</class>
    <description>This scheduled task will reconcile the RIM profile to the OIM users</description>
    <retry>0</retry>
    <parameters>
    <string-param required="true" helpText="User Login">User Login</string-param>
    <string-param required="true" helpText="User Status">User Status</string-param>
    <string-param required="true" helpText="Resource Object">Resource Object</string-param>
    </parameters>
    </task>
    </scheduledTasks>
    I have removed the plugin file completely. I have validated that class path and name it is the same as com.abc.iam.customtask.rim.RIMReconST
    I have registered the jar in OIM database using UploadJars.sh utility.
    I get the following error:
    An error occurred while loading the plugin class. Class null was not found.
    Dont know what is wrong here !!

  • Specifying which node a scheduled task runs on

    In a clustered weblogic environment is there a way to tell OIM to run a scheduled task on a specific node. So for example let's say I want the AD UserTarget Recon to always only run on node1. Is there a task schedule attribute or something that controls this? Thanks in advance.

    As idmgod said, there is no way of specifying this. But you can definitely enable the schedule task only on one node. If sometime your OIM shifts to other node in the cluster, you need to manually change the settings so that your schedule task is not impacted.
    You may refer the following thread for configuring the scheduled task to run on one node only:
    OIM Schedule task query

  • How to use DB queries inside a schedule task - OIM

    Hello Experts,
    I am trying to create an UDF from a schedule task by directly inserting into table.
    1. Insert a record into Table SDC for the new UDF
    2. Alter table USR for the new UDF (After inserting into SDC)
    When I run the task it inserts a record into SDC table and throws below error when it tries to alter the USR table but same query works in SQL Plus.
    Alter Query -- ALTER TABLE USR ADD (USR_UDF_UID  varchar2(50))
    ERROR,12 Sep 2011 14:04:29,509,[XELLERATE.DATABASE],Class/Method: tcDataBase/writeStatement encounter some problems: Invalid column index
    java.sql.SQLException: Invalid column index
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:403)
    at oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:5007)
    at oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:4997)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.setString(OraclePreparedStatementWrapper.java:277)
    at weblogic.jdbc.wrapper.PreparedStatement.setString(PreparedStatement.java:745)
    at com.thortech.xl.dataaccess.tcDataBase.writePreparedStatement(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.writePreparedStatement(Unknown Source)
    at com.thortech.xl.ejb.databeansimpl.tcDataBaseBean.writePreparedStatement(Unknown Source)
    at com.thortech.xl.ejb.beans.tcDataBase_vhi04i_EOImpl.writePreparedStatement(tcDataBase_vhi04i_EOImpl.java:4280)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
    at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
    at $Proxy59.writePreparedStatement(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBaseClient.writePreparedStatement(Unknown Source)
    at com.thortech.xl.dataobj.PreparedStatementUtil.executeUpdate(Unknown Source)
    at com.test.TestUtility.createUDF(TestUtility)
    at com.test.TestUtility.execute(TestUtility)
    at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionAction.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown Source)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)
    ERROR,12 Sep 2011 14:04:29,569,[XELLERATE.DATABASE],Class/Method: tcDataBaseClient/writePreparedStatement encounter some pr
    com.thortech.xl.orb.dataaccess.tcDataAccessException
    at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.createException(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.writePreparedStatement(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.writePreparedStatement(Unknown Source)
    at com.thortech.xl.ejb.databeansimpl.tcDataBaseBean.writePreparedStatement(Unknown Source)
    at com.thortech.xl.ejb.beans.tcDataBase_vhi04i_EOImpl.writePreparedStatement(tcDataBase_vhi04i_EOImpl.java:4280)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
    at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
    at $Proxy59.writePreparedStatement(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBaseClient.writePreparedStatement(Unknown Source)
    Code:
    String insertQry = "INSERT INTO SDC () VALUES (?,?.,,,,)"
              prepareStmtUtil = new PreparedStatementUtil();
              prepareStmtUtil.setStatement( getDataBase() , insertQry );
              prepareStmtUtil.setString(1, SDC_NAME);
    prepareStmtUtil.executeUpdate();
              int rc = prepareStmtUtil.getRowsUpdated();
              if (rc == 1)
    String alterQry = "ALTER TABLE USR ADD ("+SDC_NAME+" varchar2("+SDC_SQL_LENGTH+"))";
                   prepareStmtUtil.setStatement( getDataBase() , alterQry );
                   prepareStmtUtil.executeUpdate(); --> throws exception here
    Kindly assist me.
    Thanks and Regards
    INIYA

    I am trying to create an UDF from a schedule task by directly inserting into table.This is altering DB schema, not inserting into a table, that are you trying to do. DDL operations are not supported in PrepareStatementUtil. Moreover, I'm almost sure the DDL operations are not allowed for operational db connection.
    Use OIM API (ConfigManager) if you want to manipulate UDF.
    Regards,
    Vladimir

  • Security Violation Error while running schedule task from OIM.

    Hi All,
    I am getting this error while running a custom java schedule task from OIM:
    *Thor.API.Exceptions.tcAPIException [EJB:010160] Security Violation: User '<anonymous>' has insufficient permission to access EJB:*
    type=<ejb>,application=Xellerate,module=xlDataObjectBeans.jar,ejb=tcReconciliationoperations,method=createDeleteReconciliationEvent
    at Thor.API.Operations.tcReconciliationOperationsClient.createDeleteReconciliationEvent(UnKnown Source).
    I got this error as soon as my code start creating Delete Reconciliation Event.
    Note: I have already protected the JNDI Namespace.
    Please provide some pointers.
    Regards,
    Sunny

    Hi Rajiv,
    Check this:
    package com.centrica.iam.scheduletask;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileFilter;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.HashMap;
    import java.util.Hashtable;
    import java.util.Iterator;
    import java.util.Set;
    import oracle.iam.connectors.common.ConnectorLogger;
    import com.thortech.xl.dataaccess.tcDataSet;
    import com.thortech.xl.dataaccess.tcDataSetException;
    import com.thortech.xl.dataobj.PreparedStatementUtil;
    import com.thortech.xl.orb.dataaccess.tcDataAccessException;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    import Thor.API.tcResultSet;
    import Thor.API.Exceptions.tcAPIException;
    import Thor.API.Exceptions.tcInvalidValueException;
    import Thor.API.Operations.tcLookupOperationsIntf;
    import Thor.API.Operations.tcReconciliationOperationsIntf;
    import Thor.API.Operations.tcSchedulerOperationsIntf;
    public class CustomFlatFile extends SchedulerBaseTask {
         private static tcSchedulerOperationsIntf schedulerIntf;
         private static tcLookupOperationsIntf lookupIntf;
         private static tcReconciliationOperationsIntf reconIntf;
         String sObjectName;
         String LookupName;
         String LookupName2;
         String FileDirectory;
         String FileName;
         String File;
         String delimeter;
         String isDeleteTrue;
         HashMap<String, String> attrMap = new HashMap();
         HashMap<String, String> delMap = new HashMap();
         HashMap<String, String> finalMap = new HashMap();
         ArrayList list = new ArrayList();
         public boolean isReconStopped;
         public CustomFlatFile()
              isReconStopped = false;
         public void init()
              LookupName = getAttribute("Attribute Lookup Name");
              FileDirectory = getAttribute("Directory Path");
              FileName = getAttribute("File Name");
              delimeter = getAttribute("Delimeter");
              sObjectName = getAttribute("Resource Object Name");
              isDeleteTrue = getAttribute("Is Delete Allowed");
         public void execute(){
              try {
                   System.out.println("Start Exceute");
                   //Initiate lookupIntf
                   lookupIntf = (tcLookupOperationsIntf)getUtility("Thor.API.Operations.tcLookupOperationsIntf");
                   reconIntf=(tcReconciliationOperationsIntf)getUtility("Thor.API.Operations.tcReconciliationOperationsIntf");
                   catch (tcAPIException tcapiexception){
                        tcapiexception.printStackTrace();
                        //logger.error(classname, s, tcapiexception.toString());
                        //logger.setStackTrace(tcapiexception, classname, s, tcapiexception.getMessage());
                   catch (Exception excep){
                        excep.printStackTrace();
                        //logger.error(classname, s, excep.toString());
                        //logger.setStackTrace(excep, classname, s, excep.getMessage());
                   attrMap = readLookup(LookupName);
                   System.out.println(attrMap.toString());
                   readFile();
                   if (isDeleteTrue.equalsIgnoreCase("true"))
                        performDelete();
                   System.out.println("Finish Execute");
         public void performDelete()
              System.out.println("Start Perform delete");
              int k = list.size();
              System.out.println("list size " + list.size());
              try
                   Thread.sleep(15000);
         /*     Hashtable ahashtable[] = new Hashtable[k];
              Hashtable hashtable = new Hashtable();
              for (int i=0;i<k;i++)
                   hashtable.put("User Id", list.get(i));
                   ahashtable[i] = hashtable;
                   System.out.println(list.get(i));
              Set set = reconIntf.provideDeletionDetectionData(sObjectName, ahashtable);
              System.out.println("Set--" + set.toString());
              tcResultSet tcresultset = reconIntf.getMissingAccounts(sObjectName, set);
              System.out.println("tcresultset - " + tcresultset.getRowCount());
              if (!(tcresultset.isEmpty()))
                   long l[] = reconIntf.deleteDetectedAccounts(tcresultset);
                   for (int i1=0;i1<l.length;i1++)
                        System.out.println("delete recon key " + l[i1]);
              //Get the existing list of Managed users
                   tcDataSet tcdataset = new tcDataSet();
                   tcDataSet tcdataset1 = new tcDataSet();
                   String query = "select orf.orf_fieldname,prf.prf_columnname, sdk.sdk_name from orf, sdk, pkg, tos, prf, obj " +
                             "where pkg.obj_key = obj.obj_key and pkg.pkg_key = tos.pkg_key and tos.sdk_key is not null " +
                             "and tos.sdk_key=sdk.sdk_key and tos.tos_key=prf.tos_key and prf.prf_iskey='1' and prf.orf_key=orf.orf_key " +
                             "and orf.orf_parent_orf_key is null and obj.obj_name='" + sObjectName + "'";
                   tcdataset.setQuery(getDataBase(), query);
                   tcdataset.executeQuery();
                   String FFName = tcdataset.getString("prf_columnname");
                   String FName = tcdataset.getString("sdk_name");
                   String ROFName = tcdataset.getString("orf_fieldname");
                   System.out.println("form- " + FName + " Field- " + FFName);
                   query = "select " + FFName + " from " + FName + " udtable, oiu a, ost b " +
                             "where udtable.orc_key=a.orc_key and a.ost_key=b.ost_key and b.ost_status!='Revoked'";
                   System.out.println(query);
                   tcdataset1.setQuery(getDataBase(), query);
                   tcdataset1.executeQuery();
                   int i = tcdataset1.getRowCount();
                   ArrayList list1 = new ArrayList();
                   String s1 = null;
                   System.out.println("N. of rows--" + i);
                   for (int j=0;j<i;j++)
                        tcdataset1.goToRow(j);
                        s1 = tcdataset1.getString(0);
                        System.out.println("s1---" + s1);
                        if (!(list.contains(s1)))
                             list1.add(s1);
                             System.out.println("under if--" + s1);
                   //Getting the existing list of unmanaged users
                   query = "select distinct (b.rcd_value) from rce a, rcd b, orf c, obj d where a.rce_key=b.rce_key and " +
                             "b.orf_key=c.orf_key and c.orf_fieldname='" + ROFName + "' and a.rce_status!='Event Linked' " +
                                       "and a.obj_key = d.obj_key and d.obj_name='" + sObjectName + "'";
                   tcdataset1.setQuery(getDataBase(), query);
                   tcdataset1.executeQuery();
                   i = tcdataset1.getRowCount();
                   System.out.println("No. Of Unmanaged Users " + i);
                   for (int j=0;j<i;j++)
                        tcdataset1.goToRow(j);
                        s1 = tcdataset1.getString(0);
                        System.out.println("s1---" + s1);
                        if (!(list.contains(s1)))
                             list1.add(s1);
                             System.out.println("under if--" + s1);
                   int k1 = list1.size();
                   System.out.println("list1 size--" + k1);
                   for (int j1=0;j1<k1;j1++)
                        delMap.clear();
                        delMap.put(ROFName, (String)list1.get(j1));
                        System.out.println(delMap.toString());
                        long l = reconIntf.createDeleteReconciliationEvent(sObjectName, delMap);
                        System.out.println("delete recon key--- " + l);
              catch (Exception exception)
                   exception.printStackTrace();
         public void readFile(){
              String s = "readFile()";
              //logger.setMethodStartLog(classname, s);
              HashMap map = new HashMap();
              try {
              File = getFile();
              BufferedReader reader = new BufferedReader(new FileReader(new
                        File(File)));
              String line = "";
              int k = attrMap.size();
              String value[] = new String[k];
              String Header[]= new String[k];
              if (delimeter.equalsIgnoreCase("|"))
                   delimeter = "\\" + delimeter;
                   line = reader.readLine();
                   Header = line.split(delimeter);
                   while((line = reader.readLine()) != null)
                        value = line.split(delimeter);
                        k = value.length;
                        for (int i = 0;i<k;i++){
                             finalMap.put(attrMap.get(Header), value[i]);
                        System.out.println(finalMap.toString());
                        System.out.println("Start Ignoring Event");
                        if (!(reconIntf.ignoreEvent(sObjectName, finalMap)))
                             System.out.println("Not Ignored");
                        long l1 = reconIntf.createReconciliationEvent(sObjectName, finalMap, true);
                        System.out.println("Recon Key--" + l1);
                        else
                             System.out.println("ignore event ---" + finalMap.toString());
                        list.add(finalMap.get("User Id"));
                        System.out.println(list.size() + "add--" +finalMap.get("User Id") );
                        finalMap.clear();
              catch (Exception exception)
                   exception.printStackTrace();
         public boolean stop(){
              String s = "stop()";
              //logger.setMethodStartLog(classname, s);
              //logger.info(classname, s, "Stopping Reconciliation........");
              isReconStopped = true;
              //logger.setMethodFinishLog(classname, s);
              return true;
         FileFilter fileFilter = new FileFilter()
         public boolean accept(File file)
         String sFilePath = file.getName();
         if( sFilePath.startsWith(FileName) )
         return true;
         else
         return false;
         public String getFile() throws FileNotFoundException, Exception{
              String s = "getFile()";
              //logger.setMethodStartLog(classname, s);
              String s1;
              File dir =     new File(FileDirectory);
              File[] files = dir.listFiles(fileFilter);
              if (files.length ==0)
                   throw new FileNotFoundException();
              if (files.length>1)
                   throw new Exception("Multiple Matches found for this file name");
              s1 = files[0].toString();
              //logger.setMethodFinishLog(classname, s);
              return s1;
         public HashMap readLookup(String s1){
              String s = "readLookup()";
              //logger.setMethodStartLog(classname, s);
              HashMap map = new HashMap();
              try {
              tcResultSet tc1=     lookupIntf.getLookupValues(s1);
              int i = tc1.getRowCount();
              for (int j = 0;j<i;j++){
                   tc1.goToRow(j);
                   map.put(tc1.getStringValue("Lookup Definition.Lookup Code Information.Code Key"), tc1.getStringValue("Lookup Definition.Lookup Code Information.Decode"));
              catch (tcAPIException tcapiexception){
                   tcapiexception.printStackTrace();
                   //logger.error(classname, s, tcapiexception.toString());
                   //logger.setStackTrace(tcapiexception, classname, s, tcapiexception.getMessage());
              catch (Exception excep){
                   excep.printStackTrace();
                   //logger.error(classname, s, excep.toString());
                   //logger.setStackTrace(excep, classname, s, excep.getMessage());
              return map;

  • Not able to create Schedule Task in OIM 9.1.0.2

    Hi,
    I created one Java program and created Jar file. Then placed in Schduled Task folder.
    When I try to create one Schedule Task in OIM web console, I am not able to see the Class File name in the list.
    Please let me know what could be the reason for this.
    Thansk for your help.

    In OIm Web console, there is one serach where we can serach the required class file. I am not able to see the class file in the list where as I am able to see other class files for other scheduled Tasks.
    But I am not able to see my Class file.
    When I try to paste the full class file path in Design Console, It gives an error saying No database read.
    This is very urgent for me to create the scheduled Task.
    Any idea??

  • Schedule task - manager updation for user in oim 11g

    Hi,
    I am in the way of writing a custom schedule task to update manager for the user created in oim.
    I know the procedure of custom scedule task
    I want the code snipet to be written in the execute() method of java class to update the manager for the user
    Could anybody help me with this!

    Hi Gyanprakash,
    How will you retrieve the user detail ..?? i am getting null pointer exception error
    public void execute(HashMap taskParameters) {
    System.out.println("inside the Execute methode");
    System.out.println("Schedule task Arguments "+taskParameters);
    String userId = (String)taskParameters.get("User Login");
    System.out.println("===========input=============== "+userId);
    String passwordex=taskParameters.get("usr_pwd_expire_date").toString();
    System.out.println("===========input=============== "+passwordex);
    String passwordwar=taskParameters.get("usr_pwd_warn_date").toString();
    System.out.println("===========input=============== "+passwordwar);
    Thanks,
    Edited by: Srivatsa.kashyap on May 25, 2012 6:00 AM

Maybe you are looking for