10 Replies Latest reply: Jan 2, 2013 7:42 AM by 958133 RSS

    Schedule task not working in OIM11gr2

    958133
      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 MDS
      While 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
        • 1. Re: Schedule task not working in OIM11gr2
          Durgaprasad
          Please dont use the plugin approach. use the following approach.


          1. Place jar at <OIM_HOME>/server/ScheduledTask folder. No need to zip and register as plugin.Instead you can use UploadJars.bat utility to upload it for production But for testing just put at file system that’s enough. But, make sure you have this jar at only one place.

          2. Place xml somewhere inside tmp/db/SetManagerScheduledTask.xml

          3. Update weblogic.properties for below parameter

          wls.servername=oim_server1 (name of your managed/oim server)
          Application_name=OIMMetadata
          From_location= till tmp (ex: C:/tmp)

          4. Make sure you have set the environment variable.
          OIM_ORACLE_HOME
          WL_HOME
          MW_HOME

          5. Go to <OIM_HOME>/server/bin and run below command
          weblogicImportMetadata.bat
          username: weblogic
          password: Admin/weblogic console password
          url: t3://<Admin server Hostname or IP>:<Admin/weblogic port>

          6. restart oim

          Refer this link :

          Re: Custom Schedule task in 11gR2
          • 2. Re: Schedule task not working in OIM11gr2
            958133
            Thanks for your reply, I have tested by removing the plugin.zip and Uploading the jar in OIM.
            But no luck!!. Do i need to give SOA restart also, or also weblogic bounce??
            • 3. Re: Schedule task not working in OIM11gr2
              Durgaprasad
              No need to restart SOA server. what is the error you are getting now?
              • 4. Re: Schedule task not working in OIM11gr2
                Nishith Nayan
                remove plugin. and run PurgeCache.sh all. No need of SOA restart.

                make sure the class name given along with package name in ScheduledTask xml. and put jar at one place only. If you have uploaded using UploadJars utility. better remove from the Filesystem(Scheduled Task folder)
                • 5. Re: Schedule task not working in OIM11gr2
                  958133
                  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 !!
                  • 6. Re: Schedule task not working in OIM11gr2
                    Durgaprasad
                    I hope you have created your own custom xml file for scheduled task and imported it into the MDS.

                    In 11gR2 developer's guide it is given as
                    You can modify the task.xml file located in the /db namespace of Oracle Identity Manager MDS schema, or you can create a custom scheduled task file. If you create a custom file, then the file name must be the same as the scheduled task name, with the .xml extension. You must import the custom scheduled task file to the /db namespace of Oracle Identity Manager MDS schema.

                    So please alter the name of your xml file as accordingly. In your case you can give the name as RIMReconST.xml and import it into MDS using the utility.

                    Please do all the steps again from scratch and restart the OIM server and try to create the scheduled task in the console. It worked perfectly for me this way.
                    • 7. Re: Schedule task not working in OIM11gr2
                      958133
                      Thanks, This seems to be helpful, I try this before marking to correct. !! thanks
                      • 8. Re: Schedule task not working in OIM11gr2
                        958133
                        Hello, Can anybody share with me some example coding for Schedule task 11gR2. Actually I was using 10g API's perhaps that might also help.
                        Please share! thanks
                        • 9. Re: Schedule task not working in OIM11gr2
                          idamGod
                          Detailed steps are given in my blog to develop a custom schedule task in R2.

                          Have a look.

                          http://srini-bellamkonda.blogspot.com/2012/12/developing-custom-schedule-task-in-oim.html
                          • 10. Re: Schedule task not working in OIM11gr2
                            958133
                            Yes it worked finally!!
                            I changed the task.xml to the name of the class file and changed my code to latest API of 11g. Thanks guys for this great help!!