2 Replies Latest reply on Feb 5, 2008 7:48 PM by rajesha Indurthi

    Implementing suggestion box in my jsf application

    rajesha Indurthi Newbie

      Iam getting the following error while implementing the suggestion box in my jsf application :

      WebApp E [Servlet Error]-[Faces Servlet]: java.lang.NullPointerException
      at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseBlock.parse(ParserImpl.java:2362)
      at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseTag(ParserImpl.java:224)
      at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseRowGroup.parse(ParserImpl.java:2830)
      at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseTag(ParserImpl.java:224)
      at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseTableTag.parse(ParserImpl.java:2650)
      at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseTag(ParserImpl.java:224)
      at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseBlock.parse(ParserImpl.java:2488)
      at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseTag(ParserImpl.java:224)
      at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseBody.parse(ParserImpl.java:999)
      at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseTag(ParserImpl.java:224)
      at org.ajax4jsf.org.w3c.tidy.ParserImpl$ParseHTML.parse(ParserImpl.java:507)
      at org.ajax4jsf.org.w3c.tidy.ParserImpl.parseDocument(ParserImpl.java:3430)
      at org.ajax4jsf.org.w3c.tidy.Tidy.parse(Tidy.java:384)
      at org.ajax4jsf.org.w3c.tidy.Tidy.parse(Tidy.java:282)
      at org.ajax4jsf.org.w3c.tidy.Tidy.parseDOM(Tidy.java:625)
      at org.ajax4jsf.framework.ajax.xmlfilter.tidy.TidyParser.parseHtmlByTidy(TidyParser.java:98)
      at org.ajax4jsf.framework.ajax.xmlfilter.tidy.TidyParser.parseHtml(TidyParser.java:203)
      at org.ajax4jsf.framework.ajax.xmlfilter.FilterServletResponseWrapper.parseContent(FilterServletResponseWrapper.java:607)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:212)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
      at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
      at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
      at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
      at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
      at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)


      My jsf page code is as shown below :
      <h:inputText value="#{oneLineSearchBean.searchText}" styleClass="textEntry" tabindex="1" size="60" maxlength="800" id="inputText" />
      <rich:suggestionbox for="inputText" suggestionAction ="#{oneLineSearchBean.buildAutoComplete}" var="result" width="300" height="400">
      <h:column>
      <h:outputText value="#{result.query}"/>
      </h:column>
      </rich:suggestionbox>
      and my Action methos is ashown below:

      public List buildAutoComplete(Object event)
      {
      System.out.println("Iam in buildAutoComplete");
      String pref = event.toString();
      System.out.println("the prefix is :"+pref);
      List searchQueryList = new ArrayList();
      SearchQueryObject obj1 = new SearchQueryObject();
      obj1.setQueryName("statequery");
      obj1.setQuery("hitter:i*");
      SearchQueryObject obj2 = new SearchQueryObject();
      obj2.setQuery("hit:1");
      obj2.setQueryName("hit");
      searchQueryList.add(obj1);
      searchQueryList.add(obj2);
      SearchQueryObject obj = (SearchQueryObject)searchQueryList.get(0);
      System.out.println(obj.getQuery());

      return searchQueryList;
      }

      I have corrected the signature of my action class as prompted in the previous thread of mine , but ow Iam getting this exception . what might be happening here..
      any help wpuld be appreciated
      Thanks in advance