cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to delete Certain Space,files and folders

predatorz
Champ in-the-making
Champ in-the-making
Hi All,

I have a problem here (As topic)
I mapped a network drive to alfresco in my workstation, created a folder and was transferring a lot of stuff over to alfresco and my workstation hanged. After which, those folders and files that were transferred over to alfresco, I am not able to remove them away.

I tried from the network mapping to delete them away after halfway but it will fail.

What can i do?

Using Alfresco Community 2.1.0.
27 REPLIES 27

predatorz
Champ in-the-making
Champ in-the-making
i access directly through \\ServerName\alfresco and i try to delete the problematic folder or file, i get error Cannot delete File: Cannot read from source file or disk

dmatejka
Champ in-the-making
Champ in-the-making
I see there is nobody to answer. We had the same problem and therefore I think there is a problem with Lucene indexes. You have to reindex.

predatorz
Champ in-the-making
Champ in-the-making
I see there is nobody to answer. We had the same problem and therefore I think there is a problem with Lucene indexes. You have to reindex.

How do i reindex Lucene indexes?

dmatejka
Champ in-the-making
Champ in-the-making
Hi

Unfortunatelly I'm only a business user of alfresco, but according to our sytem administrator you have to write into
tomcat/webapps/alfresco/WEB-INF/classes/alfresco/repository.properties index.recovery.mode=FULL
and restart

sombody please correct me if Im wrong…

hope it helps

daniel

mruflin
Champ in-the-making
Champ in-the-making
Regarding reindexing: dmatejka is correct, but you should then also delete the lucene indexes directories (*lucene-indexes/) in alf_data (or wherever you stored the indexes).

Regarding your issue: You will have to check in the alfresco logs (alfresco/tomcat/logs/catalina.out) to see what exception is thrown. Without that information it's impossible to tell what the problem is (personally I don't think that lucene indexes are the problem)

predatorz
Champ in-the-making
Champ in-the-making
Thanks.
When try deleting after logging to the Alfresco GUI, it throws the below message when trying to delete the problematic space.
Please correct the errors below then click OK.
Unable to delete Space due to system error:

    10:42:27,933 ERROR [alfresco.smb.protocol] Closing session due to exception
    org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.GenericJDBCException: could not insert: [org.alfresco.repo.domain.hibernate.ChildAssocImpl]
    Caused by:
    org.hibernate.exception.GenericJDBCException: could not insert: [org.alfresco.repo.domain.hibernate.ChildAssocImpl]
       at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
       at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:40)
       at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2108)
       at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2588)
       at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48)
       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
       at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290)
       at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:180)
       at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:108)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
       at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
       at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
       at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
       at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
       at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
       at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:630)
       at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
       at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:627)
       at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.newChildAssoc(HibernateNodeDaoServiceImpl.java:590)
       at sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
       at org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:68)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
       at $Proxy1.newChildAssoc(Unknown Source)
       at org.alfresco.repo.node.db.DbNodeServiceImpl.moveNode(DbNodeServiceImpl.java:439)
       at org.alfresco.repo.node.db.DbNodeServiceImpl.archiveNode(DbNodeServiceImpl.java:1570)
       at org.alfresco.repo.node.db.DbNodeServiceImpl.deleteNode(DbNodeServiceImpl.java:737)
       at sun.reflect.GeneratedMethodAccessor353.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
       at org.alfresco.repo.transaction.TransactionResourceInterceptor.invoke(TransactionResourceInterceptor.java:138)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
       at $Proxy2.deleteNode(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor353.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
       at $Proxy3.deleteNode(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor353.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
       at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:211)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
       at $Proxy2.deleteNode(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor353.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
       at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:256)
       at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:191)
       at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
       at $Proxy2.deleteNode(Unknown Source)
       at org.alfresco.filesys.smb.server.repo.ContentDiskDriver.closeFile(ContentDiskDriver.java:1745)
       at org.alfresco.filesys.smb.server.NTProtocolHandler.procCloseFile(NTProtocolHandler.java:1464)
       at org.alfresco.filesys.smb.server.NTProtocolHandler.runProtocol(NTProtocolHandler.java:259)
       at org.alfresco.filesys.smb.server.SMBSrvSession.runHandler(SMBSrvSession.java:1460)
       at org.alfresco.filesys.smb.server.SMBSrvSession.run(SMBSrvSession.java:1361)
       at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
       at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1160)
       at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:685)
       at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1400)
       at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1314)
       at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1299)
       at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
       at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:73)
       at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:33)
       … 81 more
    10:53:56,613 ERROR [alfresco.smb.protocol] Closing session due to exception
    org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
       at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:139)
       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.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.flush(HibernateNodeDaoServiceImpl.java:299)
       at sun.reflect.GeneratedMethodAccessor356.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
       at org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:68)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
       at $Proxy1.flush(Unknown Source)
       at org.alfresco.repo.node.db.DbNodeServiceImpl.getNodeHierarchy(DbNodeServiceImpl.java:1648)
       at org.alfresco.repo.node.db.DbNodeServiceImpl.archiveNode(DbNodeServiceImpl.java:1582)
       at org.alfresco.repo.node.db.DbNodeServiceImpl.deleteNode(DbNodeServiceImpl.java:737)
       at sun.reflect.GeneratedMethodAccessor353.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
       at org.alfresco.repo.transaction.TransactionResourceInterceptor.invoke(TransactionResourceInterceptor.java:138)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
       at $Proxy2.deleteNode(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor353.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
       at $Proxy3.deleteNode(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor353.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
       at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:211)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
       at $Proxy2.deleteNode(Unknown Source)
       at sun.reflect.GeneratedMethodAccessor353.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
       at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.alfresco.repo.audit.AuditComponentImpl.auditImpl(AuditComponentImpl.java:256)
       at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:191)
       at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
       at $Proxy2.deleteNode(Unknown Source)
       at org.alfresco.filesys.smb.server.repo.ContentDiskDriver.deleteDirectory(ContentDiskDriver.java:1634)
       at org.alfresco.filesys.smb.server.NTProtocolHandler.procDeleteDirectory(NTProtocolHandler.java:3013)
       at org.alfresco.filesys.smb.server.NTProtocolHandler.runProtocol(NTProtocolHandler.java:289)
       at org.alfresco.filesys.smb.server.SMBSrvSession.runHandler(SMBSrvSession.java:1460)
       at org.alfresco.filesys.smb.server.SMBSrvSession.run(SMBSrvSession.java:1361)
       at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.BatchUpdateException: Duplicate entry 'archive-SpacesStore-722b6c2c-d3e2-11dc-bf41-7d66295c1678' for key 1
       at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:657)
       at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:294)
       at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
       at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
       … 68 more

mruflin
Champ in-the-making
Champ in-the-making
Looks like a problem with your database.

My quick guess would be that the system somehow already contains the deleted nodes in the archive spaces store. I've no idea though how this could have happened. Maybe you're using a non-transactional database (mysql with InnoDB engine for example) and an exception in the middle of the operation brought your database into an inconsistent state.

You could try to reindex, maybe that fixes the issue (if it has helped others then it's at least worth a try). Otherwise, I'm afraid this problem won't be easy to fix and you'll have to dive into the source code and the database content…

predatorz
Champ in-the-making
Champ in-the-making
okay i will try the reindexing,
a quick confirmation, will reindex of the database cause any data loss on those working files on alfresco?
I hope everything will be fine after reindex.

mruflin
Champ in-the-making
Champ in-the-making
It's always a good idea to take a backup before doing such operations 😉

But to answer your question: no, deleting lucene indexes and recreating them should not result in any loss of data.