Clarity

  • 1.  Trigger exception not caught by Clarity

    Posted Sep 19, 2011 05:50 AM
    Hi,
    I've done a trigger that raise an exception if the resource date range is not inside of project date range.
    The problem is that the exception is not caught by Clarty:

    the trigger raise the exception with the code 20065 and in the file "messages.properties" I have inserted thi line:

    odf-pmd.20065=Resource allocation date is not correct: please check the resource range date is in of project range date

    but when the error occurred I get this error:

    [CA Clarity][Oracle JDBC Driver][Oracle]ORA-20065: Resource allocation date is not correct: please check the resource range date is in of project range date - ORA-06512: at "CLADWM.Z_CHECK_TEAM_DATE", line 10 ORA-04088: error during execution of trigger 'CLADWM.Z_CHECK_TEAM_DATE'

    The error with the code ORA-20065 is the custom exception raise by me.
    The error ORA-06512 at line 10 (in the trigger corresponding at the BEGIN)
    The error ORA-04088 indicates that a runtime error occurred during execution of a trigger

    I've checked the trigger with the debug but no error found.
    In the log file I've found this message:
       WARN  2011-09-19 11:51:27,876 [http-80-2] niku.union (admin:5033304__-5e612b98:projmgr.staffMemberPropertiesPost) [CA Clarity][Oracle JDBC Driver][Oracle]ORA-20065:  Resource allocation date is not correct: please check the resource range date is in of project range date - 
       ORA-06512: at "CLADWM.Z_CHECK_TEAM_DATE", line 11
       ORA-04088: error during execution of trigger 'CLADWM.Z_CHECK_TEAM_DATE'
          was not found in file: messages.properties
    Clarity don't find the message error in the file "messages.properties" with code 20065.
    I think that Clarity don't catch the error message.


    Thanks
    Daniele


  • 2.  RE: Trigger exception not caught by Clarity

    Posted Sep 19, 2011 06:28 AM
    Hi - I have NOT done this myself but this thread;

    Adding Custom Error Messages

    mentions the properties file requiring change as "messages[color=#ff0000]_en[color].properties" rather than the "messages.properties" one (i.e. the language specific file).

    ?

    (just a GUESS)


  • 3.  RE: Trigger exception not caught by Clarity

    Posted Sep 20, 2011 02:17 AM
    Yes, we need to make changes in
    messages_en.properties
    to display the error message in clarity screen.


  • 4.  RE: Trigger exception not caught by Clarity
    Best Answer

    Posted Sep 20, 2011 04:35 AM
    The problem is not the file name (I've changed all the file message_XX.proprierties of the language of my scope).
    The problem it was in the trigger: to check the date I'm referencing to the PRSTART/PRFINISH of PRJ_PROJECTS attr_prj_start
    SELECT TRUNC(prstart), TRUNC(prfinish) INTO prj_start, prj_finish
    FROM prj_projects
    WHERE prid = :NEW.prprojectid AND prstart IS NOT NULL;
    The cause of the problem was that I'm not referencing to the PRJ_PROJECTS. The right field are ATTR_PRJ_START/ATTR_PRJ_FINISH of ODF_CA_PROJECT table
    SELECT TRUNC(attr_prj_start), TRUNC(attr_prj_finish)
    INTO PRJ_START, PRJ_FINISH
    FROM odf_ca_project WHERE ID = :NEW.PRPROJECTID
    The FIELDS ATTR_PRJ_START/ATTR_PRJ_FINISH was created for this purpose. You can check looking the descriprion of the attribute "Project Start" and "Project Finish" of the Project object; the description is that: this field is used to check if the allocation ,task, assignments date is between start and finish project

    THANK YOU FOR THE SUPPORT!


  • 5.  RE: Trigger exception not caught by Clarity

    Posted Sep 20, 2011 04:57 AM
    :wacko:

    I'm glad that you have found your error, but I don't think your "solution" matches your "problem" 8o

    Your "problem" was that your custom error was not being returned to the application - your "solution" appears to be that you have changed how you test for your custom error.

    But if it all works OK for you now; I'm happy! :grin: