2 Replies Latest reply on Nov 29, 2006 4:45 AM by Jens Weintraut

    Seam 1.1 & Tomahawk Datatable

    Jens Weintraut Apprentice

      Hi,

      I'm trying to migrate to Seam 1.1 and having some problems. I hope that somebody can help.

      On several pages in my application I make use of the DataModelWithTomahawkDataTable workaround mentioned on the wiki (http://wiki.jboss.org/wiki/Wiki.jsp?page=DataModelWithTomahawkDataTable).
      Since I use Seam 1.1 this workaround doesn't work anymore. Or I made a mistake.

      The workaround proposes to annotate a method as @Factory("xyz") for a member and to annotate the corresponding getter with @DataModel. So when I use "xyz" on a page there are two methods related to the attribute. In the past the @DataModel was invoked, but now it seems that the @Factory is invoked. That's fatal since the @Factory returns String (in the wiki it returns void) so all the subsequent calls to the "var" of the dataTable are invoked on the String.

      That's one problem. The other problem also has to do with this workaround and I hope it will disappear when the first problem is fixed.
      There has to be something wrong with the column member which is introduced to make a dataTable sortable, but I don't know what's wrong with it at all. And there's only a stack-trace which doesn't tell me anything useful. Perhaps somebody else knows what's the problem:

      16:44:25,500 ERROR [ExceptionInterceptor] redirecting to debug page
      javax.ejb.EJBException: java.lang.IllegalStateException: No page context active
       at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
       at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
       at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
       at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
       at $Proxy220.setColumn(Unknown Source)
       at com.idsscheer.ares.sessions.interfaces.TestactionValidator$$FastClassByCGLIB$$18d04061.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.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:69)
       at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
       at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
       at sun.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       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.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
       at sun.reflect.GeneratedMethodAccessor270.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       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.SynchronizationInterceptor.serialize(SynchronizationInterceptor.java:30)
       at sun.reflect.GeneratedMethodAccessor298.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       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.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:78)
       at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
       at com.idsscheer.ares.sessions.interfaces.TestactionValidator$$EnhancerByCGLIB$$e770bc6a.setColumn(<generated>)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverImpl.java:406)
       at org.apache.myfaces.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:173)
       at com.sun.facelets.el.LegacyELContext$LegacyELResolver.setValue(LegacyELContext.java:201)
       at com.sun.el.parser.AstValue.setValue(AstValue.java:134)
       at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:255)
       at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
       at com.sun.facelets.el.LegacyValueBinding.setValue(LegacyValueBinding.java:68)
       at org.apache.myfaces.component.html.ext.HtmlDataTable.restoreState(HtmlDataTable.java:828)
       at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:728)
       at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:719)
       at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:719)
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreComponentState(JspStateManagerImpl.java:221)
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:287)
       at org.jboss.seam.jsf.SeamStateManager.restoreView(SeamStateManager.java:49)
       at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:255)
       at org.jboss.seam.jsf.SeamViewHandler.restoreView(SeamViewHandler.java:64)
       at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:353)
       at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:141)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
       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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       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.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.IllegalStateException: No page context active
       at org.jboss.seam.ScopeType.getContext(ScopeType.java:105)
       at org.jboss.seam.Component.injectDataModelSelection(Component.java:1167)
       at org.jboss.seam.Component.injectDataModelSelection(Component.java:1152)
       at org.jboss.seam.Component.inject(Component.java:1088)
       at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
       at sun.reflect.GeneratedMethodAccessor274.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       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.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
       at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       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:51)
       at sun.reflect.GeneratedMethodAccessor272.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       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 com.idsscheer.ares.sessions.LoggedInInterceptor.checkLoggedIn(LoggedInInterceptor.java:31)
       at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       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.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:79)
       at sun.reflect.GeneratedMethodAccessor297.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       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.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49)
       at sun.reflect.GeneratedMethodAccessor271.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
       at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
       ... 97 more
      16:44:25,546 ERROR [PhaseListenerManager] Exception in PhaseListener RESTORE_VIEW(1) afterPhase
      java.lang.UnsupportedOperationException
       at java.util.AbstractMap.put(AbstractMap.java:228)
       at org.jboss.seam.contexts.PageContext.set(PageContext.java:90)
       at org.jboss.seam.Component.newInstance(Component.java:1695)
       at org.jboss.seam.Component.getInstance(Component.java:1600)
       at org.jboss.seam.Component.getInstance(Component.java:1579)
       at org.jboss.seam.Component.getInstance(Component.java:1556)
       at org.jboss.seam.Component.getInstance(Component.java:1551)
       at org.jboss.seam.core.FacesPage.instance(FacesPage.java:85)
       at org.jboss.seam.core.Manager.restoreConversation(Manager.java:425)
       at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRestoreView(AbstractSeamPhaseListener.java:51)
       at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:73)
       at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
       at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:181)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
       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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       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.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      16:44:25,562 ERROR [PhaseListenerManager] Exception in PhaseListener RESTORE_VIEW(1) afterPhase
      java.lang.NullPointerException
       at org.apache.myfaces.renderkit.html.util.AutoScrollPhaseListener.afterPhase(AutoScrollPhaseListener.java:52)
       at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
       at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:181)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
       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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       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.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      16:44:25,562 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      javax.faces.el.EvaluationException: /showListForValidator.xhtml @43,208 sortColumn="#{testactionValidator.column}":
       Exception setting property column of base with class com.idsscheer.ares.sessions.interfaces.TestactionValidator$$EnhancerByCGLIB$$e770bc6a
       at com.sun.facelets.el.LegacyValueBinding.setValue(LegacyValueBinding.java:74)
       at org.apache.myfaces.component.html.ext.HtmlDataTable.restoreState(HtmlDataTable.java:828)
       at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:728)
       at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:719)
       at javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:719)
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreComponentState(JspStateManagerImpl.java:221)
       at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:287)
       at org.jboss.seam.jsf.SeamStateManager.restoreView(SeamStateManager.java:49)
       at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:255)
       at org.jboss.seam.jsf.SeamViewHandler.restoreView(SeamViewHandler.java:64)
       at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:353)
       at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:141)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
       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.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       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.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.faces.el.EvaluationException: Bean: com.idsscheer.ares.sessions.interfaces.TestactionValidator$$EnhancerByCGLIB$$e770bc6a, property: column
       at org.apache.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverImpl.java:410)
       at org.apache.myfaces.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:173)
       at com.sun.facelets.el.LegacyELContext$LegacyELResolver.setValue(LegacyELContext.java:201)
       at com.sun.el.parser.AstValue.setValue(AstValue.java:134)
       at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:255)
       at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
       at com.sun.facelets.el.LegacyValueBinding.setValue(LegacyValueBinding.java:68)
       ... 38 more
      Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverImpl.java:406)
       ... 44 more
      Caused by: java.lang.NullPointerException
       at org.jboss.seam.core.Exceptions$DebugPageHandler.handle(Exceptions.java:369)
       at org.jboss.seam.core.Exceptions.handle(Exceptions.java:58)
       at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:34)
       at sun.reflect.GeneratedMethodAccessor270.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       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.SynchronizationInterceptor.serialize(SynchronizationInterceptor.java:30)
       at sun.reflect.GeneratedMethodAccessor298.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       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.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:78)
       at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:47)
       at com.idsscheer.ares.sessions.interfaces.TestactionValidator$$EnhancerByCGLIB$$e770bc6a.setColumn(<generated>)
       ... 49 more


        • 2. Re: Seam 1.1 & Tomahawk Datatable
          Jens Weintraut Apprentice

          Sure. Here we go:

          The session bean:

          @Stateful
          @Scope(ScopeType.SESSION)
          @LoggedIn
          @Name("searchTestaction")
          public class SearchTestactionAction implements Serializable, SearchTestaction {
           @PersistenceContext(unitName = "aresDatabase")
           private transient EntityManager em;
          
           @In(required=false)
           private Testaction testaction;
          
           private List<Testaction> foundTestactions;
           @DataModelSelection
           @Out(required=false, scope=ScopeType.SESSION)
           private Testaction foundTestaction;
           //@DataModelSelectionIndex workaround
           private int foundTestactionIndex;
          
           @In(required=false)
           private Release selectedRelease;
          
           private String sortColumn = "id";
           private boolean ascending = true;
          
           @Factory("foundTestactions")
           public String search() {
           //omitted: generate the query
          
           if(query.length() != 0) {
           if(selectedRelease != null) {
           addPrefix(query);
           query.append("TACT_REL_ID=");
           query.append(selectedRelease.getID());
           }
           foundTestactions = EMHelper.execQuery(em, "from Testaction " + query.toString() + " order by TACT_ID asc");
           Collections.sort(foundTestactions, new TestactionComparator(sortColumn, ascending));
           }
          
           return "search";
           }
          
           @DataModel
           public List<Testaction> getFoundTestactions() {
           return foundTestactions;
           }


          The page with a search form and a result list:
          <ui:define name="content">
           <h1>#{ares_messages.header_searchTestaction}</h1>
           <h:form>
           <div id="errors"><h:messages layout="table" /></div>
           <div class="buttonLine">
           <h:outputText rendered="#{not empty searchTestaction.foundTestactions}"
           value="#{ares_messages.label_search_displaySearchForm}"
           onclick="switchVisibility('searchForm'); this.style.display='none';" styleClass="button"
           style="margin-right: 30px; padding: 5px; cursor: pointer;" />
           <h:commandButton action="#{searchTestaction.search}" image="img/find.gif" styleClass="graphical"
           style="margin-left: 0px; margin-right: 15px;" title="#{ares_messages.tooltip_searchTestaction}" />
           </div>
          
           <div id="release">
           <h:outputText value="#{ares_messages.filter_release}: " />
           <h:selectOneMenu value="#{releaseSelector.selectedReleaseNumber}">
           <f:selectItems value="#{releaseSelector.releaseItems}" />
           </h:selectOneMenu>
           </div>
          
           <div id="searchForm" style="display: #{empty searchTestaction.foundTestactions ? 'block' : 'none'};">
          
          ....
          
          
          <t:dataTable var="testaction_var"
           value="#{foundTestactions}"
           id="foundTestactionsTable"
           renderedIfEmpty="false"
           sortColumn="#{searchTestaction.sortColumn}"
           sortAscending="#{searchTestaction.ascending}"
           preserveSort="true"
           rows="20">
           <f:facet name="header">
           <h:outputText value="#{ares_messages.label_ResultCount}: #{foundTestactions.rowCount}" />
           </f:facet>


          This ocde adresses the first problem I mentioned. The second problem occurs here:

          Bean:
          @Stateful
          @Scope(ScopeType.SESSION)
          @LoggedIn
          @Name("testactionValidator")
          public class TestactionValidatorAction extends TestactionHandling implements Serializable, TestactionValidator {
           @In(required=false)
           private Release selectedRelease;
          
           @In(required=false)
           private User selectedUser;
          
           private Long lastSelectedReleaseID;
           private String lastSelectedUserID;
          
           @Factory("testactionsForValidator")
           public void initTestactions() {
           if(hasAFilterChanged() || shouldRefresh() || testactions == null) {
           StringBuffer filter = new StringBuffer();
           if(selectedRelease != null) {
           filter.append(" and TACT_REL_ID=");
           filter.append(selectedRelease.getID());
           }
           testactions = EMHelper.execQuery(em.createQuery(
           "from Testaction where TACT_VALIDATOR_USR_ID=:validator and " +
           "TACT_BFV_ID=" + BugfixValidation.Constants.TO_VALIDATE.value() + " and " +
           "TACT_REV_ID!=" + Revisionclass.Constants.TO_BUGFIX.value() +
           filter.toString() +
           " order by TACT_ID asc"
           ).setParameter("validator", user.getIsAdmin().equals(new Integer(-1)) ? selectedUser.getID() : user.getID()));
          
           lastSelectedReleaseID = (selectedRelease == null) ? null : selectedRelease.getID();
           lastSelectedUserID = (selectedUser == null) ? null : selectedUser.getID();
           }
           Collections.sort(testactions, new TestactionComparator(column, ascending));
           }
          
           @DataModel(scope=ScopeType.PAGE)
           public List<Testaction> getTestactionsForValidator() {
           initTestactions();
           return testactions;
           }


          And the page:
          <t:dataTable var="testaction_var" value="#{testactionsForValidator}"
           renderedIfEmpty="false" sortColumn="#{testactionValidator.column}"
           sortAscending="#{testactionValidator.ascending}" preserveSort="true">
           <f:facet name="header">
           <h:outputText value="#{ares_messages.label_ResultCount}: #{testactionsForValidator.rowCount}" />
           </f:facet>
           <h:column>
           <f:facet name="header">
           <t:commandSortHeader columnName="id">
           <h:outputText value="#{ares_messages.label_testaction_ID}" />
           </t:commandSortHeader>
           </f:facet>
           <h:commandLink value="#{testaction_var.ID}"
           action="#{testactionValidator.select}" styleClass="rightAlignment" />
           </h:column>


          The members "column" and "ascending" are defined in the superclass (with getters and setters). Perhaps that's is the problem?