com.atlassian.confluence.importexport.ImportExportException: Unable to complete import because the data does not match the constraints in the Confluence schema. Cause: SQLException: Violation of UNIQUE KEY constraint 'cp_unique_user_groups'. Cannot insert duplicate key in object 'dbo.CONTENT_PERM'.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Atlassian JIRA by Husein Alatas [Atlassian], 1 year ago
Unable to complete import because the data does not match the constraints in the Confluence schema. Cause: SQLException: Violation of UNIQUE KEY constraint 'cp_unique_user_groups'. Cannot insert duplicate key in object 'dbo.CONTENT_PERM'.
via Atlassian JIRA by Husein Alatas [Atlassian], 1 year ago
Unable to complete import because the data does not match the constraints in the Confluence schema. Cause: SQLException: Violation of UNIQUE KEY constraint 'cp_unique_user_groups'. Cannot insert duplicate key in object 'dbo.CONTENT_PERM'.
via Atlassian JIRA by Gurleen Anand [Atlassian], 1 year ago
Unable to complete import: Error while importing backup: No enum const class com.atlassian.confluence.search.service.ContentTypeEnum.
via Atlassian JIRA by Gurleen Anand [Atlassian], 1 year ago
Unable to complete import: Error while importing backup: No enum const class com.atlassian.confluence.search.service.ContentTypeEnum.
via atlassian.com by Unknown author, 1 year ago
Unable to complete import: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType
via Atlassian JIRA by Gonchik Tsymzhitov, 1 year ago
Unable to complete import: Error while importing backup: not-null property references a null or transient value: com.atlassian.confluence.pages.Attachment.contentType
com.atlassian.confluence.importexport.ImportExportException: Unable to complete import because the data does not match the constraints in the Confluence schema. Cause: SQLException: Violation of UNIQUE KEY constraint 'cp_unique_user_groups'. Cannot insert duplicate key in object 'dbo.CONTENT_PERM'.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2447)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2433)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2390)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2259)
at com.atlassian.confluence.importexport.xmlimport.ImportProcessorContext.flushIfNeeded(ImportProcessorContext.java:212)
at com.atlassian.confluence.importexport.xmlimport.ImportProcessorContext.saveObject(ImportProcessorContext.java:256)
at com.atlassian.confluence.importexport.xmlimport.persister.ReflectiveObjectPersister.persist(ReflectiveObjectPersister.java:119)
at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.persist(DefaultImportProcessor.java:42)
at com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:32)
at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:49)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.parseBackup(DefaultXmlImporter.java:93)
at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:45)
at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:237)
at com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:181)
at com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:108)
at com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:108)
at com.atlassian.confluence.importexport.Importer.doImport(Importer.java:74)
at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at undefined.$Proxy83.importAs(Unknown Source)
at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:55)
at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21)
at java.lang.Thread.run(Thread.java:662)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 1 year ago
9 times, 6 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
23 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.