Bug with Oracle in Jira: "Could not read fields for table AO_42D05A_DBREMOTEREQUIREMENT_BK"
Activity
Show:
Answered / Support Question
Details
Details
Assignee
Reporter
Sprint
None
Labels
Release date
Dec 18, 2023
Affects versions
Requirement Yogi
Linked requirements
Requirement Yogi
Linked requirements
Created December 15, 2023 at 5:18 PM
Updated December 21, 2023 at 2:58 PM
Resolved December 18, 2023 at 7:38 PM
Issue with Jira under Oracle, see customer case.
Current status
We believe the table AO_42D05A_DBREMOTEREQUIREMENT_BK was created by the customer as a backup of AO_42D05A_DBREMOTEREQUIREMENT. Its presence makes ActiveObjects crash.
We’re discussing with the customer to ensure that this table is not useful to anything, and if not, we’ll recommend deleting this table.
We’ve positively tested that after deleting the table, the ActiveObjects API starts working again.
Investigation notes
Errors are of the kind:
Could not read fields for table AO_42D05A_DBREMOTEREQUIREMENT_BK
It happens on
net.java.ao.EntityManager.migrate(EntityManager.java:131)
The thing is:
If we write upgrade tasks (which aren’t always necessary), we’re supposed to call .migrate() ourselves. Jira is doing it instead of us, so, does it cause any other issue?
The table
AO_42D05A_DBREMOTEREQUIREMENT_BK
doesn’t even exist!Does this customer have a specific TableNameConverter? Logs below let me suspicious (see below),
Does this customer have a backup plugin which creates backup tables for each table?
Atlassian has this error explained somewhere, https://confluence.atlassian.com/jirakb/xml-backup-or-restore-fails-due-to-could-not-read-fields-for-table-317947954.html, where they say if ActiveObjects creates an error about a table that doesn’t exist, we should just drop that table. Seems daring. Would work. Not like we need the _BK table which shouldn’t exist. But they say it’s on MS SQL, and/or when the schema wasn’t specified.
Technical references:
The error is thrown at https://bitbucket.org/server-platform/activeobjects/src/master/ao/activeobjects-core/src/net/java/ao/schema/helper/DatabaseMetaDataReaderImpl.java#lines-135
The getFields() algorithm seems to be called for EVERY table of the schema: https://bitbucket.org/server-platform/activeobjects/src/master/ao/activeobjects-core/src/net/java/ao/schema/ddl/SchemaReader.java#lines-99
Trying the execution, I could note that, if such a table was manually created, it fails in the same way in Jira.
Questions:
Does this customer have a specific TableNameConverter? Logs below let me suspicious (see below),
Has this client created the _BK tables themselves?
With other logs such as: