[jboss-user] [JBoss Seam] - pagination control (10.3) missing transaction
baz
do-not-reply at jboss.com
Mon Feb 12 05:38:54 EST 2007
As gavin suggested. moved to herehttp://jira.jboss.com/jira/browse/JBSEAM-803
(Could it be, that the @transactional has no effect in my environment:
Hibernate running in microcontainer on tomcat
Using the configuration from the Docu chapter 19.5)
I do have implemented the pagination control (Chapter 10.3 from the docu.
This piece of code does not function:
<s:link view="/listUser.xhtml" rendered="#{myUserList.nextExists}" value=" last ">
<f:param name="firstResult" value="#{myUserList.lastFirstResult}"/>
</s:link>
When rendering the page an exception is thrown:
2:13:28,734 DEBUG org.jboss.seam.core.Events: Processing event:org.jboss.seam.postSetVariable.myUserList
12:13:28,750 DEBUG org.jboss.util.NestedThrowable: org.jboss.util.NestedThrowable.parentTraceEnabled=true
12:13:28,750 DEBUG org.jboss.util.NestedThrowable: org.jboss.util.NestedThrowable.nestedTraceEnabled=false
12:13:28,750 DEBUG org.jboss.util.NestedThrowable: org.jboss.util.NestedThrowable.detectDuplicateNesting=true
12:13:28,750 ERROR org.hibernate.util.JDBCExceptionReporter: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1171019559906/10, BranchQual=null:1171019559906, localId=0:10]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1171019559906/10, BranchQual=null:1171019559906, localId=0:10])
09.02.2007 12:13:28 com.sun.facelets.FaceletViewHandler handleRenderException
SCHWERWIEGEND: Error Rendering View[/listUser.xhtml]
javax.faces.el.EvaluationException: /listUser.xhtml @67,73 value="#{myUserList.lastFirstResult}": Exception getting value of property lastFirstResult of base of type : org.jboss.seam.framework.HibernateEntityQuery$$EnhancerByCGLIB$$9d3287a
at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:60)
at javax.faces.component.UIParameter.getValue(UIParameter.java:68)
at org.jboss.seam.ui.HtmlLink.getParameterString(HtmlLink.java:208)
at org.jboss.seam.ui.HtmlLink.encodeBegin(HtmlLink.java:115)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
After removing this piece of code the pagination works for first,last and next.
I have debugged the app.
getLastFirstResult is called which calls getResultCount form HibernateEntityQuery
The query gets generated
but Integer) query.uniqueResult();
raises the excepton about the missing transaction.
Any ideas what went wrong?
Ciao,
Carsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014920#4014920
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014920
More information about the jboss-user
mailing list