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

Upgrade task fails with Oracle when trying to create an index that already exists

      Exception observed:
      [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: create index l_contentid_idx on LINKS (CONTENTID)
      [hibernate.tool.hbm2ddl.SchemaUpdate] execute ORA-01408: such column list already indexed

      This causes the upgrade process to fail on the spot.
      The process should either accept this as a kind of success and move on, or remove and re-create the index just to make sure.

          Form Name

            [CONFSERVER-15228] Upgrade task fails with Oracle when trying to create an index that already exists

            Hi All,

            We've fixed all the known issues we were able to identify in 4.3.7, and introduced automated testing for Oracle across multiple versions of Confluence where previously we were only testing upgrading from the one version of Confluence.

            If the problem happen again to any of the Upgrade Tasks trying to create indexes, please create a specific new ticket for that failure listing the indexes which caused the failure.

            Cheers,
            Renan

            Renan Battaglin added a comment - Hi All, We've fixed all the known issues we were able to identify in 4.3.7, and introduced automated testing for Oracle across multiple versions of Confluence where previously we were only testing upgrading from the one version of Confluence. If the problem happen again to any of the Upgrade Tasks trying to create indexes, please create a specific new ticket for that failure listing the indexes which caused the failure. Cheers, Renan

            Hi Angel,
            I've opened: https://jira.atlassian.com/browse/CONF-27533 for the specific problem you've encountered and will be addressing it immediately.

            Steve Lancashire (Inactive) added a comment - Hi Angel, I've opened: https://jira.atlassian.com/browse/CONF-27533 for the specific problem you've encountered and will be addressing it immediately.

            Angel Ruiz added a comment -

            Maybe the problem comes from the fact that it is still using Hibernate 2.1.X. Holy s**t!!!

            I cannot even use the Oracle10G dialect in the confluence.cfg.xml file.

            Angel Ruiz added a comment - Maybe the problem comes from the fact that it is still using Hibernate 2.1.X. Holy s**t!!! I cannot even use the Oracle10G dialect in the confluence.cfg.xml file.

            Angel Ruiz added a comment - - edited

            Upgrading from 4.2 to 4.3.1 and I got the same bloody error with Oracle 10g and it is about time to fix it ,or at least mention it in the upgrade notes please, because I have spent quite amount of time searching for the solution:

            2012-10-05 15:39:12,624 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: create index attch_data_idx on ATTACHMENTDATA (ATTACHMENTID)
            2012-10-05 15:39:12,632 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ORA-01408: such column list already indexed
            

            the upgrade was performed when I added the famous line to the confluence.cfg.xml file:

            <property name="hibernate.hbm2ddl.skip_creating_missing_indexes">true</property>
            

            don't know if that will have some sort of side effects...

            I would also like to mention that we did not perform any customization in the indexes. The indexes were created by the fresh installation of Confluence version 4.2

            Angel Ruiz added a comment - - edited Upgrading from 4.2 to 4.3.1 and I got the same bloody error with Oracle 10g and it is about time to fix it ,or at least mention it in the upgrade notes please, because I have spent quite amount of time searching for the solution: 2012-10-05 15:39:12,624 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: create index attch_data_idx on ATTACHMENTDATA (ATTACHMENTID) 2012-10-05 15:39:12,632 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ORA-01408: such column list already indexed the upgrade was performed when I added the famous line to the confluence.cfg.xml file: <property name="hibernate.hbm2ddl.skip_creating_missing_indexes">true</property> don't know if that will have some sort of side effects... I would also like to mention that we did not perform any customization in the indexes. The indexes were created by the fresh installation of Confluence version 4.2

            Anatoli added a comment -

            Hi Brain,

            Source code access is available for commercial and academic license holders. You can download the source here

            Anatoli.

            Anatoli added a comment - Hi Brain, Source code access is available for commercial and academic license holders. You can download the source here Anatoli.

            Maintaining that list should not be difficult to do. Since you're using Hibernate to create those indexes all the information is in the Hibernate configuration. You should be able to extract the list from config file(s).

            I don't think it's an unreasonable request. Of course, you could also open source Confluence and then I could generate the entire list myself

            Brian Brian added a comment - Maintaining that list should not be difficult to do. Since you're using Hibernate to create those indexes all the information is in the Hibernate configuration. You should be able to extract the list from config file(s). I don't think it's an unreasonable request. Of course, you could also open source Confluence and then I could generate the entire list myself

            Anatoli added a comment -

            Hi Chris,

            Unfortunately we don't maintain the list of indexes for a specific version of confluence. However it is very easy to obtain such a list just by installing a particular version of confluence using an empty db schema. You will then be able to see all the indexes created in that schema.

            Anatoli.

            Anatoli added a comment - Hi Chris, Unfortunately we don't maintain the list of indexes for a specific version of confluence. However it is very easy to obtain such a list just by installing a particular version of confluence using an empty db schema. You will then be able to see all the indexes created in that schema. Anatoli.

            Hi, I am seeing this problem. I'm trying to upgrade a dev instance from 2.9.1 to 2.10.3. I am getting these errors:

            2009-05-12 12:21:39,563 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: create index el_contentid_idx on EXTRNLNKS (CONTENTID)
            2009-05-12 12:21:39,566 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ORA-01408: such column list already indexed

            I think at some point the DBAs did add an index to something when we were having performance problems, so it could be a custom added index causing trouble.

            I received this advice from this issue i lodged: https://support.atlassian.com/browse/CSP-32036

            "However, there is a workaround for your issue, you will need set the system property hibernate.hbm2ddl.skip_creating_missing_indexes to true to avoid automatic index creation before the upgrade."

            This is ok - but I want to know, after the upgrade how can i confirm that I have all the right indexes setup? Is there a list to verify?

            Chris Grist added a comment - Hi, I am seeing this problem. I'm trying to upgrade a dev instance from 2.9.1 to 2.10.3. I am getting these errors: 2009-05-12 12:21:39,563 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: create index el_contentid_idx on EXTRNLNKS (CONTENTID) 2009-05-12 12:21:39,566 ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute ORA-01408: such column list already indexed I think at some point the DBAs did add an index to something when we were having performance problems, so it could be a custom added index causing trouble. I received this advice from this issue i lodged: https://support.atlassian.com/browse/CSP-32036 "However, there is a workaround for your issue, you will need set the system property hibernate.hbm2ddl.skip_creating_missing_indexes to true to avoid automatic index creation before the upgrade." This is ok - but I want to know, after the upgrade how can i confirm that I have all the right indexes setup? Is there a list to verify?

            I believe there were a few indexes that were added to the script that would not be generated if upgrading between versions of Confluence prior to 2.10.
            This could be responsible for the problems you have encountered.

            Andrew Lynch (Inactive) added a comment - I believe there were a few indexes that were added to the script that would not be generated if upgrading between versions of Confluence prior to 2.10. This could be responsible for the problems you have encountered.

            This was opened based on a support case we opened. In our scenario, we hadn't performed any index customization. In the past, because the database user that didn't have create object permissions we had used a SQL script that Atlassian provided to create the indexes. This script is no longer available so we're attempting to get this method to work.

            Is it possible that the SQL script created indexes with different names or columns than the hibernate version would have?

            I looked at our database and the following indexes exist on the LINKS table:

            LINKS_IDX1 (CONTENTID)
            LINKS_IDS2 (DESTSPACEKEY)
            SYS_C004499 (LINKID) (unique index)

            Are these different than the indexes the upgrade procedure would attempt to create?

            I agree that simply continuing when getting this error is not the correct resolution, we've run much older versions of Confluence without the necessary indexes and it's painful.

            Brian Brian added a comment - This was opened based on a support case we opened. In our scenario, we hadn't performed any index customization. In the past, because the database user that didn't have create object permissions we had used a SQL script that Atlassian provided to create the indexes. This script is no longer available so we're attempting to get this method to work. Is it possible that the SQL script created indexes with different names or columns than the hibernate version would have? I looked at our database and the following indexes exist on the LINKS table: LINKS_IDX1 (CONTENTID) LINKS_IDS2 (DESTSPACEKEY) SYS_C004499 (LINKID) (unique index) Are these different than the indexes the upgrade procedure would attempt to create? I agree that simply continuing when getting this error is not the correct resolution, we've run much older versions of Confluence without the necessary indexes and it's painful.

              slancashire Steve Lancashire (Inactive)
              jfleming James Fleming (Inactive)
              Affected customers:
              8 This affects my team
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: