[jboss-user] [JBoss Seam] - Re: pagination control (10.3) missing transaction

baz do-not-reply at jboss.com
Mon Feb 12 09:49:22 EST 2007


Hope this will be enough. If not please ask again. My runtime environment is configured as described in chapter 19.5
configuration:
    <core:hibernate-session-factory name="hibernateSessionFactory"/>
  |     
  |     <core:managed-hibernate-session name="bazDatabase"
  |     				session-factory-jndi-name="java:/bazDatabaseFactory"
  |                                     auto-create="true"/>
  | 	
  |  	<core:microcontainer installed="true"/>
  | 
  | 	<security:identity authenticate-method="#{authorizationBean.authenticate}"/>
  |   <drools:rule-base name="securityRules">
  |        <drools:rule-files><value>security-rules.drl</value></drools:rule-files>
  |    </drools:rule-base>    
  | 
  | 	<!-- Setup application components  -->
  |     <factory name="myUser" value="#{myUserHome.instance}"/>
  | 	<framework:hibernate-entity-home name="myUserHome" 
  | 	                                 entity-class="de.bafz.lims.model.User" 
  | 	                                 session="#{bazDatabase}"/>
  | 	                                 
  |     <framework:hibernate-entity-query name="myUserList" 
  |                             ejbql="from User"
  |                             max-results="5" 
  |                             order="login"
  |                             session="#{bazDatabase}" />
  | 
  | 
xhtml page :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  | <html xmlns="http://www.w3.org/1999/xhtml"
  | 	xmlns:ui="http://java.sun.com/jsf/facelets"
  | 	xmlns:h="http://java.sun.com/jsf/html"
  | 	xmlns:f="http://java.sun.com/jsf/core"
  | 	xmlns:t="http://myfaces.apache.org/tomahawk"
  | 	xmlns:jdt="http://www.jenia.org/jsf/dataTools"
  | 	xmlns:s="http://jboss.com/products/seam/taglib">
  | 
  | <f:loadBundle basename="lims" var="bundle" />
  | <body>
  | <ui:composition template="/includes/LimsPage.xhtml">
  | 	<ui:define name="title">
  | 		<h:outputText value="list user" />
  | 	</ui:define>
  | 	<ui:define name="body">
  | 		<h:form>
  | 
  | 			<h:outputText value="No person exists"
  | 				rendered="#{empty myUserList.resultList}" />
  | 			<h:dataTable id="myUserList" var="myUser"
  | 				value="#{myUserList.resultList}" border="1"
  | 				rendered="#{not empty myUserList.resultList}">
  | 				<h:column>
  | 					<f:facet name="header">
  | 						<h:outputText value="#{bundle['User.login']}" />
  | 					</f:facet>
  | 					<s:link id="person" value="#{myUser.login}"
  | 						view="/managePages/addUser.xhtml">
  | 						<f:param name="myUserId" value="#{myUser.login}" />
  | 					</s:link>
  | 				</h:column>
  | 
  | 				<h:column>
  | 					<f:facet name="header">
  | 						<h:outputText value="#{bundle['User.firstName']}" />
  | 					</f:facet>
  | 				#{myUser.firstName}
  | 			</h:column>
  | 				<h:column>
  | 					<f:facet name="header">
  | 						<h:outputText value="#{bundle['User.lastName']}" />
  | 					</f:facet>
  | 				#{myUser.lastName}
  | 			</h:column>
  | 				<h:column>
  | 					<f:facet name="header">
  | 						<h:outputText value="#{bundle['User.institute']}" />
  | 					</f:facet>
  | 				#{myUser.institute}
  | 			</h:column>
  | 
  | 			</h:dataTable>
  | <s:link view="/listUser.xhtml" rendered="#{myUserList.previousExists}" value=" first ">
  |     <f:param name="firstResult" value="0"/>
  | </s:link>
  | 
  | <s:link view="/listUser.xhtml" rendered="#{myUserList.previousExists}" value=" prev ">
  |     <f:param name="firstResult" value="#{myUserList.previousFirstResult}"/>
  | </s:link>
  | 
  | <s:link view="/listUser.xhtml" rendered="#{myUserList.nextExists}" value="  next ">
  |     <f:param name="firstResult" value="#{myUserList.nextFirstResult}"/>
  | </s:link>
  | <s:link view="/listUser.xhtml" rendered="#{myUserList.nextExists}" value="  last ">
  |     <f:param name="firstResult" value="#{myUserList.lastFirstResult}"/>
  | </s:link>
  | 
  | 			<div class="actionButtons">
  | 			   <s:button id="newuser"	value="#{bundle.NewUser}" view="/managePages/addUser.xhtml" /> 
  | 			   <s:button	id="done" value="#{bundle.cancel}" view="/pages/main.xhtml" />
  | 			</div>
  | 
  | 		</h:form>
  | 	</ui:define>
  | </ui:composition>
  | </body>
  | </html>
  | 
This is the stacktrace:
15:44:37,406 DEBUG org.jboss.seam.core.Events: Processing event:org.jboss.seam.postSetVariable.myUserList
  | 15:44:37,421 DEBUG org.jboss.util.NestedThrowable: org.jboss.util.NestedThrowable.parentTraceEnabled=true
  | 15:44:37,421 DEBUG org.jboss.util.NestedThrowable: org.jboss.util.NestedThrowable.nestedTraceEnabled=false
  | 15:44:37,421 DEBUG org.jboss.util.NestedThrowable: org.jboss.util.NestedThrowable.detectDuplicateNesting=true
  | 15:44:37,421 ERROR org.hibernate.util.JDBCExceptionReporter: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1171291443484/10, BranchQual=null:1171291443484, localId=0:10]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1171291443484/10, BranchQual=null:1171291443484, localId=0:10])
  | 12.02.2007 15:44:37 com.sun.facelets.FaceletViewHandler handleRenderException
  | SCHWERWIEGEND: Error Rendering View[/listUser.xhtml]
  | javax.faces.el.EvaluationException: /listUser.xhtml @66,72 value="#{myUserList.lastFirstResult}": Exception getting value of property lastFirstResult of base of type : org.jboss.seam.framework.HibernateEntityQuery$$EnhancerByCGLIB$$b1c71f88
  | 	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)
  | 	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
  | 	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
  | 	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
  | 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:43)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:29)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
  | 	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: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(Unknown Source)
  | Caused by: javax.faces.el.EvaluationException: Bean: org.jboss.seam.framework.HibernateEntityQuery$$EnhancerByCGLIB$$b1c71f88, property: lastFirstResult
  | 	at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:442)
  | 	at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
  | 	at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
  | 	at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
  | 	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
  | 	at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
  | 	at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
  | 	... 32 more
  | Caused by: java.lang.reflect.InvocationTargetException
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Unknown Source)
  | 	at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:438)
  | 	... 38 more
  | Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
  | 	at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
  | 	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
  | 	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  | 	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
  | 	at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
  | 	at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
  | 	at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
  | 	at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
  | 	at org.hibernate.loader.Loader.doQuery(Loader.java:661)
  | 	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
  | 	at org.hibernate.loader.Loader.doList(Loader.java:2145)
  | 	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
  | 	at org.hibernate.loader.Loader.list(Loader.java:2024)
  | 	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
  | 	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
  | 	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
  | 	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
  | 	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
  | 	at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:756)
  | 	at org.jboss.seam.framework.HibernateEntityQuery.getResultCount(HibernateEntityQuery.java:67)
  | 	at org.jboss.seam.framework.Query.getLastFirstResult(Query.java:110)
  | 	at org.jboss.seam.framework.Query$$FastClassByCGLIB$$6805c8c9.invoke(<generated>)
  | 	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
  | 	at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
  | 	at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
  | 	at sun.reflect.GeneratedMethodAccessor149.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Unknown Source)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
  | 	at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  | 	at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:29)
  | 	at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Unknown Source)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
  | 	at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  | 	at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:52)
  | 	at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Unknown Source)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
  | 	at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  | 	at org.jboss.seam.interceptors.TransactionInterceptor$1.work(TransactionInterceptor.java:28)
  | 	at org.jboss.seam.util.Work.workInTransaction(Work.java:37)
  | 	at org.jboss.seam.interceptors.TransactionInterceptor.doInTransactionIfNecessary(TransactionInterceptor.java:23)
  | 	at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Unknown Source)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
  | 	at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  | 	at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
  | 	at sun.reflect.GeneratedMethodAccessor146.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  | 	at java.lang.reflect.Method.invoke(Unknown Source)
  | 	at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
  | 	at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
  | 	at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
  | 	at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
  | 	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
  | 	at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:145)
  | 	at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:80)
  | 	at org.jboss.seam.framework.HibernateEntityQuery$$EnhancerByCGLIB$$b1c71f88.getLastFirstResult(<generated>)
  | 	... 43 more
  | Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1171291443484/10, BranchQual=null:1171291443484, localId=0:10]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1171291443484/10, BranchQual=null:1171291443484, localId=0:10])
  | 	at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
  | 	at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
  | 	at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
  | 	... 106 more
  | Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=null:1171291443484/10, BranchQual=null:1171291443484, localId=0:10]
  | 	at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:290)
  | 	at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:392)
  | 	at org.jboss.resource.adapter.jdbc.local.LocalTxDataSource$ConnectionManagerDelegate.allocateConnection(LocalTxDataSource.java:78)
  | 	at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
  | 	... 108 more
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org.jboss
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org.jboss.seam
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org.jboss.seam.core
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: entry
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: entry
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: entry
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: entry
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org.jboss
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org.jboss.seam
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org.jboss.seam.core
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: entry
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org.jboss
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org.jboss.seam
  | 15:44:37,437 DEBUG org.jboss.seam.Component: seam component not found: org.jboss.seam.core
  | 15:44:37,453 DEBUG org.jboss.seam.Component: seam component not found: org
  | 15:44:37,453 DEBUG org.jboss.seam.Component: seam component not found: org.jboss
  | 15:44:37,453 DEBUG org.jboss.seam.Component: seam component not found: org.jboss.seam
  | 15:44:37,453 DEBUG org.jboss.seam.Component: seam component not found: org.jboss.seam.core
  | 15:44:37,453 DEBUG org.jboss.seam.Component: seam component not found: bazExperiment
  | 15:44:37,468 DEBUG org.jboss.seam.intercept.RootInterceptor: intercepted: myUserList.getResultList
  | 

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

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



More information about the jboss-user mailing list