Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
- @Transactional + Transaction.setRollbackOnly error

- @Transactional + Transaction.setRollbackOnly error

2007-07-11       - By przemjaskier

 Back
Env: Tomcat 6.0.13, Hibernate local transactions, Seam CVS 11/07.

As @(protected)(ifOutcome) had been removed ,usage of Trancation.instance()
,setRollbackOnly() was introduced instead.

Before (1.3 + Rollback) such pseudocode was working (long-running conversation
with manual flush mode). Am I doing something
totally wrong and such thing is expected (stacktrace below),
or is it an error?


 | @(protected)
 | @(protected)(ifOutcome="GOBACK")//now removed for Seam2
 | methodCalledFromJPDLPageflow()
 | {
 |     doALotWithSession();
 |     for (everyElementThatUserProvidedInCoversation) {
 |         try {
 |             doSomethingThatCanFireException();
 |         } catch (NastyException) {
 |             createErrorFacesMessageEtcForElement();
 |             addToInvalidElementsCollection();
 |             errorAppeared = true;
 |         }
 |     }
 |    
 |     if (errorAppeared) {
 |         prepareUserReportForInvalidElementsCollection();
 |        
 | -->    Transaction.instance.setRollbackOnly();
 |          return "GOBACK";
 |     }
 |      
 |     session.flush, etc, etc...  
 | }
 |

Here yon see corresponding logs and exceptions... BTW another
strange thing is this "cannot render message" thing from
JSF RI, because it was working before as there is
<a4j:outputPanel id="messagesTop">
   <h:messages/>
</a4j:outputPanel>

on the page.


 | * 2007-07-11 20:58:53,262 DEBUG HibernateTransaction.begin():77
 |   beginning Hibernate transaction
 | * 2007-07-11 20:58:53,317 DEBUG HibernateTransaction
.registerSynchronization():181
 |   registering synchronization: ManagedHibernateSession(java:
/seamManagedHibernateSession)
 | * 2007-07-11 20:59:01,152 DEBUG HibernateTransaction.setRollbackOnly():122
 |   marking Hibernate transaction for rollback
 | * 2007-07-11 20:59:01,155 DEBUG HibernateTransaction.rollback():112
 |   rolling back Hibernate transaction
 | Jul 11, 2007 8:59:01 PM com.sun.faces.lifecycle.RenderResponsePhase execute
 | INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been
displayed.
 | sourceId=null[severity=(INFO 0), summary=(Nie ma wystarczaj?cej ilo?ci
niekt??rych zam??wionych przedmiot??w, szczeg???y podano poni?ej.), detail=(Nie
ma wystarczaj?cej ilo?ci niekt??rych zam??wionych przedmiot??w, szczeg???y
podano poni?ej.)]
 | sourceId=null[severity=(WARN 1), summary=(Transaction failed), detail=
(Transaction failed)]
 | * 2007-07-11 20:59:01,218 DEBUG HibernateTransaction.rollback():112
 |   rolling back Hibernate transaction
 | * 2007-07-11 20:59:01,218 ERROR SeamPhaseListener.afterPhase():189
 |   uncaught exception
 | java.lang.IllegalStateException Source code of java.lang.IllegalStateException: Could not commit transaction
 |   at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener
.java:589)
 |   at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase
(SeamPhaseListener.java:325)
 |   at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase
(SeamPhaseListener.java:226)
 |   at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java
:184)
 |   at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
 |   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
 |   at javax.faces.webapp.FacesServlet Source code of javax.faces.webapp.FacesServlet(FacesServlet.java:245)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:290)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:206)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:83)
 |   at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter
(BaseXMLFilter.java:127)
 |   at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter
.java:277)
 |   at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java
:70)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:235)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:206)
 |   at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter
.java:75)
 |   at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:92)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:235)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:206)
 |   at org.apache.catalina.core.StandardWrapperValve Source code of org.apache.catalina.core.StandardWrapperValve
(StandardWrapperValve.java:230)
 |   at org.apache.catalina.core.StandardContextValve Source code of org.apache.catalina.core.StandardContextValve
(StandardContextValve.java:175)
 |   at org.apache.catalina.core.StandardHostValve Source code of org.apache.catalina.core.StandardHostValve(StandardHostValve
.java:128)
 |   at org.apache.catalina.valves.ErrorReportValve Source code of org.apache.catalina.valves.ErrorReportValve(ErrorReportValve
.java:104)
 |   at org.apache.catalina.core.StandardEngineValve Source code of org.apache.catalina.core.StandardEngineValve(StandardEngineValve
.java:109)
 |   at org.apache.catalina.connector.CoyoteAdapter Source code of org.apache.catalina.connector.CoyoteAdapter(CoyoteAdapter.java
:261)
 |   at org.apache.coyote.http11.Http11Processor Source code of org.apache.coyote.http11.Http11Processor(Http11Processor.java
:844)
 |   at org.apache.coyote.http11.Http11Protocol Source code of org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
(Http11Protocol.java:581)
 |   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 |   at java.lang.Thread Source code of java.lang.Thread(Thread.java:619)
 | Caused by: java.lang.IllegalStateException Source code of java.lang.IllegalStateException: transaction is not active
 |   at org.jboss.seam.transaction.HibernateTransaction.assertActive
(HibernateTransaction.java:163)
 |   at org.jboss.seam.transaction.HibernateTransaction.rollback
(HibernateTransaction.java:114)
 |   at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener
.java:584)
 |   ... 40 more
 | * 2007-07-11 20:59:01,222 ERROR DebugPageHandler.handle():23
 |   redirecting to debug page
 | java.lang.IllegalStateException Source code of java.lang.IllegalStateException: transaction is not active
 |   at org.jboss.seam.transaction.HibernateTransaction.assertActive
(HibernateTransaction.java:163)
 |   at org.jboss.seam.transaction.HibernateTransaction.rollback
(HibernateTransaction.java:114)
 |   at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener
.java:584)
 |   at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase
(SeamPhaseListener.java:325)
 |   at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase
(SeamPhaseListener.java:226)
 |   at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java
:184)
 |   at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
 |   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
 |   at javax.faces.webapp.FacesServlet Source code of javax.faces.webapp.FacesServlet(FacesServlet.java:245)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:290)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:206)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:83)
 |   at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter
(BaseXMLFilter.java:127)
 |   at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter
.java:277)
 |   at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java
:70)
 |   at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
.java:69)
 |   at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:235)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:206)
 |   at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter
.java:75)
 |   at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:92)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:235)
 |   at org.apache.catalina.core.ApplicationFilterChain Source code of org.apache.catalina.core.ApplicationFilterChain
(ApplicationFilterChain.java:206)
 |   at org.apache.catalina.core.StandardWrapperValve Source code of org.apache.catalina.core.StandardWrapperValve
(StandardWrapperValve.java:230)
 |   at org.apache.catalina.core.StandardContextValve Source code of org.apache.catalina.core.StandardContextValve
(StandardContextValve.java:175)
 |   at org.apache.catalina.core.StandardHostValve Source code of org.apache.catalina.core.StandardHostValve(StandardHostValve
.java:128)
 |   at org.apache.catalina.valves.ErrorReportValve Source code of org.apache.catalina.valves.ErrorReportValve(ErrorReportValve
.java:104)
 |   at org.apache.catalina.core.StandardEngineValve Source code of org.apache.catalina.core.StandardEngineValve(StandardEngineValve
.java:109)
 |   at org.apache.catalina.connector.CoyoteAdapter Source code of org.apache.catalina.connector.CoyoteAdapter(CoyoteAdapter.java
:261)
 |   at org.apache.coyote.http11.Http11Processor Source code of org.apache.coyote.http11.Http11Processor(Http11Processor.java
:844)
 |   at org.apache.coyote.http11.Http11Protocol Source code of org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
(Http11Protocol.java:581)
 |   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 |   at java.lang.Thread Source code of java.lang.Thread(Thread.java:619)
 | * 2007-07-11 20:59:01,235 DEBUG HibernateTransaction.begin():77
 |   beginning Hibernate transaction
 | * 2007-07-11 20:59:01,245 DEBUG HibernateTransaction
.registerSynchronization():181
 |   registering synchronization: ManagedHibernateSession(java:
/seamManagedHibernateSession)
 | Jul 11, 2007 8:59:01 PM com.sun.faces.lifecycle.RenderResponsePhase execute
 | INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been
displayed.
 | sourceId=null[severity=(WARN 1), summary=(Illegal navigation), detail=
(Illegal navigation)]
 | * 2007-07-11 20:59:01,277 DEBUG HibernateTransaction.commit():94
 |   committing Hibernate transaction
 |

Regards,
Przemek.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4063170#4063170

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4063170

__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

©2008 junlu.com - Jax Systems, LLC, U.S.A.