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'.

Atlassian JIRA | Husein Alatas [Atlassian] | 5 years ago
  1. 0

    h3. Problem description Importing XML backup that contains page restrictions will fail with ConstraintViolationException: {noformat} 2011-08-10 10:34:40,674 ERROR [Importing data task] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities: -- referer: http://localhost:8359/setup/setup-restore-start.action | url: /setup/setup-restore.action | userName: anonymous | action: setup-restore 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 com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:57) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $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) Caused by: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.confluence.security.ContentPermission#753668] at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:53) 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 org.apache.xerces.jaxp.SAXParserImpl.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) ... 20 more Caused by: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.confluence.security. #753668] at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:62) at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1331) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:472) 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) ... 33 more Caused by: java.sql.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.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:505) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105) at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462) ... 45 more {noformat} h3. Cause In Confluence 3.4.x or earlier, we don't check NULL value of CPS_ID under CONTENT_PERM table. We do that in 3.5.x or higher. h3. Patch Attached is a patch to address this issue that is known to work for Confluence 3.5.9 or later. It may work with 3.5.0-3.5.8, but that has not been tested. h4. Contents The patch contains 26 files in the following directories: * confluence/WEB-INF/classes/ ** upgradeSubsystemContext.xml ** com/atlassian/confluence/core/DefaultContentPermissionManager.class ** com/atlassian/confluence/core/persistence/hibernate/ConfluenceHibernateConfig.class ** com/atlassian/confluence/importexport/xmlimport/DefaultObjectPersisterFactory.class ** com/atlassian/confluence/importexport/xmlimport/persister/ *** HibernateMembershipPersister.class *** PersisterOperations.class *** 3x ReflectiveObjectPersister classes ** com/atlassian/confluence/security/ *** ContentPermission.hbm.xml *** ContentPermissionSet.hbm.xml ** com/atlassian/confluence/upgrade/ddl/ *** AlterTableExecutor.class *** DdlExecutor.class ** com/atlassian/confluence/upgrade/upgradetask/ *** AddBandanaConstrantsUpgradeTask.class *** 4x BandanaKeyUniqueConstraintCleaner classes *** 7x ContentPermissionConstraintsCleaner classes *** ContentPermissionConstraintsUpgradeTask.class h4. Installation Before installing, ensure that your backup xml zip is current. This install will remove all existing data from the database, and only use whatever you load via the backup. To install, you can: # Stop Confluence # Extract the patch into your <confluence install dir>. This will create various directories under <confluence install dir>/confuence/WEB-INF/classes. # Delete your old <confluence home dir>. # Start Confluence, and during setup, select "Restore From Backup", and restore the backup zip you which to install. Alternatively, you can: # Stop Confluence # Extract the patch into your <confluence install dir>. This will create various directories under <confluence install dir>/confuence/WEB-INF/classes. # Start Confluence # Browse to "Confluence Admin > Backup & Restore", and restore the backup zip you which to install.

    Atlassian JIRA | 5 years ago | Husein Alatas [Atlassian]
    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'.
  2. 0

    h3. Problem description Importing XML backup that contains page restrictions will fail with ConstraintViolationException: {noformat} 2011-08-10 10:34:40,674 ERROR [Importing data task] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities: -- referer: http://localhost:8359/setup/setup-restore-start.action | url: /setup/setup-restore.action | userName: anonymous | action: setup-restore 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 com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:57) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $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) Caused by: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.confluence.security.ContentPermission#753668] at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:53) 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 org.apache.xerces.jaxp.SAXParserImpl.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) ... 20 more Caused by: net.sf.hibernate.exception.ConstraintViolationException: could not insert: [com.atlassian.confluence.security. #753668] at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:62) at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1331) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:472) 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) ... 33 more Caused by: java.sql.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.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:505) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105) at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462) ... 45 more {noformat} h3. Cause In Confluence 3.4.x or earlier, we don't check NULL value of CPS_ID under CONTENT_PERM table. We do that in 3.5.x or higher. h3. Patch Attached is a patch to address this issue that is known to work for Confluence 3.5.9 or later. It may work with 3.5.0-3.5.8, but that has not been tested. h4. Contents The patch contains 26 files in the following directories: * confluence/WEB-INF/classes/ ** upgradeSubsystemContext.xml ** com/atlassian/confluence/core/DefaultContentPermissionManager.class ** com/atlassian/confluence/core/persistence/hibernate/ConfluenceHibernateConfig.class ** com/atlassian/confluence/importexport/xmlimport/DefaultObjectPersisterFactory.class ** com/atlassian/confluence/importexport/xmlimport/persister/ *** HibernateMembershipPersister.class *** PersisterOperations.class *** 3x ReflectiveObjectPersister classes ** com/atlassian/confluence/security/ *** ContentPermission.hbm.xml *** ContentPermissionSet.hbm.xml ** com/atlassian/confluence/upgrade/ddl/ *** AlterTableExecutor.class *** DdlExecutor.class ** com/atlassian/confluence/upgrade/upgradetask/ *** AddBandanaConstrantsUpgradeTask.class *** 4x BandanaKeyUniqueConstraintCleaner classes *** 7x ContentPermissionConstraintsCleaner classes *** ContentPermissionConstraintsUpgradeTask.class h4. Installation Before installing, ensure that your backup xml zip is current. This install will remove all existing data from the database, and only use whatever you load via the backup. To install, you can: # Stop Confluence # Extract the patch into your <confluence install dir>. This will create various directories under <confluence install dir>/confuence/WEB-INF/classes. # Delete your old <confluence home dir>. # Start Confluence, and during setup, select "Restore From Backup", and restore the backup zip you which to install. Alternatively, you can: # Stop Confluence # Extract the patch into your <confluence install dir>. This will create various directories under <confluence install dir>/confuence/WEB-INF/classes. # Start Confluence # Browse to "Confluence Admin > Backup & Restore", and restore the backup zip you which to install.

    Atlassian JIRA | 5 years ago | Husein Alatas [Atlassian]
    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'.
  3. 0

    [LPS-47443] Scheduler deadlock during quartz clusterCheckIn() - Liferay Issues

    liferay.com | 12 months ago
    java.sql.SQLException: Transaction ( ID 91) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Overriding JPA @Id method resulting in invalid column name exception

    Stack Overflow | 9 months ago | phani
    java.sql.SQLException: Invalid column name 'id'.
  6. 0

    After upgrading from 1.4.3 to 2.0-RC1, I am unable to create new child pages. Steps to reproduce: Create new space. From the new space's home page, click Add Page. Enter a unique name for the new page. Add some meaningless content to the page. Click Save. An HTTP 500 error occurs. The console shows the following error: 2005-10-24 17:19:23,614 WARN [bucket.cache.DefaultCacheManager] Cache named com.atlassian.confluence.core.ConfluenceWorkflowInterceptor was not in ehcache.xml. Using default settings. 2005-10-24 17:19:23,849 ERROR [sf.hibernate.util.JDBCExceptionReporter] Cannot insert the value NULL into column 'POSITION', table 'ConfluenceTest.Confluence.ANCESTORS'; column does not allow nulls. INSERT fails. 2005-10-24 17:19:23,849 ERROR [sf.hibernate.util.JDBCExceptionReporter] Cannot insert the value NULL into column 'POSITION', table 'ConfluenceTest.Confluence.ANCESTORS'; column does not allow nulls. INSERT fails. 2005-10-24 17:19:23,849 ERROR [sf.hibernate.util.JDBCExceptionReporter] could not insert collection: [com.atlassian.confluence.pages.Page.ancestors#11812] java.sql.SQLException: Cannot insert the value NULL into column 'POSITION', table 'ConfluenceTest.Confluence.ANCESTORS'; column does not allow nulls. INSERT fails. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:364) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2778) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2214) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:597) at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:465) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:427) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:397) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:104) at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22) at net.sf.hibernate.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:524) at net.sf.hibernate.impl.ScheduledCollectionRecreate.execute(ScheduledCollectionRecreate.java:23) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2375) at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1811) at net.sf.hibernate.impl.SessionImpl.findBySQL(SessionImpl.java:3802) at net.sf.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:52) at com.atlassian.confluence.core.persistence.hibernate.ContentPermissionHibernateDao$1.doInHibernate(ContentPermissionHibernateDao.java:41) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:200) at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:220) at com.atlassian.confluence.core.persistence.hibernate.ContentPermissionHibernateDao.getInheritedContentPermissions(ContentPermissionHibernateDao.java:29) at com.atlassian.confluence.core.DefaultContentPermissionManager.getInheritedContentPermissions(DefaultContentPermissionManager.java:73) at com.atlassian.confluence.core.CachingContentPermissionManager.getInheritedContentPermissions(CachingContentPermissionManager.java:64) 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:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy12.getInheritedContentPermissions(Unknown Source) at com.atlassian.confluence.search.lucene.PagePermissionsLuceneDocumentBean.addGroupPermissionFields(PagePermissionsLuceneDocumentBean.java:26) at com.atlassian.confluence.search.lucene.PagePermissionsLuceneDocumentBean.addPermissionFields(PagePermissionsLuceneDocumentBean.java:19) at com.atlassian.confluence.search.lucene.ObjectPermissionsExtractor.addFields(ObjectPermissionsExtractor.java:27) at bucket.search.lucene.BaseDocumentBuilder.getDocument(BaseDocumentBuilder.java:28) at bucket.search.lucene.LuceneIndexer.getDocument(LuceneIndexer.java:170) at bucket.search.lucene.LuceneIndexer.index(LuceneIndexer.java:50) at com.atlassian.confluence.search.lucene.LuceneConfluenceIndexer.index(LuceneConfluenceIndexer.java:40) at bucket.core.persistence.hibernate.HibernateObjectDao.index(HibernateObjectDao.java:209) at bucket.core.persistence.hibernate.HibernateObjectDao.saveRaw(HibernateObjectDao.java:152) at bucket.core.persistence.hibernate.HibernateObjectDao.save(HibernateObjectDao.java:121) at com.atlassian.confluence.core.DefaultContentEntityManager.saveContentEntity(DefaultContentEntityManager.java:58) 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:324) at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116) at com.atlassian.confluence.util.profiling.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy11.saveContentEntity(Unknown Source) at com.atlassian.confluence.pages.actions.AbstractCreatePageAction.doAdd(AbstractCreatePageAction.java:94) 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:324) at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:302) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.intercept(DefaultWorkflowInterceptor.java:55) at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:69) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.atlassian.confluence.core.ConfluenceValidationInterceptor.intercept(ConfluenceValidationInterceptor.java:16) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:40) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.pages.actions.PageAwareInterceptor.intercept(PageAwareInterceptor.java:94) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.spaces.actions.SpaceAwareInterceptor.intercept(SpaceAwareInterceptor.java:82) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.ConfluenceAutowireInterceptor.intercept(ConfluenceAutowireInterceptor.java:25) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.util.XWorkTransactionInterceptor.intercept(XWorkTransactionInterceptor.java:133) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:115) at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(ServletDispatcher.java:229) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:199) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.atlassian.confluence.util.profiling.ProfilingPageFilter.parsePage(ProfilingPageFilter.java:150) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.confluence.util.UserThreadLocalFilter.doFilter(UserThreadLocalFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:182) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:177) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170) at bucket.custom.FlushingSpringSessionInViewFilter.doFilterInternal(FlushingSpringSessionInViewFilter.java:31) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132) at com.atlassian.confluence.util.error.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.core.filters.gzip.GzipFilter.doFilter(GzipFilter.java:61) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)

    Atlassian JIRA | 1 decade ago | Piper Keairnes
    java.sql.SQLException: Cannot insert the value NULL into column 'POSITION', table 'ConfluenceTest.Confluence.ANCESTORS'; column does not allow nulls. INSERT fails.

  1. vmuller 2 times, last 10 months ago
5 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.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()
  2. jTDS
    JtdsPreparedStatement.executeUpdate
    1. net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
    2. net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
    3. net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
    4. net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
    5. net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
    6. net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
    7. net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:505)
    7 frames
  3. c3p0:JDBC DataSources/Resource Pools
    NewProxyPreparedStatement.executeUpdate
    1. com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
    1 frame
  4. net.sf.hibernate
    SessionImpl.flush
    1. net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
    2. net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462)
    3. net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436)
    4. net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37)
    5. net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2447)
    6. net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2433)
    7. net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2390)
    8. net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2259)
    8 frames
  5. com.atlassian.confluence
    BackupParser.endElement
    1. com.atlassian.confluence.importexport.xmlimport.ImportProcessorContext.flushIfNeeded(ImportProcessorContext.java:212)
    2. com.atlassian.confluence.importexport.xmlimport.ImportProcessorContext.saveObject(ImportProcessorContext.java:256)
    3. com.atlassian.confluence.importexport.xmlimport.persister.ReflectiveObjectPersister.persist(ReflectiveObjectPersister.java:119)
    4. com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.persist(DefaultImportProcessor.java:42)
    5. com.atlassian.confluence.importexport.xmlimport.DefaultImportProcessor.processObject(DefaultImportProcessor.java:32)
    6. com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:49)
    6 frames
  6. Xerces2-j
    SAXParserImpl.parse
    1. org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    2. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    3. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    4. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    5. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    6. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    7. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    8. org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    9. org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    10. org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
    10 frames
  7. Java RT
    SAXParser.parse
    1. javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
    1 frame
  8. com.atlassian.confluence
    DefaultImportExportManager.importAs
    1. com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.parseBackup(DefaultXmlImporter.java:93)
    2. com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:45)
    3. com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:237)
    4. com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:181)
    5. com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:108)
    6. com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:108)
    7. com.atlassian.confluence.importexport.Importer.doImport(Importer.java:74)
    8. com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:74)
    8 frames
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  10. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    3 frames
  11. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    1 frame
  12. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  13. Unknown
    $Proxy83.importAs
    1. $Proxy83.importAs(Unknown Source)
    1 frame
  14. com.atlassian.confluence
    ConfluenceAbstractLongRunningTask.run
    1. com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:55)
    2. com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21)
    2 frames
  15. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:662)
    1 frame