4 Replies Latest reply on Dec 21, 2006 11:23 AM by Fredrik Forsberg

    problem using the pages.xml to call action method?

    Fredrik Forsberg Newbie

      Hello all.

      I am having problem using the action attribute in the page element in the file pages.xml.
      I have a view-file which has a form and a datatable element.
      I want to populate this datatable with data from a seam component when the user loads the page, not in the response of the form submit.

      I have defined a method initAllMessages that populates my list (my list has @Out @DataModel) with data
      and I use that list in the datatable

      <h:dataTable value="#{allMessages}" var="message">
       <h:column>
       <h:outputText value="#{message.text}" />
       </h:column>
      </h:dataTable>



      I instruct seam to call the initAllData with the action parameter
      in a page element in pages.xml like this:

      <pages>
       <page view-id="/input.jsp" action="#{post.initAllMessages}" />
      </pages>




      The problem is that I get an exception:

      2006-12-21 10:42:39,640 ERROR [org.jboss.portal.portlet.container.org_apache_myfaces_portlet_MyFacesGenericPortlet] The portlet threw an exception
      javax.faces.el.EvaluationException: Exception while invoking expression #{post.initAllMessages}


      The class in where I define my method to call implements an interface, has conversation scope and the Name annotation. The method it self has the @Create annotation
      The seam view-file is loaded in a portlet contained in JBoss Portal.


      Why am I getting this exception when seam tries to call the method?
      Is there better/another way to populate data in a datatable on a non-faces get request?

      thank you.

        • 1. Re: problem using the pages.xml to call action method?
          Pete Muir Master

          Having @Out @Datamodel on the same variable is a BAD idea - you're outjecting two different things to the same context variable. Just use @DataModel.

          The most common way of populating data is via @Factory.

          It's impossible to tell the problem from that little bit of a stack trace, you need to post the whole thing.

          • 2. Re: problem using the pages.xml to call action method?
            Fredrik Forsberg Newbie

            This is the complete stack trace.
            In the middle it says:

            Caused by: org.jboss.seam.RequiredException: In attribute requires value for component: post.message

            That might be a clue..?


            2006-12-21 16:44:37,562 ERROR [org.jboss.portal.portlet.container.org_apache_myfaces_portlet_MyFacesGenericPortlet] The portlet threw an exception
            javax.faces.el.EvaluationException: Exception while invoking expression #{post.initAllMessages}
            at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
            at org.jboss.seam.core.Pages.callAction(Pages.java:161)
            at org.jboss.seam.core.Pages.callAction(Pages.java:143)
            at org.jboss.seam.jsf.AbstractSeamPhaseListener.callPageActions(AbstractSeamPhaseListener.java:128)
            at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:98)
            at org.jboss.seam.jsf.SeamPortletPhaseListener.beforePhase(SeamPortletPhaseListener.java:52)
            at org.jboss.seam.jsf.SeamExtendedManagedPersistencePortletPhaseListener.beforePhase(SeamExtendedManagedPersistencePortletPhaseListener.java:37)
            at org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersBefore(LifecycleImpl.java:520)
            at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:342)
            at org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:323)
            at org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:298)
            at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:380)
            at org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:266)
            at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133)
            at javax.portlet.GenericPortlet.render(GenericPortlet.java:306)
            at org.jboss.portal.portlet.container.PortletContainer.invokeRender(PortletContainer.java:516)
            at org.jboss.portal.portlet.container.PortletContainer.dispatch(PortletContainer.java:438)
            at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(PortletContainerInvoker.java:73)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:134)
            at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:85)
            at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
            at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
            at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:101)
            at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
            at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invokeNotSupported(TransactionInterceptor.java)
            at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.portlet.HeaderInterceptor.invoke(HeaderInterceptor.java:50)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor.invoke(ProducerCacheInterceptor.java:51)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.portlet.aspects.portlet.ModesInterceptor.invoke(ModesInterceptor.java:60)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:46)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor.invoke(WindowStatesInterceptor.java:55)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor.invoke(PortletSessionSynchronizationInterceptor.java:78)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.portlet.aspects.portlet.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:46)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$InvokeNextCommand.execute(ContextDispatcherInterceptor.java:148)
            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.jboss.portal.server.servlet.CommandServlet.doGet(CommandServlet.java:99)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
            at org.jboss.portal.portlet.impl.spi.AbstractRequestContext.include(AbstractRequestContext.java:189)
            at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$1.include(ContextDispatcherInterceptor.java:70)
            at org.jboss.portal.server.servlet.CommandServlet.include(CommandServlet.java:79)
            at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:76)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:65)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.portlet.aspects.portlet.ValveInterceptor.invoke(ValveInterceptor.java:59)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:160)
            at org.jboss.portal.portlet.container.PortletContainerInvoker.invoke(PortletContainerInvoker.java:139)
            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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            at $Proxy58.invoke(Unknown Source)
            at org.jboss.portal.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:238)
            at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker.org$jboss$portal$core$impl$portlet$state$ProducerPortletInvoker$invoke$aop(ProducerPortletInvoker.java:53)
            at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
            at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
            at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
            at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
            at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java)
            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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            at $Proxy62.invoke(Unknown Source)
            at org.jboss.portal.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:157)
            at org.jboss.portal.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:161)
            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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
            at $Proxy39.invoke(Unknown Source)
            at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer$1.invoke(PersistentInstanceContainer.java:116)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:134)
            at org.jboss.portal.portlet.aspects.portlet.PortalSessionSynchronizationInterceptor.invoke(PortalSessionSynchronizationInterceptor.java:87)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.model.instance.InstanceSecurityInterceptor.invoke(InstanceSecurityInterceptor.java:78)
            at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:160)
            at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer.org$jboss$portal$core$impl$model$instance$PersistentInstanceContainer$invoke$aop(PersistentInstanceContainer.java:390)
            at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer$invoke_N8654503705355129869.invokeNext(PersistentInstanceContainer$invoke_N8654503705355129869.java)
            at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
            at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
            at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer$invoke_N8654503705355129869.invokeNext(PersistentInstanceContainer$invoke_N8654503705355129869.java)
            at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer.invoke(PersistentInstanceContainer.java)
            at org.jboss.portal.core.impl.model.instance.InstanceImpl.invoke(InstanceImpl.java:248)
            at org.jboss.portal.core.controller.command.RenderWindowCommand.execute(RenderWindowCommand.java:95)
            at org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.java:68)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:134)
            at org.jboss.portal.core.aspects.controller.WindowCacheInterceptor.invoke(WindowCacheInterceptor.java:86)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:183)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:44)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:82)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.controller.PageNavigationInterceptor.invoke(PageNavigationInterceptor.java:107)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:68)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:56)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:160)
            at org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:85)
            at org.jboss.portal.core.controller.command.RenderPageCommand.renderPortletWindow(RenderPageCommand.java:398)
            at org.jboss.portal.core.controller.command.RenderPageCommand.renderFragments(RenderPageCommand.java:296)
            at org.jboss.portal.core.controller.command.RenderPageCommand.execute(RenderPageCommand.java:240)
            at org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.java:68)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:134)
            at org.jboss.portal.core.aspects.controller.WindowCacheInterceptor.invoke(WindowCacheInterceptor.java:138)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:183)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:44)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:82)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.controller.PageNavigationInterceptor.invoke(PageNavigationInterceptor.java:107)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:68)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:56)
            at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:160)
            at org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:85)
            at org.jboss.portal.core.controller.CoreController.handle(CoreController.java:192)
            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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
            at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:287)
            at $Proxy251.handle(Unknown Source)
            at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:134)
            at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:67)
            at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:73)
            at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:175)
            at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.server.aspects.server.SessionInvalidatorInterceptor.invoke(SessionInvalidatorInterceptor.java:85)
            at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49)
            at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
            at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
            at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:275)
            at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
            at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
            at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
            at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:118)
            at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:160)
            at org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:379)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
            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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
            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.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: org.jboss.seam.RequiredException: In attribute requires value for component: post.message
            at org.jboss.seam.Component.getInstanceToInject(Component.java:1382)
            at org.jboss.seam.Component.injectFields(Component.java:1024)
            at org.jboss.seam.Component.inject(Component.java:795)
            at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:30)
            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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
            at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:82)
            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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
            at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:60)
            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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
            at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            at org.jboss.seam.interceptors.TransactionInterceptor.doInTransactionIfNecessary(TransactionInterceptor.java:34)
            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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
            at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
            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.jboss.seam.util.Reflections.invoke(Reflections.java:13)
            at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:90)
            at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
            at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:73)
            at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
            at org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51)
            at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39)
            at org.jboss.seam.example.hibernate.PostAction$$EnhancerByCGLIB$$b985f54d.initAllMessages()
            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.MethodBindingImpl.invoke(MethodBindingImpl.java:129)






            This is my action class:

            @Name("post")
            @Scope(CONVERSATION)
            public class PostAction implements Post{
             Logger logger = Logger.getLogger(getClass().getName());
             private PostService ps = new PostService();
            
             @In @Out
             private Message message;
            
             @In(create=true)
             private transient FacesMessages facesMessages;
            
             @Create
             public void initAllMessages() {
             allMessages.add(new Message("hej din toker"));
             allMessages.add(new Message("sweet ride"));
             allMessages.add(new Message("cool page man!"));
             }
            
             @DataModel("allMessages")
             private List<Message> allMessages = new ArrayList<Message>();
            
             public String sayHello(){
             logger.info("\"" + message.getText() + "\"");
             try{
             ps.postMessage(message);
             }catch(UnfriendlyMessageException e){
             e.tellError();
             facesMessages.add("The message was rude. Behave, goddamit!");
             }
            
             return "recieved";
             }
             @Remove
             public void remove(){}
            }


            Can you see any obvious flaws in my code?


            • 3. Re: problem using the pages.xml to call action method?
              Pete Muir Master

              Yes. You've specified that message must be injected and outjected (i.e. not null on both injection and outjection). It is null. use required=false

              • 4. Re: problem using the pages.xml to call action method?
                Fredrik Forsberg Newbie

                That did "susen" (as we say in sweden) ie: It works.
                Thanks!!