AnsweredAssumed Answered

AlfrescoRuntimeException : Transaction must be active

Question asked by cblandin on Aug 25, 2006
Latest reply on Jun 25, 2007 by srao
Hello,

I implemented my own AuthenticationFilter (I took for example the NovellIChainsHTTPRequestAuthenticationFilter) to configure a CAS authentication.
The communication with the CAS server seems to work but when I set the authentication
authComponent.setCurrentUser(userName);
  in the function setAuthenticatedUser(HttpServletRequest req, HttpSession httpSess, String userName) of my filter (it comes from NovellIChainsHTTPRequestAuthenticationFilter) I get this error :
org.alfresco.error.AlfrescoRuntimeException: Transaction must be active and synchronization is required
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport.registerSynchronizations(AlfrescoTransactionSupport.java:363)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport.getSynchronization(AlfrescoTransactionSupport.java:348)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport.bindDaoService(AlfrescoTransactionSupport.java:202)
   at org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:58)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   at $Proxy1.getNode(Unknown Source)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.exists(DbNodeServiceImpl.java:130)
   at sun.reflect.GeneratedMethodAccessor159.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:213)
   at $Proxy2.exists(Unknown Source)
   at org.alfresco.repo.security.person.PersonServiceImpl.getPersonOrNull(PersonServiceImpl.java:149)
   at org.alfresco.repo.security.person.PersonServiceImpl.getPerson(PersonServiceImpl.java:104)
   at cirad.CASAuthenticationFilter.setAuthenticatedUser(CASAuthenticationFilter.java:210)
   at cirad.CASAuthenticationFilter.doFilter(CASAuthenticationFilter.java:178)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFilter.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)

Does someone know what is the problem ?

Christophe

Outcomes