AnsweredAssumed Answered

could not load an entity

Question asked by johan1974 on Jun 24, 2008
Hello,

When i release from Kofax Capture to Alfresco it works but really slowly, takes about 2 or 3 minutes for one document to release.
I viewed the logfile and notice the same error everytime a document is released to alfresco.

15:47:24,344 ERROR [org.alfresco.web.ui.common.Utils] Error during processing of the template 'could not load an entity: [org.alfresco.repo.domain.hibernate.NodeStatusImpl#component[protocol,identifier,guid]{guid=df70fb1e-3c4b-11dd-a245-dbbedebfc46b, protocol=workspace, identifier=SpacesStore}]; nested exception is org.hibernate.exception.LockAcquisitionException: could not load an entity: [org.alfresco.repo.domain.hibernate.NodeStatusImpl#component[protocol,identifier,guid]{guid=df70fb1e-3c4b-11dd-a245-dbbedebfc46b, protocol=workspace, identifier=SpacesStore}]'. Please contact your system administrator.
org.alfresco.service.cmr.repository.TemplateException: Error during processing of the template 'could not load an entity: [org.alfresco.repo.domain.hibernate.NodeStatusImpl#component[protocol,identifier,guid]{guid=df70fb1e-3c4b-11dd-a245-dbbedebfc46b, protocol=workspace, identifier=SpacesStore}]; nested exception is org.hibernate.exception.LockAcquisitionException: could not load an entity: [org.alfresco.repo.domain.hibernate.NodeStatusImpl#component[protocol,identifier,guid]{guid=df70fb1e-3c4b-11dd-a245-dbbedebfc46b, protocol=workspace, identifier=SpacesStore}]'. Please contact your system administrator.
   at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:204)
   at org.alfresco.repo.processor.TemplateServiceImpl.processTemplate(TemplateServiceImpl.java:181)
   at org.alfresco.repo.processor.TemplateServiceImpl.processTemplate(TemplateServiceImpl.java:111)
   at sun.reflect.GeneratedMethodAccessor632.invoke(Unknown Source)
   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: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.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
   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 $Proxy94.processTemplate(Unknown Source)
   at org.alfresco.web.ui.repo.component.template.UITemplate.encodeBegin(UITemplate.java:157)
   at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
   at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:320)
   at org.apache.jsp.jsp.browse.browse_jsp._jspx_meth_r_005ftemplate_005f0(browse_jsp.java:2096)
   at org.apache.jsp.jsp.browse.browse_jsp._jspx_meth_a_005fpanel_005f3(browse_jsp.java:2050)
   at org.apache.jsp.jsp.browse.browse_jsp._jspService(browse_jsp.java:801)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
   at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
   at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
   at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
   at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
   at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.dao.CannotAcquireLockException: could not load an entity: [org.alfresco.repo.domain.hibernate.NodeStatusImpl#component[protocol,identifier,guid]{guid=df70fb1e-3c4b-11dd-a245-dbbedebfc46b, protocol=workspace, identifier=SpacesStore}]; nested exception is org.hibernate.exception.LockAcquisitionException: could not load an entity: [org.alfresco.repo.domain.hibernate.NodeStatusImpl#component[protocol,identifier,guid]{guid=df70fb1e-3c4b-11dd-a245-dbbedebfc46b, protocol=workspace, identifier=SpacesStore}]
   at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:633)
   at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:407)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)
   at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:459)
   at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:453)
   at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.getNodeStatus(HibernateNodeDaoServiceImpl.java:368)
   at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.getNode(HibernateNodeDaoServiceImpl.java:465)
   at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
   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: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.getNode(Unknown Source)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.getNodeNotNull(DbNodeServiceImpl.java:128)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.getChildAssocs(DbNodeServiceImpl.java:1173)
   at org.alfresco.repo.node.AbstractNodeServiceImpl.getChildAssocs(AbstractNodeServiceImpl.java:591)
   at sun.reflect.GeneratedMethodAccessor420.invoke(Unknown Source)
   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: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:144)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
   at $Proxy2.getChildAssocs(Unknown Source)
   at sun.reflect.GeneratedMethodAccessor420.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
   at $Proxy3.getChildAssocs(Unknown Source)
   at org.alfresco.repo.search.DocumentNavigator.getChildAxisIterator(DocumentNavigator.java:443)
   at org.jaxen.util.DescendantAxisIterator.next(DescendantAxisIterator.java:113)
   at org.jaxen.expr.DefaultStep.evaluate(DefaultStep.java:168)
   at org.jaxen.expr.DefaultLocationPath.evaluate(DefaultLocationPath.java:154)
   at org.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:112)
   at org.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:688)
   at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:227)
   at org.alfresco.repo.search.NodeServiceXPath.selectNodes(NodeServiceXPath.java:195)
   at org.alfresco.repo.search.impl.NodeSearcher.selectNodes(NodeSearcher.java:138)
   at org.alfresco.repo.search.impl.lucene.ADMLuceneSearcherImpl.selectNodes(ADMLuceneSearcherImpl.java:539)
   at org.alfresco.repo.search.SearcherComponent.selectNodes(SearcherComponent.java:108)
   at org.alfresco.repo.search.AbstractSearcherComponent.selectNodes(AbstractSearcherComponent.java:77)
   at sun.reflect.GeneratedMethodAccessor562.invoke(Unknown Source)
   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: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 $Proxy15.selectNodes(Unknown Source)
   at org.alfresco.repo.template.BasePathResultsMap.getChildrenByXPath(BasePathResultsMap.java:86)
   at org.alfresco.repo.template.XPathResultsMap.get(XPathResultsMap.java:53)
   at freemarker.template.SimpleHash.get(SimpleHash.java:193)
   at freemarker.core.DynamicKeyName.dealWithStringKey(DynamicKeyName.java:136)
   at freemarker.core.DynamicKeyName._getAsTemplateModel(DynamicKeyName.java:94)
   at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
   at freemarker.core.SequenceBuiltins$SequenceBuiltIn._getAsTemplateModel(SequenceBuiltins.java:88)
   at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
   at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:86)
   at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
   at freemarker.core.SequenceBuiltins$SequenceBuiltIn._getAsTemplateModel(SequenceBuiltins.java:88)
   at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
   at freemarker.core.IteratorBlock.accept(IteratorBlock.java:87)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.Environment.process(Environment.java:176)
   at freemarker.template.Template.process(Template.java:232)
   at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:200)
   … 60 more
Caused by: org.hibernate.exception.LockAcquisitionException: could not load an entity: [org.alfresco.repo.domain.hibernate.NodeStatusImpl#component[protocol,identifier,guid]{guid=df70fb1e-3c4b-11dd-a245-dbbedebfc46b, protocol=workspace, identifier=SpacesStore}]
   at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:82)
   at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
   at org.hibernate.loader.Loader.loadEntity(Loader.java:1865)
   at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
   at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
   at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2992)
   at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
   at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
   at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
   at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
   at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
   at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
   at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
   at org.springframework.orm.hibernate3.HibernateTemplate$1.doInHibernate(HibernateTemplate.java:465)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
   … 141 more
Caused by: java.sql.SQLException: Transaction (Process ID 69) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
   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.isDataInResultSet(TdsCore.java:795)
   at net.sourceforge.jtds.jdbc.JtdsResultSet.<init>(JtdsResultSet.java:146)
   at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:483)
   at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:777)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
   at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
   at org.hibernate.loader.Loader.getResultSet(Loader.java:1778)
   at org.hibernate.loader.Loader.doQuery(Loader.java:662)
   at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
   at org.hibernate.loader.Loader.loadEntity(Loader.java:1851)
   … 154 more

Does anyone know what this means and how to solve it, i guess this can dramatically improve the release speed.

Thnx!!

Johan

Outcomes