Uploaded image for project: 'Alfresco'
  1. Alfresco
  2. ALF-21341

HibernateException: connnection proxy not usable after transaction completion

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.0.d Community
    • Component/s: Repository
    • Security Level: external (External user)
    • Labels:
      None
    • Environment:
      5.0.d, installed with Windows installer, also happens when running embedded server with Alfresco SDK
    • Security Severity:
      None

      Description

      After some time Hibernate exceptions start to spawn randomly on different calls:

      org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Error preparing statement.  Cause: org.hibernate.HibernateException: connnection proxy not usable after transaction completion
      	org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
      	org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
      	com.sun.proxy.$Proxy285.selectOne(Unknown Source)
      	org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:163)
      	org.alfresco.repo.domain.node.ibatis.NodeDAOImpl.selectChildAssoc(NodeDAOImpl.java:1161)
      	org.alfresco.repo.domain.node.AbstractNodeDAOImpl.getChildAssoc(AbstractNodeDAOImpl.java:3495)
      	org.alfresco.repo.node.db.DbNodeServiceImpl.getChildByName(DbNodeServiceImpl.java:1917)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	org.alfresco.repo.lock.mem.LockableAspectInterceptor.invoke(LockableAspectInterceptor.java:226)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:104)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:224)
      	com.sun.proxy.$Proxy304.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:152)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:305)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:269)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	org.alfresco.repo.model.filefolder.FileFolderServiceImpl.searchSimple(FileFolderServiceImpl.java:593)
      	org.alfresco.repo.model.filefolder.FileFolderServiceImpl.resolveNamePath(FileFolderServiceImpl.java:1543)
      	org.alfresco.repo.model.filefolder.FileFolderServiceImpl.resolveNamePath(FileFolderServiceImpl.java:1508)
      	org.alfresco.repo.web.scripts.RepoStore.findNodeRef(RepoStore.java:318)
      	org.alfresco.repo.web.scripts.RepoStore$RepoTemplateLoader$1$1.execute(RepoStore.java:843)
      	org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
      	org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:345)
      	org.alfresco.repo.web.scripts.RepoStore$RepoTemplateLoader$1.doWork(RepoStore.java:838)
      	org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
      	org.alfresco.repo.web.scripts.RepoStore$RepoTemplateLoader.findTemplateSource(RepoStore.java:834)
      	freemarker.cache.MultiTemplateLoader.findTemplateSource(MultiTemplateLoader.java:113)
      	freemarker.cache.TemplateCache.acquireTemplateSource(TemplateCache.java:628)
      	freemarker.cache.TemplateCache.findTemplateSource(TemplateCache.java:618)
      	freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:260)
      	freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:205)
      	freemarker.template.Configuration.getTemplate(Configuration.java:740)
      	freemarker.template.Configuration.getTemplate(Configuration.java:665)
      	org.alfresco.repo.web.scripts.RepositoryTemplateProcessor.hasTemplate(RepositoryTemplateProcessor.java:145)
      	org.springframework.extensions.webscripts.TemplateProcessorRegistry.findValidTemplatePath(TemplateProcessorRegistry.java:236)
      	org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:264)
      	org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
      root cause
      
      org.apache.ibatis.executor.ExecutorException: Error preparing statement.  Cause: org.hibernate.HibernateException: connnection proxy not usable after transaction completion
      	org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:94)
      	org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:57)
      	org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:73)
      	org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)
      	org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
      	org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
      	org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
      	org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
      	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
      	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
      	org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:66)
      	sun.reflect.GeneratedMethodAccessor720.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
      	com.sun.proxy.$Proxy285.selectOne(Unknown Source)
      	org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:163)
      	org.alfresco.repo.domain.node.ibatis.NodeDAOImpl.selectChildAssoc(NodeDAOImpl.java:1161)
      	org.alfresco.repo.domain.node.AbstractNodeDAOImpl.getChildAssoc(AbstractNodeDAOImpl.java:3495)
      	org.alfresco.repo.node.db.DbNodeServiceImpl.getChildByName(DbNodeServiceImpl.java:1917)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	org.alfresco.repo.lock.mem.LockableAspectInterceptor.invoke(LockableAspectInterceptor.java:226)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:104)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:224)
      	com.sun.proxy.$Proxy304.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:152)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:305)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:269)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	org.alfresco.repo.model.filefolder.FileFolderServiceImpl.searchSimple(FileFolderServiceImpl.java:593)
      	org.alfresco.repo.model.filefolder.FileFolderServiceImpl.resolveNamePath(FileFolderServiceImpl.java:1543)
      	org.alfresco.repo.model.filefolder.FileFolderServiceImpl.resolveNamePath(FileFolderServiceImpl.java:1508)
      	org.alfresco.repo.web.scripts.RepoStore.findNodeRef(RepoStore.java:318)
      	org.alfresco.repo.web.scripts.RepoStore$RepoTemplateLoader$1$1.execute(RepoStore.java:843)
      	org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
      	org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:345)
      	org.alfresco.repo.web.scripts.RepoStore$RepoTemplateLoader$1.doWork(RepoStore.java:838)
      	org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
      	org.alfresco.repo.web.scripts.RepoStore$RepoTemplateLoader.findTemplateSource(RepoStore.java:834)
      	freemarker.cache.MultiTemplateLoader.findTemplateSource(MultiTemplateLoader.java:113)
      	freemarker.cache.TemplateCache.acquireTemplateSource(TemplateCache.java:628)
      	freemarker.cache.TemplateCache.findTemplateSource(TemplateCache.java:618)
      	freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:260)
      	freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:205)
      	freemarker.template.Configuration.getTemplate(Configuration.java:740)
      	freemarker.template.Configuration.getTemplate(Configuration.java:665)
      	org.alfresco.repo.web.scripts.RepositoryTemplateProcessor.hasTemplate(RepositoryTemplateProcessor.java:145)
      	org.springframework.extensions.webscripts.TemplateProcessorRegistry.findValidTemplatePath(TemplateProcessorRegistry.java:236)
      	org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:264)
      	org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
      root cause
      
      org.hibernate.HibernateException: connnection proxy not usable after transaction completion
      	org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:142)
      	com.sun.proxy.$Proxy284.prepareStatement(Unknown Source)
      	org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:75)
      	org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:85)
      	org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:57)
      	org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:73)
      	org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)
      	org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
      	org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
      	org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
      	org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
      	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
      	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
      	org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:66)
      	sun.reflect.GeneratedMethodAccessor720.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
      	com.sun.proxy.$Proxy285.selectOne(Unknown Source)
      	org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:163)
      	org.alfresco.repo.domain.node.ibatis.NodeDAOImpl.selectChildAssoc(NodeDAOImpl.java:1161)
      	org.alfresco.repo.domain.node.AbstractNodeDAOImpl.getChildAssoc(AbstractNodeDAOImpl.java:3495)
      	org.alfresco.repo.node.db.DbNodeServiceImpl.getChildByName(DbNodeServiceImpl.java:1917)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	org.alfresco.repo.lock.mem.LockableAspectInterceptor.invoke(LockableAspectInterceptor.java:226)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:104)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:224)
      	com.sun.proxy.$Proxy304.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:152)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:305)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:269)
      	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	sun.reflect.GeneratedMethodAccessor883.invoke(Unknown Source)
      	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	java.lang.reflect.Method.invoke(Unknown Source)
      	org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
      	com.sun.proxy.$Proxy292.getChildByName(Unknown Source)
      	org.alfresco.repo.model.filefolder.FileFolderServiceImpl.searchSimple(FileFolderServiceImpl.java:593)
      	org.alfresco.repo.model.filefolder.FileFolderServiceImpl.resolveNamePath(FileFolderServiceImpl.java:1543)
      	org.alfresco.repo.model.filefolder.FileFolderServiceImpl.resolveNamePath(FileFolderServiceImpl.java:1508)
      	org.alfresco.repo.web.scripts.RepoStore.findNodeRef(RepoStore.java:318)
      	org.alfresco.repo.web.scripts.RepoStore$RepoTemplateLoader$1$1.execute(RepoStore.java:843)
      	org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
      	org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:345)
      	org.alfresco.repo.web.scripts.RepoStore$RepoTemplateLoader$1.doWork(RepoStore.java:838)
      	org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
      	org.alfresco.repo.web.scripts.RepoStore$RepoTemplateLoader.findTemplateSource(RepoStore.java:834)
      	freemarker.cache.MultiTemplateLoader.findTemplateSource(MultiTemplateLoader.java:113)
      	freemarker.cache.TemplateCache.acquireTemplateSource(TemplateCache.java:628)
      	freemarker.cache.TemplateCache.findTemplateSource(TemplateCache.java:618)
      	freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:260)
      	freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:205)
      	freemarker.template.Configuration.getTemplate(Configuration.java:740)
      	freemarker.template.Configuration.getTemplate(Configuration.java:665)
      	org.alfresco.repo.web.scripts.RepositoryTemplateProcessor.hasTemplate(RepositoryTemplateProcessor.java:145)
      	org.springframework.extensions.webscripts.TemplateProcessorRegistry.findValidTemplatePath(TemplateProcessorRegistry.java:236)
      	org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:264)
      	org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
      	javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
      

        Attachments

          Activity

          Hide
          dhulley Derek Hulley added a comment -

          Please provide detailed steps to reproduce, including any custom code, settings, etc.

          Show
          dhulley Derek Hulley added a comment - Please provide detailed steps to reproduce, including any custom code, settings, etc.
          Hide
          lightoze Vladimir Kulev added a comment -

          I've seen it before several times in development environment (SDK run) and now it happened in testing (normal installation), but I don't have a reliable way to reproduce it. I'll report when I find anything useful.
          Do you have any suggestions what to look at in the debugger when it happens again? Errors happen randomly in different calls, and those calls are not related to any custom code. Like if there is some spoiled database-related object in the pool.

          Show
          lightoze Vladimir Kulev added a comment - I've seen it before several times in development environment (SDK run) and now it happened in testing (normal installation), but I don't have a reliable way to reproduce it. I'll report when I find anything useful. Do you have any suggestions what to look at in the debugger when it happens again? Errors happen randomly in different calls, and those calls are not related to any custom code. Like if there is some spoiled database-related object in the pool.
          Hide
          lightoze Vladimir Kulev added a comment -

          Forgot to add: when this situation happens, about every 10th or 20th request is producing the error. But it can work for a long time before the first error comes.

          Show
          lightoze Vladimir Kulev added a comment - Forgot to add: when this situation happens, about every 10th or 20th request is producing the error. But it can work for a long time before the first error comes.
          Hide
          dhulley Derek Hulley added a comment - - edited

          What happens if you modify your Tomcat HTTP connection pool to have a zero-thread lower bound i.e. allow all threads to die after a while?
          The most likely thing is that some code is leaking a transaction (usually some post-transaction handling that is attempting to make a call to the NodeService without a wrapping transaction). This leak corrupts the thread and requires the thread to die.

          Show
          dhulley Derek Hulley added a comment - - edited What happens if you modify your Tomcat HTTP connection pool to have a zero-thread lower bound i.e. allow all threads to die after a while? The most likely thing is that some code is leaking a transaction (usually some post-transaction handling that is attempting to make a call to the NodeService without a wrapping transaction). This leak corrupts the thread and requires the thread to die.
          Hide
          lightoze Vladimir Kulev added a comment -

          Yes, I have actually found a TransactionListenerAdapter whose afterCommit is transaction-less. Should there be a new transaction even when all afterCommit actions are read-only?

          Show
          lightoze Vladimir Kulev added a comment - Yes, I have actually found a TransactionListenerAdapter whose afterCommit is transaction-less. Should there be a new transaction even when all afterCommit actions are read-only?
          Hide
          dhulley Derek Hulley added a comment -

          Yes, you should always be explicit with transactions. Any database activity is using a transaction regardless of what you do and it's much more efficient (and safe) to wrap the entire batch of interactions in a single transaction. Also, make sure that you are NOT absorbing any exceptions within the transactions i.e. always let the RetryingTransactionHelper roll back when things don't go according to plan.

          Show
          dhulley Derek Hulley added a comment - Yes, you should always be explicit with transactions. Any database activity is using a transaction regardless of what you do and it's much more efficient (and safe) to wrap the entire batch of interactions in a single transaction. Also, make sure that you are NOT absorbing any exceptions within the transactions i.e. always let the RetryingTransactionHelper roll back when things don't go according to plan.
          Hide
          lightoze Vladimir Kulev added a comment -

          It seems that now with your advice our problem is solved. Thanks a lot and please close the issue.

          Show
          lightoze Vladimir Kulev added a comment - It seems that now with your advice our problem is solved. Thanks a lot and please close the issue.

            People

            • Assignee:
              closedissues Closed Issues
              Reporter:
              lightoze Vladimir Kulev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: