Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-14145

JIRA restore fails when using embedded ( HSQL ) database due to DVCS connector

    XMLWordPrintable

Details

    Description

      Workaround: Use an external database

      When restoring JIRA data using the embedded database JIRA begins to fail when attempting to re-index issues:

      2014-09-22 09:31:00,677 IssueIndexer:thread-5 ERROR anonymous 568x18x1 mzcdh9 0:0:0:0:0:0:0:1 /secure/SetupImport.jspa [net.java.ao.sql] Exception executing SQL update <ALTER TABLE PUBLIC.AO_E8B6CC_MESSAGE_QUEUE_ITEM DROP CONSTRAINT fk_ao_e8b6cc_message_queue_item_message_id>
      java.sql.SQLException: Constraint not found FK_AO_E8B6CC_MESSAGE_QUEUE_ITEM_MESSAGE_ID in table: AO_E8B6CC_MESSAGE_QUEUE_ITEM in statement [ALTER TABLE PUBLIC.AO_E8B6CC_MESSAGE_QUEUE_ITEM DROP CONSTRAINT fk_ao_e8b6cc_message_queue_item_message_id]
      	at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
      	at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
      	at org.hsqldb.jdbc.jdbcStatement.executeUpdate(Unknown Source)
      	at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
      	at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
      	at net.java.ao.DatabaseProvider.executeUpdate(DatabaseProvider.java:2352)
      	at net.java.ao.DatabaseProvider.executeUpdateForAction(DatabaseProvider.java:2422)
      	at net.java.ao.DatabaseProvider.executeUpdatesForActions(DatabaseProvider.java:2385)
      	at net.java.ao.schema.SchemaGenerator.migrate(SchemaGenerator.java:99)
      	at net.java.ao.EntityManager.migrate(EntityManager.java:128)
      	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:44)
      	at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:74)
      	at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:68)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25)
      	at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34)  <+2>
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
      	at com.sun.proxy.$Proxy32.doInTransaction(Unknown Source)  <+2>
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154)
      	at com.sun.proxy.$Proxy32.doInTransaction(Unknown Source)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21)  <+3>
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at com.sun.proxy.$Proxy4185.execute(Unknown Source)
      	at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.create(AbstractActiveObjectsFactory.java:67)
      	at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:39)
      	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory.createActiveObjects(ActiveObjectsServiceFactory.java:136)
      	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory.access$000(ActiveObjectsServiceFactory.java:51)
      	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$1$1.get(ActiveObjectsServiceFactory.java:65)
      	at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$1$1.get(ActiveObjectsServiceFactory.java:61)
      	at com.atlassian.activeobjects.osgi.DelegatingActiveObjects$MemoizingSupplier.get(DelegatingActiveObjects.java:156)
      	at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.find(DelegatingActiveObjects.java:93)  <+3>
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at com.sun.proxy.$Proxy6113.find(Unknown Source)
      	at com.atlassian.jira.plugins.dvcs.dao.impl.OrganizationDaoImpl.getAllByType(OrganizationDaoImpl.java:167)
      	at com.atlassian.jira.plugins.dvcs.service.OrganizationServiceImpl.getAll(OrganizationServiceImpl.java:70)
      	at com.atlassian.jira.plugins.dvcs.service.api.DvcsLinkServiceImpl.getDvcsLinks(DvcsLinkServiceImpl.java:40)
      	at com.atlassian.jira.plugin.devstatus.provider.source.dvcs.DvcsFacade.hasDvcsAccounts(DvcsFacade.java:34)
      	at com.atlassian.jira.plugin.devstatus.provider.source.dvcs.DvcsProviderSource.availableProviders(DvcsProviderSource.java:57)
      	at com.atlassian.jira.plugin.devstatus.provider.DefaultDataProviderHelper.wrapInCachedProvider(DefaultDataProviderHelper.java:128)
      	at com.atlassian.jira.plugin.devstatus.provider.DefaultDataProviderHelper.getDataProviders(DefaultDataProviderHelper.java:57)
      	at com.atlassian.jira.plugin.devstatus.summary.cache.DevSummaryCache.getDevSummary(DevSummaryCache.java:77)
      	at com.atlassian.jira.plugin.devstatus.summary.indexing.DevSummaryIssueSearchExtractor.getDevSummary(DevSummaryIssueSearchExtractor.java:95)
      	at com.atlassian.jira.plugin.devstatus.summary.indexing.DevSummaryIssueSearchExtractor.indexEntity(DevSummaryIssueSearchExtractor.java:65)
      	at com.atlassian.jira.index.EntityDocumentFactory$EntityDocumentBuilder.addAllExtractors(EntityDocumentFactory.java:38)
      	at com.atlassian.jira.issue.index.DefaultIssueDocumentFactory.apply(DefaultIssueDocumentFactory.java:60)
      	at com.atlassian.jira.issue.index.DefaultIssueDocumentFactory.apply(DefaultIssueDocumentFactory.java:37)
      	at com.atlassian.jira.issue.index.DefaultIssueIndexer$DefaultDocumentCreationStrategy.get(DefaultIssueIndexer.java:664)
      	at com.atlassian.jira.issue.index.DefaultIssueIndexer$IndexIssuesOperation.perform(DefaultIssueIndexer.java:502)
      	at com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:337)
      	at com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:333)
      	at com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:9)
      	at com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:5)
      	at com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:38)
      	at com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:35)
      	at com.atlassian.jira.util.concurrent.BoundedExecutor$2.call(BoundedExecutor.java:77)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      

      This problem does not occur when using PostgreSQL and most likely all other external databases

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jcurry Jeff Curry
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: