3 Replies Latest reply on Apr 25, 2007 10:14 AM by aviking

    Reqest error, status : 500 Internal Server Error Messages: u

      Hello everybody,

      I have this problem:
      an alert having this message:
      "Reqest error, status : 500 Internal Server Error Messages: undefined"

      when I use:

      JSP:

      <h:form >
      <h:inputText value="#{loginBean.userName}" id="suggest"/>
      <rich:suggestionbox
      width="50" height="60"
      for="suggest"
      suggestionAction="#{loginBean.autocomplete}"
      var="result"
      fetchValue="#{result.text}">
      <h:column>
      <h:outputText value="#{result.text}"/>
      </h:column>
      </rich:suggestionbox>
      </h:form>

      Class:

      LoginBean{

      ...

      public List autocomplete(Object event) {
      String pref = event.toString();
      //collecting some data that begins with "pref" letters.
      List result = findAllCountries(pref);

      return result;
      }

      public List findAllCountries(String pref) {
      Query queryObject= null;
      try {
      String queryString = "select country_name from countries where country_name like '"+pref+"%'";
      queryObject = getSession().createSQLQuery(queryString);
      } catch (RuntimeException re) {
      throw re;
      }

      return queryObject.list();
      }


      ....
      }



      I need help plsss,
      Thx a lot,
      A

        • 1. Re: Reqest error, status : 500 Internal Server Error Message

          Take a look at server log. It should be exception there.

          • 2. Re: Reqest error, status : 500 Internal Server Error Message

            That is the real error:

            25 apr 2007 17:00:40,718 [ERROR] {RendererUtils.java:264, getStringValue} Property not found - called by component : {Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /mwCustomerResearch.jsp][Class: javax.faces.component.html.HtmlForm,Id: customerResearch][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id0][Class: org.richfaces.component.html.HtmlSuggestionBox,Id: _id1][Class: javax.faces.component.UIColumn,Id: _id2][Class: javax.faces.component.html.HtmlOutputText,Id: _id3]}
            25 apr 2007 17:00:41,468 [ERROR] {StandardWrapperValve.java:253, invoke} Servlet.service() for servlet Faces Servlet threw exception
            javax.faces.el.PropertyNotFoundException: Bean: java.lang.String, property: text
            at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:445)
            at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:416)

            ...

            BUT WHY???!!!

            • 3. Re: Reqest error, status : 500 Internal Server Error Message

              Sorry in this moment the suggust is look like that:

              <f:view>

              <h:form id="customerResearch">
              <h:panelGrid columns="3" border="1" style="border: 1px solid black;">

              <h:inputText value="#{customerResearch.country}" id="suggest"/>
              <rich:suggestionbox for="suggest"
              width="100"
              height="100"
              suggestionAction="#{customerResearchBK.autocomplete}"
              var="suggest">
              <h:column>
              <h:outputText value="#{suggest.text}"/>
              </h:column>
              </rich:suggestionbox>

              </h:panelGrid>
              </h:form>

              </f:view>

              WIDTH:

              public class CustomerResearchBkBean extends BaseHibernateDAO{

              public List autocomplete(Object event) {
              String pref = event.toString();
              //collecting some data that begins with "pref" letters.
              List result = findAllCountries(pref);

              return result;
              }

              public List findAllCountries(String pref) {
              Query queryObject= null;
              try {
              String queryString = "select country_name from countries where country_name like '"+pref+"%'";
              queryObject = getSession().createSQLQuery(queryString);
              } catch (RuntimeException re) {
              throw re;
              }

              return queryObject.list();
              }
              }

              AND


              public class CustomerResearchBean {
              private String country;

              public String getCountry() {
              return country;
              }

              public void setCountry(String country) {
              this.country = country;
              }

              }


              WEB.XML
              ...

              <context-param>
              <param-name>org.ajax4jsf.SKIN</param-name>
              <param-value>blueSky</param-value>
              </context-param>

              <display-name>Ajax4jsf Filter</display-name>
              <filter-name>ajax4jsf</filter-name>
              <filter-class>org.ajax4jsf.Filter</filter-class>

              <filter-mapping>
              <filter-name>ajax4jsf</filter-name>
              <servlet-name>Faces Servlet</servlet-name>
              REQUEST
              FORWARD
              INCLUDE
              </filter-mapping>
              ...