2010-01-06 49 views
0

我正在使用ColdFusion 9,創建一個真實集合名稱'shopColl'。我創建了一個任務計劃來調用一個CFM文件,以每5分鐘對該集合進行索引。如何處理error.VCollectionNotAvailableException:打開後收集下來。 (10)在ColdFusion中?

,但我發現這個錯誤,當我嘗試刷新索引集合:

An error occurred while performing an operation in the Search Engine library.; DETAIL:The collection is not available.: com.verity.coll.VCollectionNotAvailableException: Collection down after opening. (10) 

你能幫助我如何解決這個問題?這個過程在今晚之前似乎是正確的。

以下代碼位於任務計劃將在例程中調用的CFM文件中。

<cfprocessingdirective suppresswhitespace="true"> 

<cftry> 
    <!--- pull the content ---> 
    <cfquery datasource="shop" name="shop.getContent"> 
     SELECT * 
     FROM shop 
    </cfquery> 


    <!--- update collection ---> 
    <cflock name="cfindex_lock" type="exclusive" timeout="30"> 

    <cfindex collection="shopColl" 
      action="refresh" 
      type="custom" 
      query="shop.getContent" 
      key="id" 
      title="title" 
      body="title,description" > 

    </cflock> 

    <!--- Log information about document change ---> 
    <cflog file="updateStatus" application="No" 
     type="information" 
     text="MESSAGE: Eso shop collection updated; TIME: #now()#"> 


    <cfreturn true /> 

<cfcatch type="any"> 
    <!--- Log information about error ---> 
    <cflog file="updateStatus" application="No" 
     type="error" 
     text="MESSAGE: error in updating index -- #cfcatch.message#; DETAIL:#cfcatch.detail# TIME: #now()#"> 
    <cfreturn false /> 
</cfcatch> 
</cftry> 
</cfprocessingdirective> 

回答

1

嘗試的是一個任務,看看需要多長時間之外運行它。如果花費時間超過5分鐘,則可能會與計劃任務發生死鎖。

+0

嗨,jarofclay。我試圖直接使用瀏覽器運行CFM,但ColdFusion仍然記錄相同的錯誤。你能給我更多的建議嗎? – Teerasej 2010-01-07 02:53:42

+0

請關閉計劃的任務所以當你在運行腳本再次測試 -Restart的Verity的服務 - 嘗試(未如期)不運行並記下時間 如果仍然給你同樣的錯誤,請嘗試使用k2 \ _nti40 \ bin目錄中的可執行文件運行修復程序: 「mkvdk.exe -collection -repair」 – jarofclay 2010-01-07 13:42:44

相關問題