cancel
Showing results for 
Search instead for 
Did you mean: 

FTP Mass upload problem

ruffp
Champ in-the-making
Champ in-the-making
Hello,

I tried to push around 200 OpenOffice document (.odt) to a folder which contains an Action.

The transfer was quite long, and at the end I found 8 files with a size of 0 staying at the original folder
(normal behaviour is: the action moves the files to sub-folders).
It seems that the FTP has transferred unsuccessfully these 8 files.

I saw in the logs that I got at least 8 errors like this one :

javax.transaction.RollbackException: Transaction didn't commit: could not update: [org.alfresco.repo.domain.hibernate.ChildAssocImpl#202350]; nested exception is org.hibernate.exception.ConstraintViolationException: could not update: [org.alfresco.repo.domain.hibernate.ChildAssocImpl#202350]
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:430)
   at org.alfresco.filesys.server.SrvSession.endTransaction(SrvSession.java:684)
   at org.alfresco.filesys.ftp.FTPSrvSession.procStoreFile(FTPSrvSession.java:2354)
   at org.alfresco.filesys.ftp.FTPSrvSession.run(FTPSrvSession.java:4239)
   at java.lang.Thread.run(Thread.java:595)
Caused by: org.springframework.dao.DataIntegrityViolationException: could not update: [org.alfresco.repo.domain.hibernate.ChildAssocImpl#202350]; nested exception is org.hibernate.exception.ConstraintViolationException: could not update: [org.alfresco.repo.domain.hibernate.ChildAssocImpl#202350]
   at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:630)
   at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:699)
   at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:570)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:654)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:624)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:307)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:420)
   … 4 more
Caused by: org.hibernate.exception.ConstraintViolationException: could not update: [org.alfresco.repo.domain.hibernate.ChildAssocImpl#202350]
   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
   at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2375)
   at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2257)
   at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2557)
   at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
   at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
   at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
   at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:562)
   … 8 more
Caused by: org.postgresql.util.PSQLException: ERREUR: une clé dupliquée rompt la contrainte unique "alf_child_assoc_parent_node_id_key"
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:308)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
   at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2357)
   … 20 more

(The first error in french means like : Error of duplicated key in unique constraint "alf_child_assoc_parent_node_id_key")

Details:
OS: Sun Solaris 10
JVM: Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed mode)
Alfresco: 2.1.1

Thanks for your help,
1 REPLY 1

jzulu2000
Champ in-the-making
Champ in-the-making
I have the same problem, and it says it is because of an unique constraint violated too.

any ideas?