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

ORA-01400 and/or ORA-00955 : problem with Confluence plugins tables during migration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • None
    • 5.6.5

    Description

      During the migration of Confluence from a server to another server I faced the following errors, and managed to resolve them dropping a table and a sequence.

      Migration process applied

      • export full XML backup from source installation + data directory
      • install confluence on new server
      • import source backup in new confluence using normal import tool

      Error / Issue description

      • After migrating, no plugin would not update (the "update" box is shown and either the progress bar would get stuck or finish correctly, but after a full Confluence stop/start it would show that the plugin is still in the same version).
      • In the log, I identified 2 oracle errors : ORA-01400 (regarding the table) and ORA-00955 (regarding the sequence associated to this table).
      • The table identified by ORA-01400 was empty.

      Solution applied

      • Look in the logs and identify the Table and it's Sequence (look for ORA-00955 error for the Sequence number) .
      • Stop confluence
      • Drop the culprit table & sequence :
        select * from AO_6384AB_FEATURE_METADATA_AO
        
        DROP TABLE AO_6384AB_FEATURE_METADATA_AO;
        DROP SEQUENCE AO_6384AB_FEATURE_M675681913;
        COMMIT;
        
      • Start confluence
      • Check :
        • if logs still show the same error
        • if Confluence filled correctly the table after the restart
        • if plugins update correctly

      Error logs

      ERROR : ORA-01400

      The culprit table is empty and needs to be reconstructed.

      2016-03-02 11:25:07,717 ERROR [localhost-startStop-1] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.config.lifecycle.events.ApplicationStartedEvent@407a742d] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.confluence.plugins.featurediscovery.PluginModuleEventListener.onApplicationStart(com.atlassian.config.lifecycle.events.ApplicationStartedEvent), listener=com.atlassian.confluence.plugins.featurediscovery.PluginModuleEventListener@1cc7b1ba}]
      java.lang.RuntimeException: There was a SQL exception thrown by the Active Objects library:
      Database:
          - name:Oracle
          - version:Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
      With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
          - minor version:1
          - major version:12
      Driver:
          - name:Oracle JDBC driver
          - version:12.1.0.2.0
      
      java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("CONFPROD"."AO_6384AB_FEATURE_METADATA_AO"."ID")
      
          at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
          at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:48)
          at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
          at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:107)
          at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160)
          at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79)
          at com.atlassian.confluence.event.TimingEventPublisher.publish(TimingEventPublisher.java:73)
          at com.atlassian.config.lifecycle.DefaultLifecycleManager.startUp(DefaultLifecycleManager.java:43)
          at com.atlassian.config.lifecycle.LifecycleServletContextListener.contextInitialized(LifecycleServletContextListener.java:17)
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
      Caused by: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
      
      

      And the sequence error :

      2016-03-03 09:50:30,209 ERROR [active-objects-init-system tenant-0] [net.java.ao.sql] handleUpdateError Exception executing SQL update <CREATE SEQUENCE "AO_6384AB_FEATURE_M675681913" INCREMENT BY 1 START WITH 1 NOMAXVALUE MINVALUE 1>
      java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
      

      References

      this solution was inspired by the following 2 pages :

      Attachments

        Activity

          People

            Unassigned Unassigned
            aa669d2c261c Corentin Méhat
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: