-
Bug
-
Resolution: Fixed
-
Highest
-
63
-
Severity 2 - Major
-
13
-
NOTE: This bug report is for Confluence Cloud. Using Confluence Server? See the corresponding bug report.
Summary
Space imports are failing with the following error message displayed on the UI:
Import failed. Check your server logs for more information. com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: org.hibernate.exception.ConstraintViolationException: could not execute statement
Environment
- Confluence Cloud 1000.518.1
Steps to Reproduce
- Perform a space import
Expected Results
The space is imported successfully.
Actual Results
The space failed with the error message mentioned above.
@40000000582db878227ba10c com.atlassian.confluence.importexport.ImportExportException: com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: org.hibernate.exception.ConstraintViolationException: could not execute statement @40000000582db878227be75c at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:416) @40000000582db878227be75c at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:377) @40000000582db878227c1254 at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:145) @40000000582db878227c1254 at com.atlassian.confluence.importexport.xmlimport.BackupImporter$1.doInTransactionWithoutResult(BackupImporter.java:263) @40000000582db878227c29c4 at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) @40000000582db878227c29c4 at com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:46) @40000000582db878227c3964 at com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction(RestoreBandanaValuesTransactionCallbackDecorator.java:50) @40000000582db878227c3d4c at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) @40000000582db878227c4904 at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:225) @40000000582db878227c4cec at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:75) @40000000582db878227c4cec at com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(DefaultImportExportManager.java:96) @40000000582db878227c58a4 at com.atlassian.confluence.importexport.DefaultImportExportManager.doPerformImport(DefaultImportExportManager.java:87) @40000000582db878227c6c2c at com.atlassian.confluence.importexport.DefaultImportExportManager.performImport(DefaultImportExportManager.java:82) @40000000582db878227c6c2c at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) @40000000582db878227c7014 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) @40000000582db878227c7014 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) @40000000582db878227c7fb4 at java.lang.reflect.Method.invoke(Method.java:498) @40000000582db878227c7fb4 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) @40000000582db878227c839c at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) @40000000582db878227c839c at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) @40000000582db878227c8f54 at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) @40000000582db878227c933c at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) @40000000582db878227ca6c4 at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) @40000000582db878227ca6c4 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) @40000000582db878227caaac at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) @40000000582db878227cb664 at com.sun.proxy.$Proxy142.performImport(Unknown Source) @40000000582db878227cb664 at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:68) @40000000582db878227cba4c at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:45) @40000000582db878227cba4c at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:52) @40000000582db878227cc9ec at com.atlassian.confluence.impl.util.concurrent.ConfluenceExecutors$ThreadLocalContextTaskWrapper.lambda$wrap$1(ConfluenceExecutors.java:89) @40000000582db878227cc9ec at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$doInRequestContext$0(VCacheRequestContextOperations.java:49) @40000000582db878227ce544 at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:87) @40000000582db878227ce92c at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:77) @40000000582db878227ce92c at com.atlassian.confluence.vcache.VCacheRequestContextOperations.doInRequestContext(VCacheRequestContextOperations.java:48) @40000000582db878227cf8cc at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$withRequestContext$2(VCacheRequestContextOperations.java:65) @40000000582db878227cf8cc at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) @40000000582db878227cfcb4 at java.util.concurrent.FutureTask.run(FutureTask.java:266) @40000000582db878227cfcb4 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) @40000000582db878227d0c54 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) @40000000582db878227d0c54 at java.lang.Thread.run(Thread.java:745) @40000000582db878227d0c54 Caused by: com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: org.hibernate.exception.ConstraintViolationException: could not execute statement @40000000582db878227d1fdc at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:67) @40000000582db878227d1fdc at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:408) @40000000582db878227d23c4 ... 39 more @40000000582db878227d2f7c Caused by: org.xml.sax.SAXException: Error while importing backup: org.hibernate.exception.ConstraintViolationException: could not execute statement @40000000582db878227d3364 net.sf.hibernate.HibernateException: org.hibernate.exception.ConstraintViolationException: could not execute statement @40000000582db878227d3364 at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:45) @40000000582db878227d374c at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) @40000000582db878227d4304 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) @40000000582db878227d4304 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) @40000000582db878227d46ec at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) @40000000582db878227d46ec at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) @40000000582db878227d568c at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) @40000000582db878227d5a74 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) @40000000582db878227d5a74 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) @40000000582db878227d5a74 at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) @40000000582db878227d5e5c at com.atlassian.security.xml.RestrictedXMLReader.parse(RestrictedXMLReader.java:103) @40000000582db878227d6a14 at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.parseBackup(DefaultXmlImporter.java:89) @40000000582db878227d6dfc at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:54) @40000000582db878227d6dfc ... 40 more @40000000582db878227d6dfc Caused by: net.sf.hibernate.HibernateException: org.hibernate.exception.ConstraintViolationException: could not execute statement @40000000582db878227d7d9c at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:147) @40000000582db878227d7d9c at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155) @40000000582db878227d8184 at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:162) @40000000582db878227d9cdc at com.atlassian.hibernate.util.SessionHelper.flushAllowNoTransaction(SessionHelper.java:83) @40000000582db878227d9cdc at com.atlassian.hibernate.adapter.adapters.session.SessionV2Adapter.flush(SessionV2Adapter.java:135) @40000000582db878227d9cdc at com.atlassian.confluence.importexport.xmlimport.HibernateImportProcessorContext.flushIfNeeded(HibernateImportProcessorContext.java:174) @40000000582db878227dac7c at com.atlassian.confluence.importexport.xmlimport.HibernateImportProcessorContext.objectImported(HibernateImportProcessorContext.java:59) @40000000582db878227dac7c at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.persist(DefaultImportProcessor.java:44) @40000000582db878227db064 at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:34) @40000000582db878227dd38c at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:43) @40000000582db878227dd774 ... 52 more @40000000582db878227dd774 Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement @40000000582db878227ddb5c at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112) @40000000582db878227deafc at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) @40000000582db878227deee4 at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) @40000000582db878227deee4 at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) @40000000582db878227deee4 at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) @40000000582db878227dfe84 at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45) @40000000582db878227dfe84 at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2934) @40000000582db878227e026c at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3434) @40000000582db878227e026c at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89) @40000000582db878227e120c at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:582) @40000000582db878227e120c at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:456) @40000000582db878227e120c at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337) @40000000582db878227e2594 at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39) @40000000582db878227e2594 at com.atlassian.hibernate.util.SessionHelper.flushAllowNoTransaction(SessionHelper.java:80) @40000000582db878227e297c ... 58 more @40000000582db878227e297c Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uk_jp1ad5yufsih5r7lqrygakpug" @40000000582db878227e3534 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157) @40000000582db878227e391c at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886) @40000000582db878227e391c at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) @40000000582db878227e3d04 at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) @40000000582db878227e48bc at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) @40000000582db878227e48bc at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363) @40000000582db878227e4ca4 at sun.reflect.GeneratedMethodAccessor275.invoke(Unknown Source) @40000000582db878227e5c44 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) @40000000582db878227e5c44 at java.lang.reflect.Method.invoke(Method.java:498) @40000000582db878227e602c at com.github.gquintana.metrics.proxy.MethodInvocation.proceed(MethodInvocation.java:75) @40000000582db878227e602c at com.github.gquintana.metrics.sql.PreparedStatementProxyHandler.execute(PreparedStatementProxyHandler.java:55) @40000000582db878227e779c at com.github.gquintana.metrics.sql.AbstractStatementProxyHandler.invoke(AbstractStatementProxyHandler.java:61) @40000000582db878227e779c at com.github.gquintana.metrics.proxy.ProxyHandler.invoke(ProxyHandler.java:73) @40000000582db878227e7b84 at com.sun.proxy.$Proxy579.executeUpdate(Unknown Source) @40000000582db878227e7b84 at sun.reflect.GeneratedMethodAccessor275.invoke(Unknown Source) @40000000582db878227e873c at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) @40000000582db878227e8b24 at java.lang.reflect.Method.invoke(Method.java:498) @40000000582db878227e8b24 at org.vibur.dbcp.proxy.AbstractInvocationHandler.targetInvoke(AbstractInvocationHandler.java:153) @40000000582db878227e8f0c at org.vibur.dbcp.proxy.StatementInvocationHandler.processExecute(StatementInvocationHandler.java:141) @40000000582db878227e9eac at org.vibur.dbcp.proxy.StatementInvocationHandler.restrictedInvoke(StatementInvocationHandler.java:83) @40000000582db878227ea294 at org.vibur.dbcp.proxy.StatementInvocationHandler.restrictedInvoke(StatementInvocationHandler.java:40) @40000000582db878227ea294 at org.vibur.dbcp.proxy.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:80) @40000000582db878227ea67c at com.sun.proxy.$Proxy579.executeUpdate(Unknown Source) @40000000582db878227eb234 at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) @40000000582db878227eb61c ... 67 more
Workaround
This is often caused by there being two spaces in a single space export file. The workaround is to import the export file into a Confluence Server instance, then re-export just the one single space you're trying to import in the first place.
- is related to
-
CONFSERVER-45278 Space import failing with the error message "could not execute statement"
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...