-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 9.2.15
-
Component/s: Universal Plugin Manager / Manage apps
-
None
-
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
- Install Confluence version 9.2.15
- Install any third party plugin
- Access the page <base url>/plugins/servlet/active-objects/tables/list to check for AO tables
- 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;
- Access the page <base url>/plugins/servlet/active-objects/tables/list again
- 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)
- 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";
- 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.