Template Processor - Rollback Exception

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2007 04:32 PM
after running the following command in the template processor
I get the following exception:
I have searched the logs and in localhost.xxxx-xx-xx.log I get the following every time I request the page:
I'm not sure why I am getting it. This is a servlet I created myself as I wished to add a few things the the data model and how I look up the template from the url args before processing it. The error started occuring when I modified the servlet to extend GuestTemplateContentServlet and tried processing the template as guest. I was origonally forcing an "Admin" login and it worked fine. The other point is, even with the rollback status, the template processes everything perfectly, I can't find anything wrong with the output.
I realize there probably isn't enough here to pinpoint the problem but I am looking for some technique in tracking this down. I can't find any information on the error other than it occurred and something is marking the UserTransaction for rollback without throwing an exception. The processing appears to be just fine except for this.
Thank you for your help.
templateService.processTemplate( formTemplateNodeRef.toString(), model, writer);
I get the following exception:
org.springframework.transaction.UnexpectedRollbackException: Transaction rolledback because it has been marked as rollback-only at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:618) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:307) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210) at $Proxy89.processTemplate(Unknown Source) at com.tlhc.wc.servlet.PageProcessor.processTemplateRequest(PageProcessor.java:270) at com.tlhc.wc.servlet.PageProcessor$ProcessDownloadContentWork.doWork(PageProcessor.java:430) at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:260) at com.tlhc.wc.servlet.PageProcessor.service(PageProcessor.java:114) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 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:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) 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)
I have searched the logs and in localhost.xxxx-xx-xx.log I get the following every time I request the page:
SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/jsp/error.jsp]java.lang.IllegalStateException at org.apache.coyote.Response.reset(Response.java:296) at org.apache.catalina.connector.Response.reset(Response.java:645) at org.apache.catalina.connector.Response.reset(Response.java:909) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:356) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:212) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134) 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:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) 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)
I'm not sure why I am getting it. This is a servlet I created myself as I wished to add a few things the the data model and how I look up the template from the url args before processing it. The error started occuring when I modified the servlet to extend GuestTemplateContentServlet and tried processing the template as guest. I was origonally forcing an "Admin" login and it worked fine. The other point is, even with the rollback status, the template processes everything perfectly, I can't find anything wrong with the output.
I realize there probably isn't enough here to pinpoint the problem but I am looking for some technique in tracking this down. I can't find any information on the error other than it occurred and something is marking the UserTransaction for rollback without throwing an exception. The processing appears to be just fine except for this.
Thank you for your help.
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2007 06:15 AM
It's probable that code in the template is accessing nodes that the Guest user does not have access to? It looks like the exception is getting wrapped by the RollBack exception - we have fixed the issue for 2.2dev so that you actually see the real exception again rather than this annoying rollback exception. It might be worth trying this with a nightly build to see if the actual exception pops out.
Thanks,
Kevin
Thanks,
Kevin
