Clarity

  • 1.  14.2 Upgrade Error.

    Posted May 06, 2015 04:33 AM

    Hi All,

     

    We are currently upgrading from v13.2 to v14.2 we are using windows server with Oracle DB. Upgrade failed after 64 mins with the below error.

    All the custom triggers are disabled in the system.

     

    Any suggestions will be much helpful.

     

    5/05/15 8:08 AM (ExecTask) com.niku.union.persistence.PersistenceException: Invalid trigger

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.object.audit.AuditTriggerBuilder.generateTriggers(AuditTriggerBuilder.java:122)

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.upgrade.AuditTrailReEnableUpgrade.reEnableAuditForObject(AuditTrailReEnableUpgrade.java:191)

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.upgrade.AuditTrailReEnableUpgrade.reEnableAuditForObjects(AuditTrailReEnableUpgrade.java:143)

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.upgrade.AuditTrailReEnableUpgrade.doUpgrade(AuditTrailReEnableUpgrade.java:81)

    5/05/15 8:08 AM (ExecTask) at com.niku.union.utility.AbstractUpgrade.run(AbstractUpgrade.java:322)

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.upgrade.AuditTrailReEnableUpgrade.main(AuditTrailReEnableUpgrade.java:122)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    5/05/15 8:08 AM (ExecTask) at java.lang.reflect.Method.invoke(Method.java:606)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    5/05/15 8:08 AM (ExecTask) at java.lang.reflect.Method.invoke(Method.java:606)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.Task.perform(Task.java:348)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.Target.execute(Target.java:392)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.Target.performTasks(Target.java:413)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.Project.executeTarget(Project.java:1368)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.ant.AntUtil.executeTargets(AntUtil.java:141)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:105)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:84)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.Utilities.executeAntScript(Utilities.java:2263)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.Utilities.run(Utilities.java:1862)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.Utilities.main(Utilities.java:954)

    5/05/15 8:08 AM (ExecTask) com.niku.dbtools.ant.ExecutableException: D:\clarity\niku6\upgrade\13.3.0\infrastructure\postupgrade\osf.xml:53: com.niku.union.persistence.PersistenceException: Invalid trigger

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:109)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:84)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.Utilities.executeAntScript(Utilities.java:2263)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.Utilities.run(Utilities.java:1862)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.Utilities.main(Utilities.java:954)

    5/05/15 8:08 AM (ExecTask) Caused by: D:\clarity\niku6\upgrade\13.3.0\infrastructure\postupgrade\osf.xml:53: com.niku.union.persistence.PersistenceException: Invalid trigger

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    5/05/15 8:08 AM (ExecTask) at java.lang.reflect.Method.invoke(Method.java:606)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.Task.perform(Task.java:348)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.Target.execute(Target.java:392)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.Target.performTasks(Target.java:413)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.Project.executeTarget(Project.java:1368)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.ant.AntUtil.executeTargets(AntUtil.java:141)

    5/05/15 8:08 AM (ExecTask) at com.niku.dbtools.ant.AntUtil.executeAntScript(AntUtil.java:105)

    5/05/15 8:08 AM (ExecTask) ... 4 more

    5/05/15 8:08 AM (ExecTask) Caused by: com.niku.union.persistence.PersistenceException: Invalid trigger

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.object.audit.AuditTriggerBuilder.generateTriggers(AuditTriggerBuilder.java:122)

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.upgrade.AuditTrailReEnableUpgrade.reEnableAuditForObject(AuditTrailReEnableUpgrade.java:191)

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.upgrade.AuditTrailReEnableUpgrade.reEnableAuditForObjects(AuditTrailReEnableUpgrade.java:143)

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.upgrade.AuditTrailReEnableUpgrade.doUpgrade(AuditTrailReEnableUpgrade.java:81)

    5/05/15 8:08 AM (ExecTask) at com.niku.union.utility.AbstractUpgrade.run(AbstractUpgrade.java:322)

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.upgrade.AuditTrailReEnableUpgrade.main(AuditTrailReEnableUpgrade.java:122)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    5/05/15 8:08 AM (ExecTask) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    5/05/15 8:08 AM (ExecTask) at java.lang.reflect.Method.invoke(Method.java:606)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)

    5/05/15 8:08 AM (ExecTask) at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)

    5/05/15 8:08 AM (ExecTask) ... 21 more

    5/05/15 8:08 AM (ExecTask)

    5/05/15 8:08 AM (ExecTask) Total time: 0H:1M:57S

    5/05/15 8:08 AM (ExecTask) Tue May 05 08:08:36 CDT 2015 (run-postupgrade-infrastructure-script) osf: failed.

    5/05/15 8:08 AM (ExecTask) ERROR: Upgrade failed for tenant 

    5/05/15 8:08 AM (ExecTask) ==========================================

    5/05/15 8:08 AM (ExecTask) DBTools Log - Tue May 05 08:08:38 CDT 2015

    5/05/15 8:08 AM (ExecTask) ==========================================

    5/05/15 8:08 AM (ExecTask)



  • 2.  Re: 14.2 Upgrade Error.

    Broadcom Employee
    Posted May 06, 2015 06:34 AM

    Hi Nmanoha,

     

    Before starting the upgrade can you run the db analyze and db compile to compile all the invalid object and then run the upgrade.

     

    Regards

    Suman Pramanik



  • 3.  Re: 14.2 Upgrade Error.
    Best Answer

    Broadcom Employee
    Posted May 06, 2015 11:28 AM

    Hi nmanoha,

     

    Here is your error message:

    5/05/15 8:08 AM (ExecTask) com.niku.union.persistence.PersistenceException: Invalid trigger

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.object.audit.AuditTriggerBuilder.generateTriggers(AuditTriggerBuilder.java:122)

    5/05/15 8:08 AM (ExecTask) at com.niku.odf.upgrade.AuditTrailReEnableUpgrade.reEnableAuditForObject(AuditTrailReEnableUpgrade.java:191


    The triggers that it fails at, are your Audit triggers. Please could you do the following to solve your issue:

    1. Run the query:
    select distinct object_code from odf_audited_attributes where is_active=1 order by object_code

    With the results:
    2. Open Clarity - Administration - Objects
    3. Open one by one each object of the list above
    4. Go to Audit Trail tab
    5. Take a screenshot of the selected columns, save the screenshot
    6. Remove all the columns on the right for Insert, Update and Delete using the arrows
    Ensure nothing is selected
    7. Click Save and Return
    8. Repeat for all the objects in the list.

    9. Once done, run the query:
    select trigger_name from user_triggers where trigger_name like 'T\_%' escape '\'

    10. See all the triggers left that start with T_. These are all audit triggers, and after the 'T' you have the object name.
    11. If you have any results, go to the exact object (i.e. Application, or Asset) and see if you have anything in Selected column.
    Even if you have nothing Selected, click on Save and Return, this action will remove the trigger. It’s important to ensure all triggers are gone.

    12. At the end you should have no audit triggers whatsoever. Ensure also there is nothing returned by the query:
    select distinct object_code from odf_audited_attributes where is_active=1 order by object_code

    It’s important to ensure all audit triggers are gone. If you have any doubts about any of them, let me know.
    Note : do not drop the triggers manually from the database, only use the steps above. The correct removal of the audit is recommended by us Clarity Support prior to each upgrade.

    13. Restart your upgrade.

    14. Once upgrade is successful, connect to Clarity and reactivate the auditing based on the screenshots you took in step 5.


    This should resolve your issue. Please let me know how it goes.


    Kind Regards

    Nika Hadzhikidi
    CA Technologies
    Principal Support Engineer



  • 4.  Re: 14.2 Upgrade Error.

    Posted May 12, 2015 07:33 AM

    Thanks a lot Nika. This was really helpful. We have successfully upgraded to v14.2 .

     

    But I just want to know if there is any alternative  for the Audit Trail error.

     

    We are having around 33 distinct objects and 530 attributes which are currently being audited , which is a tedious process to remove and add the audit attribute before and after upgrade.

     

    Can we just deactivate all the audited attributes in the  odf_audited_attributes instead of removing them ?

     

    Thanks

    Pavithra



  • 5.  Re: 14.2 Upgrade Error.

    Broadcom Employee
    Posted May 12, 2015 08:00 AM

    Hi Pavitra,

     

    Here you go doing via database.

     

    1. check attributes enabled for auditing:

    select * from odf_audited_attributes where is_active =1

     

    2. Deactivate them (get a backup list first)

    UPDATE odf_audited_attributes SET is_active =0 ;

     

    Regards

    Suman Pramanik



  • 6.  Re: 14.2 Upgrade Error.

    Posted May 12, 2015 08:05 AM

    Thanks for the quick reply Suman.

     

    I will try this solution as we are upgrading on the higher environment (Non-Prod) and will keep you posted.

     

    Regards

    Pavithra



  • 7.  Re: 14.2 Upgrade Error.

    Broadcom Employee
    Posted May 12, 2015 11:36 AM

    Hi Pavithra,

     

    Glad to hear you were able to upgrade successfully.

    This update statement will not address all the invalid audit triggers on the system, since they will still be present on the dataset. I know that the solution for manual removal is more time consuming to apply, but it guarantees you will not have the issue with the Audit triggers during the upgrade.

    Please let me know how it goes.

     

    Kind Regards

    Nika Hadzhikidi

    CA Technologies

    Principal Support Engineer