Moving AO tables created by inactive plugins to another schema breaks the Plugin Data Storage admin page

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      Moving the AO table for inactive plugins (shows as unknown in the Plugin Data Storage admin page) to a different schema for archival breaks the Plugin Data Storage admin page at <baseurl>/plugins/servlet/active-objects/tables/list_ URL and results in a system error.

      Steps to Reproduce

      1. Install Confluence version 9.2.15
      2. Install any third party plugin
      3. Access the page <base url>/plugins/servlet/active-objects/tables/list to check for AO tables
      4. Create a test schema in the database and move the unknown plugin tables to this schema
      CREATE SCHEMA cleanup_test; 
      ALTER TABLE "AO_12345_XY" SET SCHEMA cleanup_test;
      1. Access the page <base url>/plugins/servlet/active-objects/tables/list again
      2. It will result in system error

      Expected Results

      The AO url <base url>/plugins/servlet/active-objects/tables/list should load without any error.

      Actual Results

      • System error encountered
      • following error in atlassian-confluence.log 
         
        java.lang.RuntimeException: Could not read fields for table AO_793864_CSVURL at net.java.ao.schema.helper.DatabaseMetaDataReaderImpl.getFields(DatabaseMetaDataReaderImpl.java:146) at net.java.ao.schema.ddl.SchemaReader.readFields(SchemaReader.java:150) at net.java.ao.schema.ddl.SchemaReader.readTable(SchemaReader.java:132) at net.java.ao.schema.ddl.SchemaReader.access$000(SchemaReader.java:63) at net.java.ao.schema.ddl.SchemaReader$1.apply(SchemaReader.java:117) at net.java.ao.schema.ddl.SchemaReader$1.apply(SchemaReader.java:115) at com.google.common.collect.Iterators$6.transform(Iterators.java:829) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:52) at com.google.common.collect.Iterators.addAll(Iterators.java:366) at com.google.common.collect.Lists.newArrayList(Lists.java:147)

      Workaround

      To mitigate the issue please follow this two-step workaround (Recommended Approach)

      1. Rename the table (removes the AO_ prefix so Active Objects ignores it completely)
      ALTER TABLE "AO_C2ED07_LINK_TYPE" RENAME TO "BACKUP_AO_C2ED07_LINK_TYPE";
      1. Move this table another schema (now safe, since AO is already ignoring it).
        (i)The order matters, rename must come first. This will fully achieve the goal of archiving unused AO tables out of the main schema without breaking anything.

              Assignee:
              Unassigned
              Reporter:
              Disha Rathore
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: