Forum Stats

  • 3,826,865 Users
  • 2,260,714 Discussions


Display Custom Error Message in OIM 11g

user4173086 Member Posts: 3
edited Oct 2, 2013 1:47PM in Identity Manager

I'm trying to display an error message from a validation event handler but seems that am missing something. When the "oracle.iam.platform.kernel.ValidationFailedException" is thrown from a validation handler an error message is displayed: "An error occurred". If an error code is provided (see code below) then the message looks like: "An error occurred. The corresponding error code is ERR-0001". I guess that some resource bungle with corresponding messages should be provided.

the code used:

package test;

public class UserGeneralValidationHandler implements oracle.iam.platform.kernel.spi.ValidationHandler

public void validate(long processId, long eventId, Orchestration orchestration)
throws ValidationException
String errorCode = "ERR-0001";
String message = "Simple validation message.";

ValidationFailedException ex = new ValidationFailedException(message);

throw ex;

1.What is missing for complete solution?
2.What is the algorithm that used by OIM to find default or non default resource bundle?
3.How to change out-of-box validation messages? For a sample "The organization ABC does not exist." message is shown if non existing organization is provided during user creation and I'd like to have a different one.



  • soverbosch
    soverbosch Member Posts: 23
    If you want to throw your own messages, please have a look at the files in oracle/iam/request/agentry/resources in OIMUI.jar, you should do something like this in the code:

    String msg = "Note[PROBLEM].text:Problem has occurred:";
    throw new InvalidRequestDataException(msg);

    in all files then you should define
    Note[PROBLEM].text=Problem has occurred
  • BikashBagaria
    BikashBagaria Member Posts: 1,699
    This might help: 9748595

  • 1025328
    1025328 Member Posts: 2
    edited Oct 2, 2013 1:47PM
    • rename OIMUI.jar  to
    • find logging_en and
    • Modify the "IAM-2050512" error message with your custom message
    • Find Agent and
    • Find Note[ERROR_SUBMITTING_REQUEST].text.  Modify the message. Make sure the message must be the same with in"IAM_2050512")


    • change the to jar
    • replace the existing OIMUI.jar
    • login to weblogic  and redeploy OIM (oim.ear)

    no need to restart OIM server.


    • create a request in web console again, you must see the custom message when you hit the submit button

    hope this helps.


This discussion has been closed.