OFBiz
  1. OFBiz
  2. OFBIZ-4752

Error in Content > CMS click Find

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Not A Problem
    • Affects Version/s: Trunk
    • Fix Version/s: Trunk
    • Component/s: content
    • Labels:
      None
    • Environment:

      demo-trunk

      Description

      To reproduce:
      In Content Manager (https://demo-trunk.ofbiz.apache.org/content/control/CMSContentFind)
      select CMS then click "Find" button located above the title "CMS Content Find"

      Expected: ?

      Actual: Error message
      org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen component://content/widget/cms/CMSScreens.xml#AdminSearch: java.lang.IllegalArgumentException: Error running script at location [component://content/webapp/content/WEB-INF/actions/cms/Search.groovy]: javax.script.ScriptException: org.apache.lucene.index.IndexNotFoundException: no segments* file found in org.apache.lucene.store.MMapDirectory@/home/ofbiz/trunk/applications/content/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@4bbbf4ee: files: [indexhere.txt] (Error running script at location [component://content/webapp/content/WEB-INF/actions/cms/Search.groovy]: javax.script.ScriptException: org.apache.lucene.index.IndexNotFoundException: no segments* file found in org.apache.lucene.store.MMapDirectory@/home/ofbiz/trunk/applications/content/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@4bbbf4ee: files: [indexhere.txt])

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        132d 18h 23m 1 Sascha Rodekamp 02/Aug/12 14:18
        Hide
        Tom Burns added a comment -

        Sascha,

        I am sorry but I did not see your prior post on this issue so I'm a bit late with a response.

        I think there is still an issue here.
        In the FE the "indexTree" service is invoked from the index tab where there are two options:
        1. AdminIndex and 2. AdminIndexAll.

        1. AdminIndex does nothing even though the label says "Content ids to index (separate ids with a space)" (fooled you again user)!
        The controller only refreshes the view when with target="AdminIndex", form code follows.
        <form name="AdminIndex" target="AdminIndex" title="" type="single" header-row-style="header-row" default-table-style="basic-table">
        <field name="indexContentIds" position="1"><text size="50"/></field>
        <field name="submitButton" title="$

        {uiLabelMap.ContentIndexEnteredIds}

        " widget-style="smallSubmit" position="2"><submit button-type="button"/></field>
        </form>

        2. AdminIndexAll runs the "indexTree" service but generates an error when sent the default value WebStoreCONTENT (see screen shot). You no longer get an error when you click the Find button in the Find tab but you do not get any data either.

        OOB the Find tab could handle the OOB case of no index more gracefully (present a meaningful message) and I would expect that the default value in the Index tab would result in some records being returned in find.

        Also in the Find tab the drop-down list Select Category is empty - what's that about?

        Tom

        Show
        Tom Burns added a comment - Sascha, I am sorry but I did not see your prior post on this issue so I'm a bit late with a response. I think there is still an issue here. In the FE the "indexTree" service is invoked from the index tab where there are two options: 1. AdminIndex and 2. AdminIndexAll. 1. AdminIndex does nothing even though the label says "Content ids to index (separate ids with a space)" (fooled you again user)! The controller only refreshes the view when with target="AdminIndex", form code follows. <form name="AdminIndex" target="AdminIndex" title="" type="single" header-row-style="header-row" default-table-style="basic-table"> <field name="indexContentIds" position="1"><text size="50"/></field> <field name="submitButton" title="$ {uiLabelMap.ContentIndexEnteredIds} " widget-style="smallSubmit" position="2"><submit button-type="button"/></field> </form> 2. AdminIndexAll runs the "indexTree" service but generates an error when sent the default value WebStoreCONTENT (see screen shot). You no longer get an error when you click the Find button in the Find tab but you do not get any data either. OOB the Find tab could handle the OOB case of no index more gracefully (present a meaningful message) and I would expect that the default value in the Index tab would result in some records being returned in find. Also in the Find tab the drop-down list Select Category is empty - what's that about? Tom
        Tom Burns made changes -
        Attachment index_error.jpg [ 12538913 ]
        Sascha Rodekamp made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s SVN trunk [ 12311928 ]
        Resolution Not A Problem [ 8 ]
        Hide
        Sascha Rodekamp added a comment -

        Will close this issue now. If this error occurs again we can reopen it.

        Show
        Sascha Rodekamp added a comment - Will close this issue now. If this error occurs again we can reopen it.
        Sascha Rodekamp made changes -
        Field Original Value New Value
        Assignee Sascha Rodekamp [ sascha ]
        Hide
        Sascha Rodekamp added a comment -

        Hi Tom,
        seems that you hadn't create your search index.

        javax.script.ScriptException: org.apache.lucene.index.IndexNotFoundException: no segments* file found in org.apache.lucene.store.MMapDirectory@/home/ofbiz/trunk/applications/content/index 
        

        Go to WebTools -> Run Service and run the "indexTree" service. After creating the index the search should work.

        Let me now if this work for you.

        Have a good day
        Sascha

        Show
        Sascha Rodekamp added a comment - Hi Tom, seems that you hadn't create your search index. javax.script.ScriptException: org.apache.lucene.index.IndexNotFoundException: no segments* file found in org.apache.lucene.store.MMapDirectory@/home/ofbiz/trunk/applications/content/index Go to WebTools -> Run Service and run the "indexTree" service. After creating the index the search should work. Let me now if this work for you. Have a good day Sascha
        Tom Burns created issue -

          People

          • Assignee:
            Sascha Rodekamp
            Reporter:
            Tom Burns
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development