2006-01-11 13:08:44,618 INFO [com.atlassian.confluence.lifecycle] Starting Confluence 2.1.1 (build #406)
      2006-01-11 13:10:32,508 WARN [sf.hibernate.cache.EhCache] Could not find configuration for com.opensymphony.user.provider.hibernate.impl.HibernateUserImpl.groups. Configuring using the defaultCache settings.
      2006-01-11 13:10:32,524 WARN [sf.hibernate.cache.EhCache] Could not find configuration for com.atlassian.confluence.pages.Draft. Configuring using the defaultCache settings.
      2006-01-11 13:10:32,524 WARN [sf.hibernate.cache.EhCache] Could not find configuration for com.opensymphony.user.provider.hibernate.impl.HibernateUserImpl. Configuring using the defaultCache settings.
      2006-01-11 13:10:32,524 WARN [sf.hibernate.cache.EhCache] Could not find configuration for com.atlassian.user.impl.hibernate.DefaultHibernateUser. Configuring using the defaultCache settings.
      2006-01-11 13:10:32,524 WARN [sf.hibernate.cache.EhCache] Could not find configuration for com.atlassian.user.impl.hibernate.DefaultHibernateExternalEntity. Configuring using the defaultCache settings.
      2006-01-11 13:10:32,524 WARN [sf.hibernate.cache.EhCache] Could not find configuration for com.atlassian.user.impl.hibernate.DefaultHibernateGroup. Configuring using the defaultCache settings.
      2006-01-11 13:10:32,524 WARN [sf.hibernate.cache.EhCache] Could not find configuration for com.opensymphony.user.provider.hibernate.impl.HibernateGroupImpl. Configuring using the defaultCache settings.
      2006-01-11 13:10:36,164 WARN [sf.hibernate.cache.EhCache] Could not find configuration for net.sf.hibernate.cache.StandardQueryCache. Configuring using the defaultCache settings.
      2006-01-11 13:10:59,367 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table os_user_group add constraint FK932472461E2E76DB foreign key (group_id) references os_group (id)
      2006-01-11 13:10:59,367 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_35.frm' (errno: 150)"
      2006-01-11 13:11:01,039 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table CONFANCESTORS add constraint FK9494E23C37E35A2E foreign key (ANCESTORID) references CONTENT (CONTENTID)
      2006-01-11 13:11:01,055 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_35.frm' (errno: 150)"
      2006-01-11 13:11:03,336 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table local_members add constraint FK6B8FB445CE2B3226 foreign key (userid) references users (id)
      2006-01-11 13:11:03,336 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_35.frm' (errno: 150)"
      2006-01-11 13:11:03,601 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table external_members add constraint FKD8C8D8A5F25E5D5F foreign key (extentityid) references external_entities (id)
      2006-01-11 13:11:03,601 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_35.frm' (errno: 150)"
      2006-01-11 13:11:05,055 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table CONTENT add constraint FK6382C0598C38FBEA foreign key (PAGEID) references CONTENT (CONTENTID)
      2006-01-11 13:11:05,055 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_35.frm' (errno: 150)"
      2006-01-11 13:11:50,898 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create table groups (id bigint not null, groupname varchar(255) not null, primary key (id))
      2006-01-11 13:11:50,898 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Table 'groups' already exists"
      2006-01-11 13:11:51,070 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create table SPACES (SPACEID bigint not null, SPACENAME varchar(255), SPACEKEY varchar(255) not null unique, SPACEDESCID bigint, HOMEPAGE bigint, CREATOR varchar(255), CREATIONDATE datetime, LASTMODIFIER varchar(255), LASTMODDATE datetime, primary key (SPACEID))
      2006-01-11 13:11:51,070 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Table 'spaces' already exists"
      2006-01-11 13:11:51,382 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create table CONTENT (CONTENTID bigint not null, CONTENTTYPE varchar(255) not null, TITLE varchar(255), VERSION integer, CREATOR varchar(255), CREATIONDATE datetime, LASTMODIFIER varchar(255), LASTMODDATE datetime, VERSIONCOMMENT mediumtext, PREVVER bigint, CONTENT_STATUS varchar(255), SPACEID bigint, PARENTID bigint, MESSAGEID varchar(255), PAGEID bigint, PARENTCOMMENTID bigint, USERNAME varchar(255), primary key (CONTENTID))
      2006-01-11 13:11:51,382 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Table 'content' already exists"
      2006-01-11 13:11:55,773 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table os_user_group add constraint FK932472461E2E76DB foreign key (group_id) references os_group (id)
      2006-01-11 13:11:55,773 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_3a.frm' (errno: 150)"
      2006-01-11 13:11:57,398 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table CONFANCESTORS add constraint FK9494E23C37E35A2E foreign key (ANCESTORID) references CONTENT (CONTENTID)
      2006-01-11 13:11:57,398 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_3a.frm' (errno: 150)"
      2006-01-11 13:11:57,585 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create index s_spacedescid_idx on SPACES (SPACEDESCID)
      2006-01-11 13:11:57,585 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Invalid argument value message from server: "Duplicate key name 's_spacedescid_idx'"
      2006-01-11 13:11:57,585 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create index s_homepage_idx on SPACES (HOMEPAGE)
      2006-01-11 13:11:57,585 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Invalid argument value message from server: "Duplicate key name 's_homepage_idx'"
      2006-01-11 13:11:57,664 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table SPACES add constraint FK9228242D11B7BFEE foreign key (HOMEPAGE) references CONTENT (CONTENTID)
      2006-01-11 13:11:57,664 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_3a.frm' (errno: 121)"
      2006-01-11 13:11:57,742 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table SPACES add constraint FK9228242D2C72D3D2 foreign key (SPACEDESCID) references CONTENT (CONTENTID)
      2006-01-11 13:11:57,742 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_3a.frm' (errno: 121)"
      2006-01-11 13:11:58,507 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table local_members add constraint FK6B8FB445CE2B3226 foreign key (userid) references users (id)
      2006-01-11 13:11:58,507 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_3a.frm' (errno: 150)"
      2006-01-11 13:11:58,710 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table external_members add constraint FKD8C8D8A5F25E5D5F foreign key (extentityid) references external_entities (id)
      2006-01-11 13:11:58,710 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_3a.frm' (errno: 150)"
      2006-01-11 13:11:58,710 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create index c_parentcommid_idx on CONTENT (PARENTCOMMENTID)
      2006-01-11 13:11:58,710 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Invalid argument value message from server: "Duplicate key name 'c_parentcommid_idx'"
      2006-01-11 13:11:58,710 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create index c_title_idx on CONTENT (TITLE)
      2006-01-11 13:11:58,710 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Invalid argument value message from server: "Duplicate key name 'c_title_idx'"
      2006-01-11 13:11:58,710 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create index c_spaceid_idx on CONTENT (SPACEID)
      2006-01-11 13:11:58,710 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Invalid argument value message from server: "Duplicate key name 'c_spaceid_idx'"
      2006-01-11 13:11:58,710 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create index c_parentid_idx on CONTENT (PARENTID)
      2006-01-11 13:11:58,710 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Invalid argument value message from server: "Duplicate key name 'c_parentid_idx'"
      2006-01-11 13:11:58,726 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create index c_username_idx on CONTENT (USERNAME)
      2006-01-11 13:11:58,726 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Invalid argument value message from server: "Duplicate key name 'c_username_idx'"
      2006-01-11 13:11:58,726 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create index c_prevver_idx on CONTENT (PREVVER)
      2006-01-11 13:11:58,726 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Invalid argument value message from server: "Duplicate key name 'c_prevver_idx'"
      2006-01-11 13:11:58,726 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create index c_messageid_idx on CONTENT (MESSAGEID)
      2006-01-11 13:11:58,726 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Invalid argument value message from server: "Duplicate key name 'c_messageid_idx'"
      2006-01-11 13:11:58,804 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table CONTENT add constraint FK6382C0598C38FBEA foreign key (PAGEID) references CONTENT (CONTENTID)
      2006-01-11 13:11:58,804 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_3a.frm' (errno: 150)"
      2006-01-11 13:11:58,898 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table CONTENT add constraint FK6382C05974B18345 foreign key (PARENTID) references CONTENT (CONTENTID)
      2006-01-11 13:11:58,898 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_3a.frm' (errno: 121)"
      2006-01-11 13:11:58,976 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table CONTENT add constraint FK6382C05917D4A070 foreign key (PREVVER) references CONTENT (CONTENTID)
      2006-01-11 13:11:58,976 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_3a.frm' (errno: 121)"
      2006-01-11 13:11:59,085 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table CONTENT add constraint FK6382C059B97E9230 foreign key (PARENTCOMMENTID) references CONTENT (CONTENTID)
      2006-01-11 13:11:59,085 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_3a.frm' (errno: 121)"
      2006-01-11 13:11:59,164 ERROR [hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: alter table CONTENT add constraint FK6382C059B2DC6081 foreign key (SPACEID) references SPACES (SPACEID)
      2006-01-11 13:11:59,164 ERROR [hibernate.tool.hbm2ddl.SchemaExport] General error message from server: "Can't create table '.\conf#sql-74c_3a.frm' (errno: 121)"
      2006-01-11 13:12:00,507 ERROR [atlassian.confluence.setup.DefaultHibernateConfigurator] Error creating additional indexes.
      java.sql.SQLException: Invalid argument value message from server: "Duplicate key name 'c_contenttype_idx'"
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
      at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1224)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:2248)
      at com.mysql.jdbc.Connection.execSQL(Connection.java:2196)
      at com.mysql.jdbc.Statement.execute(Statement.java:906)
      at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:896)
      at com.atlassian.confluence.setup.DefaultHibernateConfigurator.createAdditionalDatabaseIndexes(DefaultHibernateConfigurator.java:180)
      at com.atlassian.confluence.setup.DefaultHibernateConfigurator.createConfluenceSchema(DefaultHibernateConfigurator.java:143)
      at com.atlassian.confluence.importexport.impl.BackupImporter.deleteAllDatabaseContent(BackupImporter.java:434)
      at com.atlassian.confluence.importexport.impl.BackupImporter.importEntities(BackupImporter.java:226)
      at com.atlassian.confluence.importexport.impl.BackupImporter.importEverything(BackupImporter.java:155)
      at com.atlassian.confluence.importexport.impl.FileBackupImporter.importEverything(FileBackupImporter.java:84)
      at com.atlassian.confluence.importexport.impl.BackupImporter.doImport(BackupImporter.java:76)
      at com.atlassian.confluence.importexport.impl.FileBackupImporter.doImport(FileBackupImporter.java:34)
      at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:81)
      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 $Proxy43.importAs(Unknown Source)
      at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.run(ImportLongRunningTask.java:45)
      at java.lang.Thread.run(Thread.java:534)

        1. DefaultHibernateConfigurator.class
          8 kB
          dave
        2. hibernate-2.1.8-atlassian.jar
          945 kB
          dave
        3. stacktrace.txt
          53 kB
          Stephane Nicoll

            [CONFSERVER-5153] Error restoring on MySQL

            Hi Randall,

            Could you please create a support request at http://support.atlassian.com and post your information there. We can then try and resolve your problem.

            Jeremy

            Jeremy Higgs added a comment - Hi Randall, Could you please create a support request at http://support.atlassian.com and post your information there. We can then try and resolve your problem. Jeremy

            Can someone please help when they have time because I am using MySQL and I did a backup of my confluence 2.0 and now I am trying to restore it on version 2.1.2, and I am getting many errors below? I can see some of my data, but not all of it when I login.

            [this the error I get after the upload is completed]
            Import failed. :(HibernateTemplate): data integrity violated by SQL ''; nested exception is java.sql.BatchUpdateException: Duplicate entry '35296' for key 1

            [this is my cataline.out]
            INFO: Server startup in 5570 ms
            2006-01-19 18:22:27,950 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Cou
            ld not find configuration [com.opensymphony.user.provider.hibernate.impl.HibernateUserImpl.groups]; using defaults.
            2006-01-19 18:22:27,954 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.atlassian.confluence.pages.Draft]; using defaults.
            2006-01-19 18:22:27,956 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.opensymphony.user.provider.hibernate.impl.HibernateUserImpl]; using defaults.
            2006-01-19 18:22:27,958 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.atlassian.user.impl.hibernate.DefaultHibernateUser]; using defaults.
            2006-01-19 18:22:27,960 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.atlassian.user.impl.hibernate.DefaultHibernateExternalEntity]; using defaults.
            2006-01-19 18:22:27,968 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.atlassian.user.impl.hibernate.DefaultHibernateGroup]; using defaults.
            2006-01-19 18:22:27,970 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.opensymphony.user.provider.hibernate.impl.HibernateGroupImpl]; using defaults.
            2006-01-19 18:22:30,335 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [net.sf.hibernate.cache.StandardQueryCache]; using defaults.
            2006-01-19 18:24:48,680 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry 'confluence-users' for key 2
            2006-01-19 18:24:48,680 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry 'confluence-users' for key 2
            2006-01-19 18:24:48,682 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry 'confluence-users' for key 2
            2006-01-19 18:24:48,682 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry 'confluence-users' for key 2
            2006-01-19 18:24:48,685 ERROR [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session
            2006-01-19 18:24:48,685 ERROR [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session
            2006-01-19 18:24:48,688 ERROR [confluence.importexport.impl.ReverseDatabinder] endElement net.sf.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
            net.sf.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
            at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:73)
            at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
            at net.sf.hibernate.impl.BatcherImpl.convert(BatcherImpl.java:328)
            at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:135)
            at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:61)
            at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:58)
            at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:111)
            at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:454)
            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:2449)
            at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
            at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
            at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
            at com.atlassian.confluence.importexport.impl.ReverseDatabinder.writeObject(ReverseDatabinder.java:445)
            at com.atlassian.confluence.importexport.impl.ImportedObject.saveObject(ImportedObject.java:208)
            at com.atlassian.confluence.importexport.impl.ReverseDatabinder.endObject(ReverseDatabinder.java:340)
            at com.atlassian.confluence.importexport.impl.ReverseDatabinder.endElement(ReverseDatabinder.java:218)
            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.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
            at javax.xml.parsers.SAXParser.parse(SAXParser.java:176)
            at com.atlassian.confluence.importexport.impl.ReverseDatabinder.fromXML(ReverseDatabinder.java:96)
            at com.atlassian.confluence.importexport.impl.BackupImporter.importEntities(BackupImporter.java:248)
            at com.atlassian.confluence.importexport.impl.BackupImporter.importEverything(BackupImporter.java:155)
            at com.atlassian.confluence.importexport.impl.FileBackupImporter.importEverything(FileBackupImporter.java:84)
            at com.atlassian.confluence.importexport.impl.BackupImporter.doImport(BackupImporter.java:76)
            at com.atlassian.confluence.importexport.impl.FileBackupImporter.doImport(FileBackupImporter.java:34)
            at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:81)
            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:585)
            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 $Proxy38.importAs(Unknown Source)
            at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.run(ImportLongRunningTask.java:45)
            at java.lang.Thread.run(Thread.java:595)
            Caused by: java.sql.BatchUpdateException: Duplicate entry 'confluence-users' for key 2
            at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:853)
            at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
            at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
            at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128)
            ... 44 more
            2006-01-19 18:24:48,693 ERROR [confluence.importexport.impl.ReverseDatabinder] fromXML Error processing backup:
            net.sf.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
            at com.atlassian.confluence.importexport.impl.ReverseDatabinder.endElement(ReverseDatabinder.java:239)
            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.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
            at javax.xml.parsers.SAXParser.parse(SAXParser.java:176)
            at com.atlassian.confluence.importexport.impl.ReverseDatabinder.fromXML(ReverseDatabinder.java:96)
            at com.atlassian.confluence.importexport.impl.BackupImporter.importEntities(BackupImporter.java:248)
            at com.atlassian.confluence.importexport.impl.BackupImporter.importEverything(BackupImporter.java:155)
            at com.atlassian.confluence.importexport.impl.FileBackupImporter.importEverything(FileBackupImporter.java:84)
            at com.atlassian.confluence.importexport.impl.BackupImporter.doImport(BackupImporter.java:76)
            at com.atlassian.confluence.importexport.impl.FileBackupImporter.doImport(FileBackupImporter.java:34)
            at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:81)
            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:585)
            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 $Proxy38.importAs(Unknown Source)
            at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.run(ImportLongRunningTask.java:45)
            at java.lang.Thread.run(Thread.java:595)
            2006-01-19 18:24:48,694 ERROR [confluence.importexport.impl.BackupImporter] importEntities Cannot import the entities:
            net.sf.hibernate.HibernateException: Error processing backup. Refer to logs for more details.
            at com.atlassian.confluence.importexport.impl.ReverseDatabinder.fromXML(ReverseDatabinder.java:114)
            at com.atlassian.confluence.importexport.impl.BackupImporter.importEntities(BackupImporter.java:248)
            at com.atlassian.confluence.importexport.impl.BackupImporter.importEverything(BackupImporter.java:155)
            at com.atlassian.confluence.importexport.impl.FileBackupImporter.importEverything(FileBackupImporter.java:84)
            at com.atlassian.confluence.importexport.impl.BackupImporter.doImport(BackupImporter.java:76)
            at com.atlassian.confluence.importexport.impl.FileBackupImporter.doImport(FileBackupImporter.java:34)
            at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:81)
            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:585)
            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 $Proxy38.importAs(Unknown Source)
            at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.run(ImportLongRunningTask.java:45)
            at java.lang.Thread.run(Thread.java:595)
            Caused by: net.sf.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
            at com.atlassian.confluence.importexport.impl.ReverseDatabinder.endElement(ReverseDatabinder.java:239)
            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.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
            at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
            at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
            at javax.xml.parsers.SAXParser.parse(SAXParser.java:176)
            at com.atlassian.confluence.importexport.impl.ReverseDatabinder.fromXML(ReverseDatabinder.java:96)
            ... 19 more
            2006-01-19 18:24:48,705 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry '35296' for key 1
            2006-01-19 18:24:48,705 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry '35296' for key 1
            2006-01-19 18:24:48,706 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry '35296' for key 1
            2006-01-19 18:24:48,706 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry '35296' for key 1
            2006-01-19 18:24:48,706 ERROR [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session
            2006-01-19 18:24:48,706 ERROR [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session
            org.springframework.dao.DataIntegrityViolationException: (HibernateTemplate): data integrity violated by SQL ''; nested exception is java.sql.BatchUpdateException: Duplicate entry '35296' for key 1
            java.sql.BatchUpdateException: Duplicate entry '35296' for key 1
            at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:853)
            at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
            at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
            at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128)
            at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:61)
            at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:58)
            at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:111)
            at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:454)
            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:2449)
            at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
            at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
            at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
            at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
            at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:463)
            at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:373)
            at org.springframework.transaction.interceptor.TransactionAspectSupport.doCloseTransactionAfterThrowing(TransactionAspectSupport.java:278)
            at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:60)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152)
            at $Proxy38.importAs(Unknown Source)
            at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.run(ImportLongRunningTask.java:45)
            at java.lang.Thread.run(Thread.java:595)

            Randall Zapata added a comment - Can someone please help when they have time because I am using MySQL and I did a backup of my confluence 2.0 and now I am trying to restore it on version 2.1.2, and I am getting many errors below? I can see some of my data, but not all of it when I login. [this the error I get after the upload is completed] Import failed. :(HibernateTemplate): data integrity violated by SQL ''; nested exception is java.sql.BatchUpdateException: Duplicate entry '35296' for key 1 [this is my cataline.out] INFO: Server startup in 5570 ms 2006-01-19 18:22:27,950 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Cou ld not find configuration [com.opensymphony.user.provider.hibernate.impl.HibernateUserImpl.groups] ; using defaults. 2006-01-19 18:22:27,954 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.atlassian.confluence.pages.Draft] ; using defaults. 2006-01-19 18:22:27,956 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.opensymphony.user.provider.hibernate.impl.HibernateUserImpl] ; using defaults. 2006-01-19 18:22:27,958 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.atlassian.user.impl.hibernate.DefaultHibernateUser] ; using defaults. 2006-01-19 18:22:27,960 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.atlassian.user.impl.hibernate.DefaultHibernateExternalEntity] ; using defaults. 2006-01-19 18:22:27,968 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.atlassian.user.impl.hibernate.DefaultHibernateGroup] ; using defaults. 2006-01-19 18:22:27,970 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [com.opensymphony.user.provider.hibernate.impl.HibernateGroupImpl] ; using defaults. 2006-01-19 18:22:30,335 WARN [sf.hibernate.cache.EhCacheProvider] buildCache Could not find configuration [net.sf.hibernate.cache.StandardQueryCache] ; using defaults. 2006-01-19 18:24:48,680 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry 'confluence-users' for key 2 2006-01-19 18:24:48,680 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry 'confluence-users' for key 2 2006-01-19 18:24:48,682 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry 'confluence-users' for key 2 2006-01-19 18:24:48,682 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry 'confluence-users' for key 2 2006-01-19 18:24:48,685 ERROR [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session 2006-01-19 18:24:48,685 ERROR [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session 2006-01-19 18:24:48,688 ERROR [confluence.importexport.impl.ReverseDatabinder] endElement net.sf.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update net.sf.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:73) at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at net.sf.hibernate.impl.BatcherImpl.convert(BatcherImpl.java:328) at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:135) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:61) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:58) at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:111) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:454) 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:2449) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261) at com.atlassian.confluence.importexport.impl.ReverseDatabinder.writeObject(ReverseDatabinder.java:445) at com.atlassian.confluence.importexport.impl.ImportedObject.saveObject(ImportedObject.java:208) at com.atlassian.confluence.importexport.impl.ReverseDatabinder.endObject(ReverseDatabinder.java:340) at com.atlassian.confluence.importexport.impl.ReverseDatabinder.endElement(ReverseDatabinder.java:218) 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.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at javax.xml.parsers.SAXParser.parse(SAXParser.java:176) at com.atlassian.confluence.importexport.impl.ReverseDatabinder.fromXML(ReverseDatabinder.java:96) at com.atlassian.confluence.importexport.impl.BackupImporter.importEntities(BackupImporter.java:248) at com.atlassian.confluence.importexport.impl.BackupImporter.importEverything(BackupImporter.java:155) at com.atlassian.confluence.importexport.impl.FileBackupImporter.importEverything(FileBackupImporter.java:84) at com.atlassian.confluence.importexport.impl.BackupImporter.doImport(BackupImporter.java:76) at com.atlassian.confluence.importexport.impl.FileBackupImporter.doImport(FileBackupImporter.java:34) at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:81) 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:585) 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 $Proxy38.importAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.run(ImportLongRunningTask.java:45) at java.lang.Thread.run(Thread.java:595) Caused by: java.sql.BatchUpdateException: Duplicate entry 'confluence-users' for key 2 at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:853) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54) at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128) ... 44 more 2006-01-19 18:24:48,693 ERROR [confluence.importexport.impl.ReverseDatabinder] fromXML Error processing backup: net.sf.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at com.atlassian.confluence.importexport.impl.ReverseDatabinder.endElement(ReverseDatabinder.java:239) 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.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at javax.xml.parsers.SAXParser.parse(SAXParser.java:176) at com.atlassian.confluence.importexport.impl.ReverseDatabinder.fromXML(ReverseDatabinder.java:96) at com.atlassian.confluence.importexport.impl.BackupImporter.importEntities(BackupImporter.java:248) at com.atlassian.confluence.importexport.impl.BackupImporter.importEverything(BackupImporter.java:155) at com.atlassian.confluence.importexport.impl.FileBackupImporter.importEverything(FileBackupImporter.java:84) at com.atlassian.confluence.importexport.impl.BackupImporter.doImport(BackupImporter.java:76) at com.atlassian.confluence.importexport.impl.FileBackupImporter.doImport(FileBackupImporter.java:34) at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:81) 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:585) 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 $Proxy38.importAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.run(ImportLongRunningTask.java:45) at java.lang.Thread.run(Thread.java:595) 2006-01-19 18:24:48,694 ERROR [confluence.importexport.impl.BackupImporter] importEntities Cannot import the entities: net.sf.hibernate.HibernateException: Error processing backup. Refer to logs for more details. at com.atlassian.confluence.importexport.impl.ReverseDatabinder.fromXML(ReverseDatabinder.java:114) at com.atlassian.confluence.importexport.impl.BackupImporter.importEntities(BackupImporter.java:248) at com.atlassian.confluence.importexport.impl.BackupImporter.importEverything(BackupImporter.java:155) at com.atlassian.confluence.importexport.impl.FileBackupImporter.importEverything(FileBackupImporter.java:84) at com.atlassian.confluence.importexport.impl.BackupImporter.doImport(BackupImporter.java:76) at com.atlassian.confluence.importexport.impl.FileBackupImporter.doImport(FileBackupImporter.java:34) at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:81) 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:585) 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 $Proxy38.importAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.run(ImportLongRunningTask.java:45) at java.lang.Thread.run(Thread.java:595) Caused by: net.sf.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at com.atlassian.confluence.importexport.impl.ReverseDatabinder.endElement(ReverseDatabinder.java:239) 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.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at javax.xml.parsers.SAXParser.parse(SAXParser.java:176) at com.atlassian.confluence.importexport.impl.ReverseDatabinder.fromXML(ReverseDatabinder.java:96) ... 19 more 2006-01-19 18:24:48,705 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry '35296' for key 1 2006-01-19 18:24:48,705 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry '35296' for key 1 2006-01-19 18:24:48,706 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry '35296' for key 1 2006-01-19 18:24:48,706 ERROR [sf.hibernate.util.JDBCExceptionReporter] logExceptions Duplicate entry '35296' for key 1 2006-01-19 18:24:48,706 ERROR [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session 2006-01-19 18:24:48,706 ERROR [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session org.springframework.dao.DataIntegrityViolationException: (HibernateTemplate): data integrity violated by SQL ''; nested exception is java.sql.BatchUpdateException: Duplicate entry '35296' for key 1 java.sql.BatchUpdateException: Duplicate entry '35296' for key 1 at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:853) at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294) at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54) at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:128) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:61) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:58) at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:111) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:454) 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:2449) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at org.springframework.orm.hibernate.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:463) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:373) at org.springframework.transaction.interceptor.TransactionAspectSupport.doCloseTransactionAfterThrowing(TransactionAspectSupport.java:278) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) at $Proxy38.importAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.run(ImportLongRunningTask.java:45) at java.lang.Thread.run(Thread.java:595)

            It works. Thanks for the bug hunting guys.

            Stephane Nicoll added a comment - It works. Thanks for the bug hunting guys.

            Stephane,

            I apologise for the confusion.

            On further investigation, it appears there is deeper bug, lying within the component we use to generate the database schema. (http://opensource2.atlassian.com/projects/hibernate/browse/HB-1277)

            By upgrading the hibernate jar to 2.1.8 (please find attached), I was able to successfully restore from the setup wizard (tested against two mysql 4.1 instances - windows and unix).

            Please copy this jar to your confluence/WEB-INF/lib directory (and remove the hibernate-2.1.6.jar). Let us know how you go.

            Cheers,
            Dave

            dave (Inactive) added a comment - Stephane, I apologise for the confusion. On further investigation, it appears there is deeper bug, lying within the component we use to generate the database schema. ( http://opensource2.atlassian.com/projects/hibernate/browse/HB-1277 ) By upgrading the hibernate jar to 2.1.8 (please find attached), I was able to successfully restore from the setup wizard (tested against two mysql 4.1 instances - windows and unix). Please copy this jar to your confluence/WEB-INF/lib directory (and remove the hibernate-2.1.6.jar). Let us know how you go. Cheers, Dave

            Guys,

            I assume the release was almost out when I add my last comment. I have downloaded Confluence 2.1.2 standalone. I have reproduced the same steps as defined in my bug report (see CONF-5149) and I still have the problem which confirms my last comment.

            I will attach the logs right now.

            I must admit I am quite confused about this guys. This was so easy for me to reproduce ...

            Stephane Nicoll added a comment - Guys, I assume the release was almost out when I add my last comment. I have downloaded Confluence 2.1.2 standalone. I have reproduced the same steps as defined in my bug report (see CONF-5149 ) and I still have the problem which confirms my last comment. I will attach the logs right now. I must admit I am quite confused about this guys. This was so easy for me to reproduce ...

            I have placed this class, removed my work directory and restarted and I still have those errors!!

            Stephane Nicoll added a comment - I have placed this class, removed my work directory and restarted and I still have those errors!!

            The problem is that the restore does not drop all the current tables before attempting to create a new schema.

            Please find attached DefaultHibernateConfigurator.class and copy to your confluence/WEB-INF/classes/com/atlassian/confluence/setup directory and restart.

            You should now be able to restore without these errors.

            Cheers,
            Dave

            dave (Inactive) added a comment - The problem is that the restore does not drop all the current tables before attempting to create a new schema. Please find attached DefaultHibernateConfigurator.class and copy to your confluence/WEB-INF/classes/com/atlassian/confluence/setup directory and restart. You should now be able to restore without these errors. Cheers, Dave

              Unassigned Unassigned
              dave@atlassian.com dave (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: