Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-60274

'Could not get unique fields for table' errors constantly printed on the logs after installation

XMLWordPrintable

      Problem

      Could not get unique fields for table and java.sql.SQLException: Invalid argument(s) in call errors after installation. Some UI functions might also not be working properly, like the workbox notifications or other menus.

      Environment

      1. Oracle Database

      Steps to Reproduce

      1. Follow the documentation to configure Oracle
      2. While running it, Create a user with a dot on the name (example: conf.admin)
      3. Install Confluence and connect to this database

      Expected Results

      No errors are seen and the instance works as expected.

      Actual Results

      Some UI functionalities fail and this is seen repeateadly on the atlassian-confluence.log file:

      /rest/mywork/latest/status/notification/count | traceId: e33f4ce1cc7be186 | userName: admin
      java.lang.RuntimeException: bundle [com.atlassian.mywork.confluence-host-plugin]. Listener: com.atlassian.mywork.host.service.ClientServiceImpl event: com.atlassian.mywork.host.event.BeforeCountNewNotificationsEvent
          at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:57)
          ...
      Caused by: com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle [com.atlassian.mywork.confluence-host-plugin]
          at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:95)
      Caused by: java.lang.RuntimeException: Could not get unique fields for table 'AO_9412A1_AONOTIFICATION'
          at net.java.ao.schema.helper.DatabaseMetaDataReaderImpl.getUniqueFields(DatabaseMetaDataReaderImpl.java:191)
          at net.java.ao.schema.helper.DatabaseMetaDataReaderImpl.getFields(DatabaseMetaDataReaderImpl.java:85)
      Caused by: java.sql.SQLException: Invalid argument(s) in call
          at oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:3777)
      

      Workaround

      Since Oracle does not allow renaming the schema, you need to drop it and create a new one without dots. Following the initial example, conf_admin should work fine. On the Confluence side, restart the application setup so it can create the tables on the new schema:

      1. Stop Confluence
      2. Remove <Confluence-home>/confluence.cfg.xml
      3. Restart Confluence
      4. You should be prompted to complete the setup again

      Notes

      This has previously been reported as a suggestion, but opening it as a bug since Oracle itself allows schema names with dots based on the documentation:

              Unassigned Unassigned
              bandreeti Bernardo Andreeti
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: