cancel
Showing results for 
Search instead for 
Did you mean: 

The transaction marked rollback error

jack_jin
Champ in-the-making
Champ in-the-making
Hello,

Thanks for helping me out and answering my previous questions, they're very helpful.

Last week while we were adding some users to the web project, we had some other webscript execute under admin for our web project.  Those webscripts errored out, and adding the users timed out.  The users seems to be added successfully, and we can execute webscripts again.  But when we open up modified items by admin in alfresco web ui, we get the following error -

21:33:13,674 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco].[jsp]] Servlet.service() for servlet jsp threw exception
javax.transaction.RollbackException: The transaction has already been marked for rollback
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:415)
   at org.alfresco.web.ui.wcm.component.UIUserSandboxes.encodeBegin(UIUserSandboxes.java:595)
   at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
   at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
   at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspx_meth_w_005fuserSandboxes_005f0(browse_002dwebsite_jsp.java:2024)
   at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspx_meth_a_005fpanel_005f3(browse_002dwebsite_jsp.java:1998)
   at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspService(browse_002dwebsite_jsp.java:709)
   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)
21:33:13,675 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
javax.transaction.RollbackException: The transaction has already been marked for rollback
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:415)
   at org.alfresco.web.ui.wcm.component.UIUserSandboxes.encodeBegin(UIUserSandboxes.java:595)
   at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
   at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
   at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspx_meth_w_005fuserSandboxes_005f0(browse_002dwebsite_jsp.java:2024)
   at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspx_meth_a_005fpanel_005f3(browse_002dwebsite_jsp.java:1998)
   at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspService(browse_002dwebsite_jsp.java:709)
   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)

This error wouldn't go away after restarting alfresco!  It seems that we can't get out of the transaction rollback state : (.  Any ways we can release the transaction?

Thanks,
Jack
5 REPLIES 5

jack_jin
Champ in-the-making
Champ in-the-making
I copied the database dump and alf_data from another server, that avoided this issue.  We have other development tasks that we just need the environment up and running.

But, I can forsee this occurring again, have anyone else experienced this or have a real fix for it?

jack_jin
Champ in-the-making
Champ in-the-making
This just happened to a production system - is there a way to free up the transaction once it's locked, without restoring alfresco

jack_jin
Champ in-the-making
Champ in-the-making
^

tommorris
Champ in-the-making
Champ in-the-making
Have you looked into customising the configuration of the DBCP connection pool?
This can perform interval-based health checks of connections in the pool.

Have a look for the file: custom-connection-pool-context.xml.sample
It is often found in 'tomcat\shared\classes\alfresco\extension\',
and it's an example of another way to configure the bean with the ID 'dataSource'.

I guess you'll want to change the 'validationQuery' property, in particular.

Maybe this is useful.

Tom
http://www.ixxus.com

jack_jin
Champ in-the-making
Champ in-the-making
Hi Tom,

Thanks for the reply.  Since we use oracle, we changed our validationQuery to the following


        <property name="validationQuery" >
            <value>select 1 from dual</value>
        </property>

Could this have anything to do with the transaction marked back error?