1 Reply Latest reply on Jan 8, 2009 2:21 PM by ben abdallah Firas

    Error using POJO Seam

    Allan Bruno Newbie

      Here we go again....


      Well, i finish my configuration with Seam with Glassfish and ICEFaces, but I'm using POJO Seam instead EJB. When a click on button too see a simple message Hello world don't work.



      ActionBean.java

      @Name ("teste")
      @Scope (ScopeType.APPLICATION)
      public class ActionBean implements ActionLocal {
      
      public ActionBean() {
      }
      public void sayHello() {
              
      System.out.println("Hello World");
      
      }
      }
      
      





      index.xhtml

      < f:view>
              < h:form>
              < h:commandButton action="#{teste.sayHello}" value="Clique" />
              < /h:form >
      < /f:view >
      



      I got:


      WARNING: executePhase(INVOKE_APPLICATION 5,com.icesoft.faces.context.BridgeFacesContext@2add4e) threw exception
      javax.faces.FacesException: #{teste.sayHello}: javax.el.PropertyNotFoundException: /index.xhtml @30,65 action="#{teste.sayHello}": Target Unreachable, identifier 'teste' resolved to null
              at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:105)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
              at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17)
              at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:94)
              at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:54)
              at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:26)
              at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
              at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
              at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:38)
              at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
              at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
              at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:55)
              at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:19)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
              at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
              at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
              at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
              at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
              at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
              at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
              at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
              at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
              at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
              at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
              at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
              at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
              at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
              at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
              at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
              at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
      Caused by: javax.faces.FacesException: #{teste.sayHello}: javax.el.PropertyNotFoundException: /index.xhtml @30,65 action="#{teste.sayHello}": Target Unreachable, identifier 'teste' resolved to null
              at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
              at javax.faces.component.UICommand.broadcast(UICommand.java:383)
              at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
              at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
              at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
              ... 57 more
      Caused by: javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: /index.xhtml @30,65 action="#{teste.sayHello}": Target Unreachable, identifier 'teste' resolved to null
              at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:84)
              at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
              ... 61 more
      Caused by: javax.el.PropertyNotFoundException: /index.xhtml @30,65 action="#{teste.sayHello}": Target Unreachable, identifier 'teste' resolved to null
              at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:70)
              at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
              ... 62 more
      



      Is missing something in my configuration files? I know that is possible and easy work with POJO Seam...


      Thanks!