5 Replies Latest reply on Jan 13, 2010 3:42 AM by Ilya Shaikovsky

    rich:ajaxValidator raise PropertyNotFoundException

    Hashem Niknezhad Newbie

      My project is similar to seam hotel booking example.

      I try to use rich:ajaxValidator in my pages but the result is:

       

      Jan 11, 2010 2:36:56 PM com.sun.faces.lifecycle.ProcessValidationsPhase execute
      WARNING: javax.el.PropertyNotFoundException: /form/myView.xhtml @54,76 value="#{MyAction.tel}": Target Unreachable, identifier MyAction' resolved to null
      javax.faces.FacesException: javax.el.PropertyNotFoundException: /form/myView.xhtml @54,76 value="#{MyAction.tel}": Target Unreachable, identifier 'MyAction' resolved to null
              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:725)
              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
              at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:239)
              at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:458)
              at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
              at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
              at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
              at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
              at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
              at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              at org.jboss.seam.web.RewriteFilter.doFilter(RewriteFilter.java:63)
              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.web.MultipartFilter.doFilter(MultipartFilter.java:90)
              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.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
              at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
              at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
              at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
              at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
              at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
              at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
              at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
      Caused by: javax.el.PropertyNotFoundException: /form/myView.xhtml @54,76 value="#{MyAction.tel}": Target Unreachable, identifier 'MyAction' resolved to null
              at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
              at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:92)
              at javax.faces.component.UIInput.getConvertedValue(UIInput.java:942)
              at javax.faces.component.UIInput.validate(UIInput.java:868)
              at javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
              at javax.faces.component.UIInput.processValidators(UIInput.java:672)
              at org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:442)
              at org.ajax4jsf.component.ContextCallbackWrapper.invokeContextCallback(ContextCallbackWrapper.java:44)
              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:722)
              ... 47 more
      Jan 11, 2010 2:36:56 PM com.sun.faces.lifecycle.Phase doPhase
      SEVERE: JSF1054: (Phase ID: PROCESS_VALIDATIONS 3, View ID: /form/myView.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@429f914]
      <Jan 11, 2010 2:36:56 PM IRST> <Error> <HTTP> <BEA-101017> <[ServletContext@34066304[app:myApp_ear module:/ path: spec-version:2.5]] Root cause of ServletException.
      javax.faces.FacesException: javax.el.PropertyNotFoundException: /form/myView.xhtml @54,76 value="#{MyAction.tel}": Target Unreachable, identifier 'MyAction' resolved to null
              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:725)
              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
              at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
              at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:731)
              Truncated. see log file for complete stacktrace

      Caused By: javax.el.PropertyNotFoundException: /form/myView.xhtml @54,76 value="#{MyAction.tel}": Target Unreachable, identifier 'MyAction' resolved to null
              at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.java:62)
              at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:92)
              at javax.faces.component.UIInput.getConvertedValue(UIInput.java:942)
              at javax.faces.component.UIInput.validate(UIInput.java:868)
              at javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
              Truncated. see log file for complete stacktrace
      >

       

       

      myView.xhtml

      !DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition 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:c="http://java.sun.com/jstl/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:a4j="http://richfaces.org/a4j"
      template="/template.xhtml">
      <ui:define name="content">
      <!--<f:view>-->
      <!--<s:validateAll>-->
      <table border="0" width="100%">
      <tr >
      <td >
      <h:outputText value="#{messages['Title']}"/>
      </td>
      </tr>
      <!--- ************************************* Form Data *********************************** -->
      <tr>
      <td>
      <h:messages styleClass="ErrorMessage" globalOnly="true"/>
      <table>
      <tr>

      <td align="left" nowrap="nowrap">
      <h:outputLabel value="#{messages['TelNumber']}:" for="number"
      styleClass="NormalBlackTextForLable"/>
      </td>
      <td align="right" nowrap="nowrap">
      <h:inputText id="number" maxlength="10" required="true"
      value="#{MyAction.telNumber}">
      <rich:ajaxValidator event="onblur"/>
      </h:inputText>
      </td>
      <td>
      <rich:message for="number" styleClass="ErrorMessage"/>
      </td>
      </tr>
      </table>
      </td>
      </tr>
      <!--- *************************************CommandButton*********************************** -->
      <tr>
      <td colspan="2">
      <table border="0" cellspacing="3" cellpadding="5" align="center">
      <tr>
      <td>
      </td>
      <td colspan="3">
      <h:commandButton styleClass="Key"action="#{MyAction.find}"
      value="#{messages.Run}">
      <s:defaultAction/>
      </h:commandButton>
      </td>
      </tr>
      </table>
      </td>
      </tr>
      <!--- ************************************ dataTable1 ********************************* -->
      ...........
      </table>
      </ui:define>
      </ui:composition>

       

       


      MyAction.java

      @Stateful
      @Name("AmarPardakhthaReport")
      @Scope(ScopeType.CONVERSATION)
      @Restrict("#{identity.loggedIn}")
      @TransactionAttribute(TransactionAttributeType.REQUIRED)
      public class MyAction implements myInterface{

          private String telNumber;

        public MyAction() {
              if (!Conversation.instance().isLongRunning()) Conversation.instance().begin();
          }
              public String getTelNumber() {
              return telNumber;
          }

          public void setTelNumber(String telNumber) {
              this.telNumber = telNumber;
          }
         
          public String find() {
           return "";
          }
         
          @Destroy
          @Remove
          public void destroy() {
          }
      }

       


      can you help me ?