OFBiz
  1. OFBiz
  2. OFBIZ-4712

GenericModelException in product search when there is no valid keyword in the query string

    Details

      Description

      Below is the relevant log:

      2012-02-22 16:34:57,343 (http-0.0.0.0-18080-2) [ KeywordSearchUtil.java:235:INFO ] Expanded keyword [and], got set: []
      2012-02-22 16:34:57,344 (http-0.0.0.0-18080-2) [ ProductSearch.java:271:INFO ] Finished initial setup of keywords, doingBothAndOr=false, andKeywordFixedSet={}
      keywordFixedOrSetAndList={}
      2012-02-22 16:34:57,345 (http-0.0.0.0-18080-2) [ ProductSearch.java:622:INFO ] topCond=((pcm1ThruDate IS NULL OR pcm1ThruDate > '2012-02-22 16:34:57.331') AND pcm1FromDate < '2012-02-22 16:34:57.331' AND pcm1ProductCategoryId IN ('CATALOG1_SEARCH'))
      2012-02-22 16:34:57,350 (http-0.0.0.0-18080-2) [ ProductSearch.java:652:ERROR]
      ---- exception report ----------------------------------------------------------
      Error in product search
      Exception: org.ofbiz.entity.GenericModelException
      Message: In selectListIteratorByCondition invalid field names specified:

      {totalRelevancy}
      ---- stack trace ---------------------------------------------------------------
      org.ofbiz.entity.GenericModelException: In selectListIteratorByCondition invalid field names specified: {totalRelevancy}

      org.ofbiz.entity.datasource.GenericDAO.selectListIteratorByCondition(GenericDAO.java:663)
      org.ofbiz.entity.datasource.GenericHelperDAO.findListIteratorByCondition(GenericHelperDAO.java:139)
      org.ofbiz.entity.GenericDelegator.findListIteratorByCondition(GenericDelegator.java:1806)
      org.ofbiz.product.product.ProductSearch$ProductSearchContext.doQuery(ProductSearch.java:650)
      org.ofbiz.product.product.ProductSearch$ProductSearchContext.doSearch(ProductSearch.java:223)
      org.ofbiz.product.product.ProductSearchSession.getProductSearchResult(ProductSearchSession.java:959)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:616)
      org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
      org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:148)
      org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:88)
      org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
      org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:132)
      KeywordSearch.run(KeywordSearch.groovy:35)
      org.ofbiz.widget.ModelWidgetAction$Script.runAction(ModelWidgetAction.java:416)
      org.ofbiz.widget.ModelWidgetAction.runSubActions(ModelWidgetAction.java:117)
      org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:184)
      org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:396)
      org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135)
      org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97)
      org.ofbiz.widget.screen.MacroScreenViewHandler.render(MacroScreenViewHandler.java:104)
      org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:847)
      org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:564)
      org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:224)
      org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:87)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:339)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      java.lang.Thread.run(Thread.java:636)
      --------------------------------------------------------------------------------

      2012-02-22 16:34:57,351 (http-0.0.0.0-18080-2) [ ProductSearch.java:662:WARN ] The eli is null, returning zero results

        Activity

        Hide
        Atul Vani added a comment -

        Patch attached for a possible fix. However, with this patch the search api will start to return all of the products as search result in such cases.

        Show
        Atul Vani added a comment - Patch attached for a possible fix. However, with this patch the search api will start to return all of the products as search result in such cases.
        Hide
        Anil K Patel added a comment -

        Atul, Applied to trunk and 11.04.
        Thanks.

        Show
        Anil K Patel added a comment - Atul, Applied to trunk and 11.04. Thanks.

          People

          • Assignee:
            Anil K Patel
            Reporter:
            Atul Vani
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development