Custom Pre Process Event Handler in OIM 11g for middle initials

Hi,
I am trying to congiure a Custom Pre Process Event Handler for generating middle name in OIM 11g and I am following the steps as given in metalink ID: *1262803.1*
Even after successfully performing all the steps I am not able to get the middle initials in Admin Console when I create a new user.
1) Directory structure for the application that I have created through JDeveloper.
CustomApplication/
|-- CustomApplication.jws
`-- CustomProject
|-- CustomProject.jpr
|-- classes
| `-- com
| `-- example
| `-- custompph
| `-- CustomPreProcessEventHandler.class
`-- src
`-- com
`-- example
`-- custompph
`-- CustomPreProcessEventHandler.java
2) Directory structure for Plugins directory
My Plugin.xml :
<?xml version="1.0" encoding="UTF-8" ?>
<oimplugins>
<plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
<plugin pluginclass="com.example.custompph.CustomPreProcessEventHandler"
version="1.0" name="CustomPreProcessEventHandler" />
</plugins>
</oimplugins>
plugin/
|-- lib
| `-- com
| `-- example
| `-- custompph
| `-- CustomPreProcessEventHandler.class
|-- middlename.zip
`-- plugin.xml
Copied the middlename.zip in the plugin folder in OIM_HOME and registered it successfully.
3) Created a EventHandlers file and imported it successfully using importmetadata.
My EventHandlers.xml:
<?xml version='1.0' encoding='utf-8'?>
<eventhandlers>
<!-- Custom preprocess event handlers -->
<action-handler
class="com.example.custompph.CustomPreProcessEventHandler"
entity-type="User"
operation="CREATE"
name="CustomPreProcessEventHandler"
stage="preprocess"
order="10"
sync="TRUE"/>
</eventhandlers>
I checked the logs as well but could not find something which can help me to proceed.
Also please advise is their any mapping that I need to do in *"Design Console"*
Please advise !!!!!
Thanks

My lib file contains the package as mentioned in the metalink.
Heirarchy in Plugin folder :
1) plugin.xml
2) Lib ( lib contains 3 folders : com/example/custompph; And inside custompph is my CustomPreProcessEventHandler.class file)
You mean to say i should not copy the entire package in lib but only the jar file of the CustomPreProceessEventHandler.class* file.
If i put only a .jar file in lib i get the following error.
"Error occured during the use of plugin registering utility. The plugin zip does not contain the definition of plugin class com.example.custompph.CustomPreProcessEventHandler"
Thanks
Edited by: 870050 on Jul 4, 2011 4:30 AM

Similar Messages

  • OIM 11g Pre Process event handler

    Hi All,
    I had built a pre process event handler to generate userid and it was working fine. But i had slight modifications in the code. When i unregistered the old event handler and registered a new one, oim was still picking the old event handler. So in order to bring the code changes into effect, i restarted the managed server after which the event handlers are not getting triggered(even the old one).
    I deleted all the records corresponding to the custom event handlers from MDS_PATHS,PLUGINS,LATEST_PLUGIN AND PLUGIN_ZIP tables and registered the handler again and also imported the event handler xml file. But still the plugin is not triggered.
    Please help.
    Thanks,
    Bhavana
    Edited by: 858491 on Jul 21, 2011 5:14 AM

    My lib file contains the package as mentioned in the metalink.
    Heirarchy in Plugin folder :
    1) plugin.xml
    2) Lib ( lib contains 3 folders : com/example/custompph; And inside custompph is my CustomPreProcessEventHandler.class file)
    You mean to say i should not copy the entire package in lib but only the jar file of the CustomPreProceessEventHandler.class* file.
    If i put only a .jar file in lib i get the following error.
    "Error occured during the use of plugin registering utility. The plugin zip does not contain the definition of plugin class com.example.custompph.CustomPreProcessEventHandler"
    Thanks
    Edited by: 870050 on Jul 4, 2011 4:30 AM

  • OIM 11.1.1.5.0 - Pre process event handler

    Hi everyone, I'm trying to configure a preprocess event handler to automate email and user login when I click on "create user".
    I mean when I want to create a new user, I just want to fill the first name, the last name, the organization and the type and this preprocess will fill automatically the email and the user login fields. I don't know if it's possible or not with an event handler ?
    Thanks
    Thibault

    If you want this event handler only for manual user creation using UI then you can go with pre-process event handler. The advantage you get is, no need of refereshment. once user created email and user login field will be visible. But in case of post process you have to refresh it manaually. Yes, you have to use post process event handler if the same field you want to populate on Trusted recon as well. Beacause, Pre- process doesn't work with Trusted recon.
    Hope above will help you to decide for pre or post to use.
    Now, for registering plugin. Don't put jar in the zip, you have to place .class in case of event handler. jar we use for scheduled task. place your class file like below and zip
    lib/*package structure folder*/EmailLoginAuto.class
    ie lib/com/test/eventhandler/EmailLoginAuto.class
    for importing eventhandler.xml put it anywhere in your directory structure
    ex: /tmp/db/eventhandler.xml
    and update the from_location as /tmp in weblogic.properties
    --nayan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Help needed in implementing validation event handler in OIM 11g

    Hello experts,
    I am trying to set username policy by implementing a validation event handler in OIM 11.1.1.5.
    Following are the steps followed
    1. Import metadata
    Created a file called Eventhandler.xml as below and imported using weblogicImportmetadata.sh
    <?xml version='1.0' encoding='UTF-8'?>
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
    <validation-handler class="test.iam.eventhandlers.CustomValidationEventHandler" entity-type="User" operation="CREATE" name="CustomValidationEventHandler" order="1000" sync="TRUE"/>
    </eventhandlers>
    2. Register plugin
    plugin.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.ValidationHandler">
    <plugin pluginclass="test.iam.eventhandlers.CustomValidationEventHandler" version="1.0" name="CustomValidationEventHandler" />
    </plugins>
    </oimplugins>
    Just givng sys out in the below code to check whther it is getting triggerred during user create.
    package test.iam.eventhandlers;
    import java.util.HashMap;
    import oracle.iam.platform.Platform;
    import oracle.iam.platform.context.ContextAware;
    import oracle.iam.platform.kernel.ValidationException;
    import oracle.iam.platform.kernel.ValidationFailedException;
    import oracle.iam.platform.kernel.spi.ValidationHandler;
    import oracle.iam.platform.kernel.vo.BulkEventResult;
    import oracle.iam.platform.kernel.vo.BulkOrchestration;
    import oracle.iam.platform.kernel.vo.Orchestration;
    public class CustomValidationEventHandler implements ValidationHandler {
         @Override
         public void initialize(HashMap<String, String> arg0) {
         // TODO initialization
              System.out.println("init validate event handler");
         @Override
         public void validate(long processId, long eventId, Orchestration orchestration)
         throws ValidationException, ValidationFailedException {
              System.out.println("Beginning of validation");
              System.out.println("End of validation");
         @Override
         public void validate(long processId, long eventId, BulkOrchestration arg2)
         throws ValidationException, ValidationFailedException {
         // TODO - N/A
              System.out.println("Bulk Orchestration not yet implemented");     
    Now when i create a user it is not allowing and i am getting system error in the front end and in the logs i could see something below
    <May 28, 2012 3:03:29 PM CEST> <Error> <oracle.iam.identity.usermgmt.impl> <IAM-3050029> <The user cannot be created due to validation errors.
    oracle.iam.platform.kernel.ValidationFailedException: Event handler CustomValidationEventHandler implemented using class/plug-test.iam.eventhandlers.CustomValidationEventHandler could not be loaded.
    at oracle.iam.platform.kernel.impl.OrchProcessData.runValidationEvents(OrchProcessData.java:177)
    at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.validate(OrchestrationEngineImpl.java:644)
    at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.process(OrchestrationEngineImpl.java:497)
    at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.orchestrate(OrchestrationEngineImpl.java:444)
    at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.orchestrate(OrchestrationEngineImpl.java:378)
    at oracle.iam.identity.usermgmt.impl.UserManagerImpl.create(UserManagerImpl.java:656)
    at oracle.iam.identity.usermgmt.api.UserManagerEJB.createx(Unknown Source)
    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    I have implemented preprocess and postprocess event handler before with similar kind of plugin registration, metadata import and everything worked fine. Not sure what is the problem here with validation event handler.
    Thanks
    DK

    Instead of registering the plug-in can u try placing it in the plugins folder under Oracle_IDM1/server folder.
    at times restart is required. esp when the server is running in production mode.
    Regards
    user12841694

  • Migrate Post to Pre-Processing Event Handler

    Hi All,
    I am moving logic from a post-processing event handler to a pre-processing one.The Post-Processing logic used the EntityManager to save the attribute, is this applicable for a Pre-Process?
    Thank You
    Ron

    In a pre-process handler add the value back into the orchestration, e.g. orchestration.addParameter(<attribute>, <value>);

  • USER LOGIN GENERATION USING EVENT HANDLER IN OIM 11G

    Hi
    I am looking to generate user logins in OIM 11g (11.1.1.5) using event handlers. Can anyone guide me with the process and which API need to be used?
    Regards

    You have to write your custom class which implements oracle.iam.identity.usermgmt.api.UserNamePolicy. Then you have to register the plugin which will contain the plugin.xml and class file of your custom code.
    More in this metalink ID 1228035.1

  • INFO ON Pre-Process Event Handler ,recon rules, pre insert event handler

    Hi Experts
    Can any one explain me theses terms what is their purpose ...

    recon rules -- rule is nothing but a condition or filter which is applied while reconciling user into OIM.Based on these rule either user record is created or updated in OIM which is again specified in Resource object->Action Rule
    event handler--- A peace of code which get executed if certain event(Insert,Update/Modify and Delete) or action occurs in OIM. Very much similar to Database Triggers.
    Now each and every Event has two stage. either Pre or Post.
    Ex:
    Pre-Insert-> It will be executed before something inserted in Database. for example before user creation
    Post-Insert->It will be executed after something inserted in database. For example after user creation.

  • Custom Pre Process Handler for middle name generation

    Hi,
    I am working on Custom Pre Process Event Handler for generation of middle name from the First Name by following the Meta link ID :[ID 1262803.1]. I have followed all the steps successfully as mentioned in meta link. But I am not able to trigger the middle name in OIM admin console. Following are the steps :
    1) Created a Application and project named CustomPreProcessEventHandler and copied the sample code. I have copied all the jars in our class path from OIM Platform folder e.g : iam-platform-context.jar and iam-platform-kernel.jar.
    2) Created plugin as mentioned in metalink.
    3) Copied in the plugins directory and registered successfully.
    4) Set all my paths and home as mentioned in the metalink for Java, ANT, WL_HOME, OIM_HOME.
    5) Created EventHandlers.xml and imported the file with wlst in the OIM_HOME/metadata/user/custom/CustomPreProcessHandler/EventHandlers.xml
    6) Finally ( *./PurgeCache.sh MetaData* ) to purge the cache.
    7) Created a new user in OIM Admin Console but I am not getting any middle name.
    Please guide if i am missing something. Do I need to map something Design console or any system property need to be changed.
    I have been trying this since last week without any success. Please suggest ASAP.
    Thanks

    Thanks for the Promt reply.
    I have changed the orders from 1000 to 50 in EventHandlers.xml.
    I also checked the plugins table in DEV_OIM and found three entries. In plugin table we have these enteries
    1) MyCustomUserNameGenerator
    2) CustomPreProcessEventHandler
    3) CustomPreProcessEventHandler1
    I have deleted the MyCustomUserNameGenerator, CustomPreProcessEventHandler and all its dependencies. Still its showing in Plugins table.
    My active eventhandler is now this CustomPreProcessEventHandler1. but when I trigger the event handler in log..
    executing in the server environment hence initialising ADPClassWatchDog
    Xl Home Dir :/opt/Oracle/Middleware/Oracle_IDM1/server
    MyCustomUserNameGenerator####getUserNameFromPolicy
    MyCustomUserNameGenerator####printMap:
    MyCustomUserNameGenerator####printMap: key=Email val=null
    MyCustomUserNameGenerator####printMap: key=Middle Name val=null
    MyCustomUserNameGenerator####printMap: key=Last Name val=user10
    MyCustomUserNameGenerator####printMap: key=First Name val=test
    MyCustomUserNameGenerator####printMap:
    MyCustomUserNameGenerator####printMap: key=Email [email protected]
    MyCustomUserNameGenerator####printMap: key=Middle Name val=null
    MyCustomUserNameGenerator####printMap: key=Last Name val=user10
    MyCustomUserNameGenerator####printMap: key=First Name val=test
    <Jun 21, 2011 11:08:20 AM IST> <Warning> <oracle.iam.autoroles.impl.util> <IAM-4020205> <Rule Consultant is invalid because it contains an element with an invalid attribute.>
    <Jun 21, 2011 11:08:20 AM IST> <Warning> <oracle.iam.autoroles.impl.util> <IAM-4020203> <Rule Consultant is invalid and it is being ignored.>
    <Jun 21, 2011 11:08:20 AM IST> <Warning> <oracle.iam.autoroles.impl.util> <IAM-4020205> <Rule Full-Time Employee is invalid because it contains an element with an invalid attribute.>
    <Jun 21, 2011 11:08:20 AM IST> <Warning> <oracle.iam.autoroles.impl.util> <IAM-4020203> <Rule Full-Time Employee is invalid and it is being ignored.>
    <Jun 21, 2011 11:09:04 AM IST> <Error> <org.quartz.impl.jdbcjobstore.JobStoreCMT> <BEA-000000> <MisfireHandler: Error handling misfires: Unexpected runtime exception: null
    Its still running MyCustomUserNameGenerator....
    Please guide me for further steps....
    Thanks

  • Post Process Event Handler ----Unique Constraint Violation--Create User

    Hi Evryone..
    I am creating the user using the create user request template and there is one level of approval for this.
    I have one pre process event handler which populates one field A and one post process event handler which updates some 3 fields in the user form .
    In request template itself we had placed value as "ABC" for field B and this field B will be overridden in the post process event handler with Value as "XYZ" .
    Now when i raise the request the user is getting created in OIM but the value XYZ is not getting replaced in the field B.
    Below are the errors which i got in the logs while executing post process event handler :
    <Mar 28, 2012 10:25:58 AM CDT> <Warning> <oracle.iam.callbacks.common> <IAM-2030146> <[CALLBACKMSG] Are applicable policies present for this async eventhandler ? : false>
    <Mar 28, 2012 10:25:59 AM CDT> <Warning> <org.eclipse.persistence.session.oim> <BEA-000000> <
    Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (DEV_OIM.UK_UAR_ATTR_NAME_VALUE) violated
    Error Code: 1
    Call: INSERT INTO USR_ATTRIBUTE_RESERVATIONS (UAR_RESERVATION_KEY, UAR_ATTRIBUTE_NAME, CREATED_BY, CREATED_ON, DATA_LEVEL, UAR_REQUEST_ID, UAR_RESERVED_VALUE, UPDATED_BY, UPDATED_ON) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
    bind => [10, User Login, null, null, null, 10, DUMMY14, null, null]
    Query: InsertObjectQuery([email protected]658269)
    Exception at usrIntf.updateUser IAM-3050128 : Cannot reserve user attribute User Login with value DUMMY14 in OIMDB. Corresponding request ID is 10.:User Login:DUMMY14:10
    I checked reservations table and there are no records in that table.
    Has any one faced this issue..if so how it can be resolved..

    Are you trying to update the User ID? As far as I know during create user requests, OIM reserves the user login as it goes through approval and you cannot update that directly I think. I haven't tried it but can you tell me which fields you are prepopulating and which are you updating? Are there any OOTB fields in this or UDF?
    -Bikash

  • Post Process Event Handler not getting user's CURRENT_STATE for a UDF field

    I have a post process event handler in OIM R2 BP04 , which runs on Trusted Reconciliation and it compares user's ("CURRENT_USER") state and ("NEW_USER_STATE") and based on that derives a business logic.
    The problem that i am  facing is that, it is not able to get the User's ("CURRENT_USER") state for a UDF(EMAIL_LIST) field and it is coming as null,and  hence is breaking the business logic.The same Event Handler is working on TEST and QA ( 4 node cluster)environments and is not working on PROD environment( 4 node cluster).
    The different thing that was done on was that during the initial recon the event Handler was not present  and after the initial load of the users i have manually executed the database sql query which have updated the "EMAIL_LIST field manually for all the users
    I think  that since during the initial recon as the  EMAIL_LIST was not populated and was  populated  through the SQL update for all the users, the orchestration inter event data does not contain email list, and so it is coming as null.
    But i am seeing the same behavior for new records as well, which are created and  then updated after event handler is registered.
    Please reply, if you have encountered something similar.
    Thnx
    Akshat

    Yes i need the old state, which is
                        Identity[] oldUserStatesIdntArr =
                            (Identity[])(Identity[])interEventData.get("CURRENT_USER");

  • OIM 11g - ldap sync - Post Process event handler 'CREATE'  faillling

    Hi Gurus,
    We have ldap sync set up between OIM 11.1.1.5 and ODSEE 11g,
    Post process event handler on user creation with is setting a attribute with random 16 digit character, This event handler is getting triggered and setting the attribute in OIM but in logs i can see "Modification failed because user 45118 is not synchronized to the LDAP directory." error and it is not updated in ODSEE.
    This behaviour is only for trusted recon not for the User created through UI.
    Not sure what exactly is happening..
    Is it expected behavior??
    Gurus help me out on this.

    IF it fail because event handler unable to produce random number then verify below
    is eventhandler code being executed in trusted recon verify in log.
    There are two method execute and bulk execute in eventhandler. execute is being called from UI and bulk execute is being called for trusted recon.
    either put code in bulk execute or update batch recon size something like that system property to 1. so, it will function as UI. Default value of batch is 500
    --nayan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • OIM 11g: Access Denied searching usr_emp_no in post process event handler

    I am logging in as xelsysadm and creating a new user. I have populated a UDF called Manager Employee Number with a value of 12345 and I have a corresponding user with the Employee Number populated with that same value.
    When I create the user, my code searches for a corresponding user in OIM with that employee number. The problem is that i am getting an access denied error searching use_emp_no. Ironically, in a different post process event handler, I have access to decrypting the user's password.
    I tried searching by Employee Number rather than use_emp_no (which is what is returned with AttributeName.EMPLOYEE_NUMBER.getId()) but that did not find any users. It did seem to attempt the search though.
    Here is the code and the error:
    //get the manager object and retrieve the user login and user key of the manager
    mgrRetAttrs.add("USER_LOGIN");
    mgrRetAttrs.add("USER_KEY");
    List<User> mgrList = searchUsr(mgrEmpNo, mgrRetAttrs);
    logger.finest("Retrieved " + mgrList.size() + " managers with that employee number.");
    private List<User> searchUsr(String mgrEmpNo, Set<String> mgrRetAttrs) throws AccessDeniedException, UserSearchException{
    logger.finest("************Entering BBTMgrIDPostProcEventHandler#searchUser()***********");
    logger.finest("This is the manager emp no we are searching: " + mgrEmpNo);
    SearchCriteria srchCriteria =
    new SearchCriteria(AttributeName.EMPLOYEE_NUMBER.getId(), mgrEmpNo, SearchCriteria.Operator.EQUAL);
    logger.finest("This is the search criteria: " + srchCriteria.toString());
    logger.finest("Exiting BBTMgrIDPostProcEventHandler#searchUser()");
    return getUserManager().search(srchCriteria, mgrRetAttrs, null);
    private UserManager getUserManager() {
    logger.finest("Enter BBTMgrIDPostProcEventHandler#getUserManager()");
    if (this.userMgr == null) {
    this.userMgr = Platform.getService(UserManager.class);
    logger.finest("Exit BBTMgrIDPostProcEventHandler#getUserManager()");
    return this.userMgr;
    Entering BBTMgrIDPostProcEventHandler#execute()
    oracle.iam.platform.authz.exception.AccessDeniedException: You do not have permission to search the following user attributes: usr_emp_no.
    at oracle.iam.identity.usermgmt.impl.UserManagerImpl.search(UserManagerImpl.java:1699)
    at oracle.iam.identity.usermgmt.api.UserManagerEJB.searchx(Unknown Source)
    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy328.searchx(Unknown Source)
    at oracle.iam.identity.usermgmt.api.UserManager_nimav7_UserManagerRemoteImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at oracle.iam.identity.usermgmt.api.UserManager_nimav7_UserManagerRemoteImpl.searchx(Unknown Source)
    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 weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
    at $Proxy196.searchx(Unknown Source)
    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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
    at $Proxy318.searchx(Unknown Source)
    at oracle.iam.identity.usermgmt.api.UserManagerDelegate.search(Unknown Source)
    at com.oracle.iam.bbt.eventhandler.BBTFindMgrID.searchUsr(BBTFindMgrID.java:244)
    at com.oracle.iam.bbt.eventhandler.BBTFindMgrID.executeEvent(BBTFindMgrID.java:189)
    at com.oracle.iam.bbt.eventhandler.BBTFindMgrID.execute(BBTFindMgrID.java:114)
    at oracle.iam.platform.kernel.impl.OrchProcessData.runPostProcessEvents(OrchProcessData.java:1168)
    at oracle.iam.platform.kernel.impl.OrchProcessData.runEvents(OrchProcessData.java:710)
    at oracle.iam.platform.kernel.impl.OrchProcessData.executeEvents(OrchProcessData.java:227)
    at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.resumeProcess(OrchestrationEngineImpl.java:674)
    at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.resumeProcess(OrchestrationEngineImpl.java:705)
    at oracle.iam.platform.kernel.impl.OrhestrationAsyncTask.execute(OrhestrationAsyncTask.java:108)
    at oracle.iam.platform.async.impl.TaskExecutor.executeUnmanagedTask(TaskExecutor.java:100)
    at oracle.iam.platform.async.impl.TaskExecutor.execute(TaskExecutor.java:70)
    at oracle.iam.platform.async.messaging.MessageReceiver.onMessage(MessageReceiver.java:68)
    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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy331.onMessage(Unknown Source)
    at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:574)
    at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
    at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:379)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
    at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
    at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
    at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: oracle.iam.identity.exception.SearchAttributeAccessDeniedException: You do not have permission to search the following user attributes: usr_emp_no.
    at oracle.iam.identity.usermgmt.impl.UserManagerImpl.search(UserManagerImpl.java:1696)
    ... 76 more
    Thanks,
    Ruth

    This is what fixed the problem:
    Instead of the following:
    //get the manager object and retrieve the user login and user key of the manager
    mgrRetAttrs.add("USER_LOGIN");
    mgrRetAttrs.add("USER_KEY");
    I needed to do this instead:
    mgrRetAttrs.add(UserManagerConstants.AttributeName.USER_LOGIN.getId());
    mgrRetAttrs.add(UserManagerConstants.AttributeName.USER_KEY.getId());
    Then I changed the searchCriteria back to the following:
    SearchCriteria srchCriteria =
    new SearchCriteria("Employee Number", "12345", SearchCriteria.Operator.EQUAL);
    This did the trick.
    Ruth

  • OIM 11.1.1.5: Post Process Event Handler, change password notification

    Hi,
    Products
    OIM 11.1.1.5 BP02
    OAM 11.1.1.5
    OID 11.1.1.5
    Problem
    I have written a post-process event handler which fires when a role is assigned to a user. The event handler calls a plugin which uses the UserManager API to generate and change the user's password.
    I've tested this by assigning a role to the user via the OIM web console. I can see my log messages indicating that the event handler has fired and that the password has been changed.
    However, I expected that when UserManager.changePassword completed, a notification email would then be sent to the user informing them of the new password, but no notification email has been sent.
    The email notifications have been set up correctly, because I have changed the same user's password via the OIM web console and successfully received a Reset Password email.
    So, my questions are:
    1) Am I right in thinking that when you call UserManager.changePassword(), an out-of-the-box ResetPassword email notification should be sent to the user?
    2) Has anyone got this working in 11.1.1.5?
    Some more detailed info
    In my plugin class I'm calling the following from both execute methods (EventResult and BulkEventResult):
    char newpasswd[] = new RandomPasswordGeneratorImpl().generatePassword(user);
    getUserManager().changePassword(userKey, newpasswd, false, null, true);
    logger.info(("Successfully changed password"));
    plugin.xml
         <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
         <plugin
         pluginclass="oracle.iam.PostInsertPlugin"
         version="1.0"
         name="PostInsertPlugin">
         </plugin>
         </plugins>
         </oimplugins>
    $OIM_HOME/server/bin/weblogic.properties
              wls_servername = oim_server1
              app = OIMMetadata
              metadata_from_loc=/home/oracle/eventhandlers
              metadata_file=/metadata/roleuser/custom/EventHandlers.xml
    /home/oracle/eventhandlers/import/metadata/roleuser/custom/EventHandlers.xml
    <?xml version='1.0' encoding='utf-8'?>
    <eventhandlers
    xmlns="http://www.oracle.com/schema/oim/platform/kernel"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
    <action-handler
    class="oracle.iam.PostInsertPlugin"
    entity-type="RoleUser"
    operation="CREATE"
    name="PostInsertPlugin"
    stage="postprocess"
    order="1002"
    sync="TRUE"/>
    </eventhandlers>
    There are no errors in the OIM out and diagnostic logs apart from the following which occur at OIM startup:
    [2013-01-07T16:29:23.425+00:00] [oim_server1] [ERROR] [IAM-0080075] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: oiminternal] [ecid: 2e903d7ef060ab65:66b2de91:13c15d6d9ce:-8000-0000000000000002,0] [APP: oim#11.1.1.3.0] XML schema validation failed for XML /metadata/iam-features-OIMMigration/EventHandlers.xml and it will not be loaded by kernel.
    [2013-01-07T16:29:24.267+00:00] [oim_server1] [ERROR] [IAM-0080075] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: oiminternal] [ecid: 2e903d7ef060ab65:66b2de91:13c15d6d9ce:-8000-0000000000000002,0] [APP: oim#11.1.1.3.0] XML schema validation failed for XML /metadata/iam-features-callbacks/event_configuration/EventHandlers.xml and it will not be loaded by kernel.
    Thanks
    dty
    Edited by: oim_user on Jan 7, 2013 5:37 PM

    No notification will be sent if you changepassword using the method from usermanager api.
    You have to trigger the resetpassword event manullay in your code.
    Here is a sample code to create an event for reset password. Once you create event, invoke it from notification service - notify method.
    NotificationEvent event = new NotificationEvent();
    String[] receiverUserIds= {userLogin};
    event.setUserIds(receiverUserIds);
    event.setTemplateName("ResetPasswordNotification");
    event.setSender(null);
    HashMap<String, Object> resolvedData = new HashMap<String, Object>();
    resolvedData.put("userLoginId", userLogin);
    event.setParams(resolvedData);

  • Assistance required for deploying a validation handler in OIM 11g

    Hi All,
    I wanted to deploy a validation handler in OIM 11g so that I can check that the telephone number that is entered by the user has length of ten and all of them are digits.
    I created a new eclipse workspace called TelephoneValidationHandler on the OIM Host machine. I created a new Java project in the workspace with the name TelephoneValidationHandler. I created a class called TelephoneValidationHandler in this project. Put in the following code in this java file -
    /* TelephoneValidationHandler.java */
    package com.custom;
    import java.io.Serializable;
    import java.util.HashMap;
    import oracle.iam.platform.kernel.ValidationException;
    import oracle.iam.platform.kernel.ValidationFailedException;
    import oracle.iam.platform.kernel.spi.ValidationHandler;
    import oracle.iam.platform.kernel.vo.BulkOrchestration;
    import oracle.iam.platform.kernel.vo.Orchestration;
    public class TelephoneValidationHandler implements ValidationHandler{
              @Override
              public void initialize(HashMap<String, String> arg0) {
              // TODO initialization
              System.out.println("***********************************************************************************");
              System.out.println("************************** Init validate event handler ****************************");
              System.out.println("***********************************************************************************");
              @Override
              public void validate(long processId, long eventId, Orchestration orchestration)
              throws ValidationException, ValidationFailedException {
              System.out.println("************************** Beginning of validation *************************");
              HashMap<String, Serializable> parameters = orchestration.getParameters();
              String telephone = (String) parameters.get("Telephone Number");     
              //String regex="[0-9]{10}";
                   if (telephone.length()==10)
                        for(int i=0; i<10; i++)
                             if (Character.isDigit(telephone.charAt(i))){
                                  continue;
                             else
                                  throw new ValidationFailedException();
                        System.out.println("****************** Validated *********************");
              else
                   System.out.println("*************EXCEPTION OCCURRED*******************");
              throw new ValidationFailedException();
              System.out.println("************************** End of validation *************************");
              @Override
              public void validate(long processId, long eventId, BulkOrchestration arg2)
                        throws ValidationException, ValidationFailedException {
              // TODO - N/A
                   System.out.println("************************** INSIDE BULK VALIDATE ***************************");
    I included the files in reference libraries as - right click on the project, click on Build Path -> Configure Build Path -> Add External JARs. In this I selected the jars that were needed to compile the code successfully and i selected them from the place where they exist in the OIM host for eg. C:\Oracle\Middleware\server\platform\iam-platform-kernel.jar path for iam-platform-kernel.jar.
    Now i created a jar file out of this compiled project by right clicking on the project name and clicking Export -> Java -> JAR File. Selected the .classpath and .project files to export as well. Selected first option 1. Export generated class files and resources option. Other three existing options apart from this one which i selected were: 2. Export all output folders for checked projects. 3. Export Java source files and resources 4. Export refactorings for checked projects. So with the 1st option selected, I clicked next and then selected Generate New Manifest file in the final screen and clicked on Finish. Exported this by the name TelephoneValidationHandler.jar to desktop. If I open this jar by changing extension to zip, I see the following folder structure inside it :
    com -> custom -> TelephoneValidationHandler.class
    META-INF -> MANIFEST.INF
    .classpath
    .project
    I created a folder called lib and placed this jar file inside this lib folder. Then outside this lib folder, i placed the plugin.xml file created for this as follows:
    plugin.xml ->
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.ValidationHandler">
    <plugin class="com.custom.TelephoneValidationHandler" version="1.0" name="TelephoneValidationHandler">
    </plugin>
    </plugins>
    </oimplugins>
    Now I selected the lib folder and plugin.xml and created a new zip file by the name TelephoneValidationHandler.zip which will be used for plugin registration. The zip folder directly inside it has the structure - plugin.xml file and lib folder having the jar file inside it.
    lib -> TelephoneValidationHandler.jar
    plugin.xml
    Now I went to the directory C:\Oracle\Middleware\server\plugin_utility and opened the ant.properties file in that and put in the values as:
    ant.properties ->
    # The installation directory for WLS
    wls.home=C:\\Oracle\\Middleware\\wlserver_10.3
    # The home directory for OIM. In case of shiphome its same as install directory
    oim.home=C:\\Oracle\\Middleware\\Oracle_IDM1\\server
    #login file name with path.
    login.config=C:\\Oracle\\Middleware\\Oracle_IDM1\\server\\config\\authwl.conf
    Now I opened a cmd prompt, traversed to C:\Oracle\Middleware\server\plugin_utility directory and typed in "ant -f pluginregistration.xml register" and executed this command.
    It asked for oim userid - xelsysadm, oim password: Password, server url: t3://oimhost:14000, name of plugin file with path: C:\\temp\\TelephoneValidationHandler.zip
    I got these errors in the redirector.out file in C:\Oracle\Middleware\server\plugin_utility :
    Error in registering the plugin. null
    Error occured during the use of plugin registering utility.
    And this is the detailed description in the redirector.err in C:\Oracle\Middleware\server\plugin_utility :
    Jul 17, 2012 6:05:58 PM PluginUtility main
    SEVERE: Exception occured {0}
    java.lang.NullPointerException
         at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
         at java.util.regex.Matcher.reset(Matcher.java:291)
         at java.util.regex.Matcher.<init>(Matcher.java:211)
         at java.util.regex.Pattern.matcher(Pattern.java:888)
         at weblogic.utils.classloaders.FilteringClassLoader.matchesClassFilterList(FilteringClassLoader.java:213)
         at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:97)
         at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:86)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
         at oracle.iam.platform.pluginframework.PluginReader.validateInstance(PluginReader.java:303)
         at oracle.iam.platform.pluginframework.PluginReader.validatePluginsFromFile(PluginReader.java:363)
         at oracle.iam.platform.pluginframework.PluginReader.readPluginsFromZIP(PluginReader.java:147)
         at oracle.iam.platform.pluginframework.PluginReader.readPlugins(PluginReader.java:66)
         at oracle.iam.platform.pluginframework.PluginManagerImpl.registerPlugin(PluginManagerImpl.java:74)
         at oracle.iam.platformservice.impl.PlatformServiceImpl.registerPlugin(PlatformServiceImpl.java:129)
         at oracle.iam.platformservice.api.PlatformServiceEJB.registerPluginx(Unknown Source)
         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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
         at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
         at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy528.registerPluginx(Unknown Source)
         at oracle.iam.platformservice.api.PlatformService_ott20t_PlatformServiceRemoteImpl.__WL_invoke(Unknown Source)
         at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
         at oracle.iam.platformservice.api.PlatformService_ott20t_PlatformServiceRemoteImpl.registerPluginx(Unknown Source)
         at oracle.iam.platformservice.api.PlatformService_ott20t_PlatformServiceRemoteImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Jul 17, 2012 6:05:58 PM PluginUtility main
    SEVERE: Exception occured {0}
    java.lang.NullPointerException
         at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
         at java.util.regex.Matcher.reset(Matcher.java:291)
         at java.util.regex.Matcher.<init>(Matcher.java:211)
         at java.util.regex.Pattern.matcher(Pattern.java:888)
         at weblogic.utils.classloaders.FilteringClassLoader.matchesClassFilterList(FilteringClassLoader.java:213)
         at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:97)
         at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:86)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
         at oracle.iam.platform.pluginframework.PluginReader.validateInstance(PluginReader.java:303)
         at oracle.iam.platform.pluginframework.PluginReader.validatePluginsFromFile(PluginReader.java:363)
         at oracle.iam.platform.pluginframework.PluginReader.readPluginsFromZIP(PluginReader.java:147)
         at oracle.iam.platform.pluginframework.PluginReader.readPlugins(PluginReader.java:66)
         at oracle.iam.platform.pluginframework.PluginManagerImpl.registerPlugin(PluginManagerImpl.java:74)
         at oracle.iam.platformservice.impl.PlatformServiceImpl.registerPlugin(PlatformServiceImpl.java:129)
         at oracle.iam.platformservice.api.PlatformServiceEJB.registerPluginx(Unknown Source)
         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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
         at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
         at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy528.registerPluginx(Unknown Source)
         at oracle.iam.platformservice.api.PlatformService_ott20t_PlatformServiceRemoteImpl.__WL_invoke(Unknown Source)
         at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
         at oracle.iam.platformservice.api.PlatformService_ott20t_PlatformServiceRemoteImpl.registerPluginx(Unknown Source)
         at oracle.iam.platformservice.api.PlatformService_ott20t_PlatformServiceRemoteImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Exception in thread "Main Thread" java.lang.NullPointerException
         at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
         at java.util.regex.Matcher.reset(Matcher.java:291)
         at java.util.regex.Matcher.<init>(Matcher.java:211)
         at java.util.regex.Pattern.matcher(Pattern.java:888)
         at weblogic.utils.classloaders.FilteringClassLoader.matchesClassFilterList(FilteringClassLoader.java:213)
         at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:97)
         at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:86)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
         at oracle.iam.platform.pluginframework.PluginReader.validateInstance(PluginReader.java:303)
         at oracle.iam.platform.pluginframework.PluginReader.validatePluginsFromFile(PluginReader.java:363)
         at oracle.iam.platform.pluginframework.PluginReader.readPluginsFromZIP(PluginReader.java:147)
         at oracle.iam.platform.pluginframework.PluginReader.readPlugins(PluginReader.java:66)
         at oracle.iam.platform.pluginframework.PluginManagerImpl.registerPlugin(PluginManagerImpl.java:74)
         at oracle.iam.platformservice.impl.PlatformServiceImpl.registerPlugin(PlatformServiceImpl.java:129)
         at oracle.iam.platformservice.api.PlatformServiceEJB.registerPluginx(Unknown Source)
         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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
         at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
         at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy528.registerPluginx(Unknown Source)
         at oracle.iam.platformservice.api.PlatformService_ott20t_PlatformServiceRemoteImpl.__WL_invoke(Unknown Source)
         at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
         at oracle.iam.platformservice.api.PlatformService_ott20t_PlatformServiceRemoteImpl.registerPluginx(Unknown Source)
         at oracle.iam.platformservice.api.PlatformService_ott20t_PlatformServiceRemoteImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    But in the end of this run it still does show - BUILD SUCCESSFUL message but it obviously doesn't work properly because after this registration is done, I go to the MDS through command prompt and import the new EventHandlers.xml which I create as shown below:
    EventHandlers.xml ->
    <?xml version='1.0' encoding='UTF-8'?>
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
    <validation-handler class="com.custom.TelephoneValidationHandler" name="TelephoneValidationHandler" entity-type="User" operation="ANY" order="1002" />
    </eventhandlers>
    This import of EventHandlers.xml is done to the path - /metadata/user/custom
    But after all this, whenever I try creating a new user, I don't even get to see the create user page. Instead I get a NullPointer exception thrown at me.
    Can someone please go through these above steps and tell me if there is any particular step I might be doing wrong??? Maybe the ant.properties is not set properly or maybe the ValidationHandler java code is not implemented properly. However as far as I see I think these steps are correct. I have checked with other posts in this category and followed them. However this error still exists. Please help me.
    Thanks,
    $id
    Edited by: $id on Jul 17, 2012 6:36 PM

    Hey You were right. I changed the plugin.xml file so that the plugin xml tag changed to <plugin pluginclass="..." ..> and now when I ran the ant utility to register the plugin, it did not give any errors. Instead I got a message saying Plugin registered successfully. Also then I went to the dev_oim schema and in that the plugins table and checked it. This time the plugin entry was present in the database in this table.
    Now I imported the EventHandlers.xml file using MDS utility as follows:
    Placed the EventHandlers.xml file in C:/temp/metadata/user/custom/EventHandlers.xml
    The EventHandlers.xml file is as mentioned earlier as follows:
    <?xml version='1.0' encoding='UTF-8'?>
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
    <validation-handler class="com.custom.TelephoneValidationHandler" name="TelephoneValidationHandler" entity-type="User" operation="ANY" order="1002"/>
    </eventhandlers>
    Now I changed the weblogic.properties file under C:/Oracle/Middleware/Oracle_IDM1/server/bin file to have the entry as follows:
    metadata_from_loc=C:\ \tempThen went to the cmd prompt and navigated to this same folder. Then executed the command: weblogicImportMetadata.bat. It asked the user name : weblogic, password: password and then the url: t3://oimhost:7001
    There were no errors after this executed. I only got End of Import Metadata Script as the message.
    I then executed the "PurgeCache all" command while in the same directory.
    And gave the oimusername: xelsysadm, oimpassword: password and the oim server url: t3://oimhost:14000.
    I got the message :
    PurgeCache Login Success...
    Purging the cache categories:[all] is successful
    After this I logged in to the OIM console and tried to create a user and provided proper telephone number in the field. But when i clicked on Save after giving in these details, I got the following error on the OIM console:
    A system error occurred.
    When i go the oim server logs i see the following lines in it whenever I click on save for a new user:
    [2012-07-18T11:15:22.799+05:30] [oim_server1] [NOTIFICATION] [IAM-0080013] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [APP: oim#11.1.1.3.0] Kernel executing default validation with process id, event id, entity and operation 1,796.0.User.CREATE
    [2012-07-18T11:15:23.111+05:30] [oim_server1] [NOTIFICATION] [IAM-3050013] [oracle.iam.identity.usermgmt.impl] [tid: [ACTIVE].ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm][APP: oim#11.1.1.3.0] Searching for users with the specified criteria.
    [2012-07-18T11:15:23.688+05:30] [oim_server1] [WARNING] [IAM-0080002] [oracle.iam.platform.kernel.impl] [tid: [ACTIVE].ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm][APP: oim#11.1.1.3.0] Orchestration validation failed on the event handler - Event handler TelephoneValidationHandler implemented using class/plug-in com.custom.TelephoneValidationHandler could not be loaded.
    [2012-07-18T11:15:23.938+05:30] [oim_server1] [ERROR] [IAM-3050029] [oracle.iam.identity.usermgmt.impl] [tid: [ACTIVE].ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm][APP: oim#11.1.1.3.0] The user cannot be created due to validation errors.[[
    oracle.iam.platform.kernel.ValidationFailedException: Event handler TelephoneValidationHandler implemented using class/plug-in com.custom.TelephoneValidationHandler could not be loaded.
    After this error occurred I logged into the database and queried the database with following queries:
    SELECT * FROM dev_oim.orchprocess ORDER BY ID DESC; -> Got the latest entry of process id for operation CREATE and stage as validation-handler but the status of this entry was FAILED.
    Then executed another query as follows to get the event details for the latest process id i got from above query results:
    select * from dev_oim.orchevents WHERE processid=1797 ORDER BY orchorder;The output of this query was:
    "ID"     "NAME"     "STATUS"     "PROCESSID"     "STAGE"     "ORCHORDER"     "RETRY" "CONTEXTID"     "RESULT"
    "7544"     "CreateUserValidationHandler"     "COMPLETED"     "1797"     "validation-handler"     "1"     "0"     "0"     "(BLOB)"
    "7543"     "TelephoneValidationHandler"     "FAILED"     "1797"     "validation-handler"     "2"     "0"     "0"     "(BLOB)"
    I already have pasted my java code initially above. Please guide me if anything wrong in the code or with the EventHandlers.xml file. After importing, I checked again by exporting the EventHandlers.xml file from the location where I had imported it and it did exist in that path.
    Thanks,
    $id
    Edited by: $id on Jul 18, 2012 11:25 AM
    Edited by: $id on Jul 18, 2012 11:34 AM

  • Issues with Post Process Event Handler in oim11g

    Hi I am trying to trigger a post process event handler to set middle name but couldn't succeed.
    can you please point out the mistakes if there are any?
    This is the Java code.
    package oim.eventhandler;
    import java.io.Serializable;
    import java.util.HashMap;
    import oim.util.FROLogger;
    import oracle.iam.identity.usermgmt.vo.User;
    import oracle.iam.platform.context.ContextAware;
    import oracle.iam.platform.kernel.spi.PostProcessHandler;
    import oracle.iam.platform.kernel.vo.AbstractGenericOrchestration;
    import oracle.iam.platform.kernel.vo.BulkEventResult;
    import oracle.iam.platform.kernel.vo.BulkOrchestration;
    import oracle.iam.platform.kernel.vo.EventResult;
    import oracle.iam.platform.kernel.vo.Orchestration;
    public class setmiddlename implements PostProcessHandler {
         public void initialize(HashMap<String, String> arg0) {
              // TODO Auto-generated method stub
         public boolean cancel(long arg0, long arg1,
                   AbstractGenericOrchestration arg2) {
              // TODO Auto-generated method stub
              return false;
         public void compensate(long arg0, long arg1,
                   AbstractGenericOrchestration arg2) {
              // TODO Auto-generated method stub
         * public EventResult execute(long arg0, long arg1, Orchestration arg2) { //
         * TODO Auto-generated method stub return null; }
         public BulkEventResult execute(long arg0, long arg1, BulkOrchestration arg2) {
              // TODO Auto-generated method stub
              return null;
         public EventResult execute(long processId, long eventId,
                   Orchestration orchestration) {
              HashMap<String, Serializable> parameters = orchestration.getParameters();
              // If the middle name is empty set the first letter of the first name as the middle initial
              String middleName = getParamaterValue(parameters, "Middle Name");
              if (middleName.trim().length()>0) {
              String firstName = getParamaterValue(parameters, "First Name");
              middleName = firstName.substring(0,1);
              orchestration.addParameter("Middle Name", middleName);
              return new EventResult();
         private String getParamaterValue(HashMap<String, Serializable> parameters, String key) {
              String value = (parameters.get(key) instanceof ContextAware)
              ? (String) ((ContextAware) parameters.get(key)).getObjectValue()
              : (String) parameters.get(key);
              return value;
    ################ PostProcessEventHandlers.XML#############
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernel orchestration-handlers.xsd">
    <!-- Custom validation event handlers -->
    <!-- Custom preprocess event handlers -->
    <action-handler
    class="oim.eventhandler.setmiddlename"
    entity-type="User"
    operation="CREATE"
    name="setmiddlename"
    stage="postprocess"
    order="1000"
    sync="TRUE"/>
    </eventhandlers>
    ################ plugin.xml##############
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins>
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="oim.eventhandler.setmiddlename" version="1.0" name="setmiddlename"/>
    </plugins>
    </oimplugins>
    ################ weblogic.properties##############
    wls_servername=oim_server1
    application_name=OIMMetadata
    metadata_from_loc=/data1/oim_install/Oracle/Middleware/Oracle_IDM1/server/temp/import/metadata/custom/PostProcess
    metadata_files=/metadata/custom/PostProcess/PostProcessEventHandlers.xml
    application_version=11.1.1.3.0
    And the PostProcessEventHandlers.zip contains lib\PostProcess.jar
    both PostProcessEventHandlers.zip and PostProcessEventHandlers.xml are placed in the "metadata_from_loc"
    The registration was successful and I could see the entries in the PLUGINS table
    ID: oim.eventhandler.setmiddlename
    TYPE:     oracle.iam.platform.kernel.spi.EventHandler
    VERSION:     1.0
    NAME:     setmiddlename
    ZIPID:     23
    and PLUGIN_METADATA does not contain any values
    PLUGIN_ZIP contains ZIPID as 23 and ZIP as (BLOB)
    Did I miss anything?
    what is the mistake that I am doing?
    Edited by: 883725 on Sep 9, 2011 2:30 AM
    Edited by: 883725 on Sep 9, 2011 2:31 AM

    I am getting this error when running weblogicDeleteMetadata.sh.
    I have set the OIM Home and Weblogic home. Though Import and export works absolutely fine.
    Any other way where I can connect directly to DB and delete the contents?
    +Please enter your username [weblogic] :weblogic+
    +Please enter your password [welcome1] :+
    +Please enter your server URL [t3://localhost:7001] :t3://localhost:10070+
    Connecting to t3://localhost:10070 with userid weblogic ...
    Successfully connected to Admin Server 'AdminServer' that belongs to domain 'IDM_domain'.
    Warning: An insecure protocol was used to connect to the
    server. To ensure on-the-wire security, the SSL port or
    Admin port should be used instead.
    Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
    For more help, use help(domainRuntime)
    Problem invoking WLST - Traceback (innermost last):
    File "/data1/oim_install/Oracle/Middleware/Oracle_IDM1/server/bin/weblogicDeleteMetadata.py", line 21, in ?
    File "/data1/oim_install/Oracle/Middleware/oracle_common/common/wlst/mdsWLSTCommands.py", line 109, in deleteMetadata
    File "/data1/oim_install/Oracle/Middleware/oracle_common/common/wlst/mdsWLSTCommands.py", line 574, in executeAppRuntimeMBeanOperation
    File "/data1/oim_install/Oracle/Middleware/oracle_common/common/wlst/mdsWLSTCommands.py", line 713, in saveStackAndRaiseException
    WLSTException: MDS-00001: exception in Metadata Services layerMDS-91009: Operation "deleteMetadata" failure. Use dumpStack() to view the full stacktrace.

Maybe you are looking for