cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction didn't commit: Metadata extraction failed

simon
Champ in-the-making
Champ in-the-making
Dear Alfresco,

The following error shows up in the logs from time to time (a few times a day). Our users report the "Unable to check in Content Node due to system error:Transaction silently rolled back because it has been marked as rollback-only" message when they try to check in a file, could the two errors relate to each other? They see the error message even though the file seems to be checked in correctly.

16:37:07,892 ERROR [alfresco.smb.protocol] Closing session due to exception
org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [org.alfresco.repo.domain.hibernate.NodeImpl] with identifier [4035485]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.alfresco.repo.domain.hibernate.NodeImpl#4035485]
Caused by:
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.alfresco.repo.domain.hibernate.NodeImpl#4035485]
        at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1714)
        at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2357)
        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.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41)
        at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl$8.doInHibernate(HibernateNodeDaoServiceImpl.java:796)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
        at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.getChildAssocRefs(HibernateNodeDaoServiceImpl.java:799)
        at sun.reflect.GeneratedMethodAccessor386.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        […]
        at $Proxy3.setProperty(Unknown Source)
        at org.alfresco.filesys.smb.server.repo.ContentNetworkFile.closeFile(ContentNetworkFile.java:385)
        at org.alfresco.filesys.smb.server.repo.ContentDiskDriver.closeFile(ContentDiskDriver.java:1725)
        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:1489)
        at org.alfresco.filesys.smb.server.SMBSrvSession.run(SMBSrvSession.java:1390)
        at java.lang.Thread.run(Thread.java:595)
javax.transaction.RollbackException: Transaction didn't commit: Metadata extraction failed:
   reader: ContentAccessor[ contentUrl=store://2009/3/26/16/37/f771e82c-1a1b-11de-bc63-f9b4fd186a7b.bin, mimetype=application/msword, size=4096, encoding=UTF-8, locale=en_US]
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:430)
        at org.alfresco.filesys.server.SrvSession.endTransaction(SrvSession.java:684)
        at org.alfresco.filesys.smb.server.SMBSrvSession.run(SMBSrvSession.java:1401)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.alfresco.service.cmr.repository.ContentIOException: Metadata extraction failed:
   reader: ContentAccessor[ contentUrl=store://2009/3/26/16/37/f771e82c-1a1b-11de-bc63-f9b4fd186a7b.bin, mimetype=application/msword, size=4096, encoding=UTF-8, locale=en_US]
        at org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter.extract(AbstractMappingMetadataExtracter.java:570)
        at org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter.extract(AbstractMappingMetadataExtracter.java:518)
        at org.alfresco.repo.action.executer.ContentMetadataExtracter.executeImpl(ContentMetadataExtracter.java:145)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:120)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:537)
        at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:72)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:120)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:537)
        […]
5 REPLIES 5

mrogers
Star Contributor
Star Contributor
If you are using Enterprise 2.1.1 then please contact Alfresco support who will (I think in this case) guide you to the correct service pack.

simon
Champ in-the-making
Champ in-the-making
Thanks mrogers. Are you suggesting this is a bug?

mrogers
Star Contributor
Star Contributor
Well, it doesn't look correct.   And I think we have seen this problem before (note i'm not sure).    Support will help you either by confirming that its a known bug and guiding you to the fix or by raising a new issue.

simon
Champ in-the-making
Champ in-the-making
Thanks again, I forwarded this message to Alfresco support and logged as ACT ticket 9675 (for future reference).

simon
Champ in-the-making
Champ in-the-making
Think we found the problem (thanks to the Fabrizio who helped me out). It seems to be the same problem we had a few months ago but I didn't notice it.

The user has access to space B, a subfolder of space A. The same user has no access to this parent space A. Now add a rule (which applies to the subspaces as well) to space A.

As the user uploads a document the rules will be triggered but the user has no access to the rule so he can't access it. This triggers the error. Our workaround is to add the EVERYONE group to the rules so that everyone can access the rules. There should be a JIRA ticket for this and I even think it's solved in one of the newer releases.