I am trying to fetch a resultset using ecm/model/SearchQuery JS object. If I issue a search using "Select * From Document", my code works just fine. But if modify it to use "Select DocumentTitle From Document ORDER BY DocumentTitle" query, it fails with this error
==========================
[8/17/17 9:37:19:047 EDT] 00000f65 SystemErr R CIWEB Error: [(unknown) @ 10.108.255.210] [REQUEST 6184] com.ibm.ecm.struts.actions.p8.P8SearchAction.executeAction() com.filenet.api.exception.EngineRuntimeException: FNRCA0024E: API_PROPERTY_NOT_IN_CACHE: The ClassDescription property was not found in the properties collection.
==========================
Here is the sample code:
require(["dojo/_base/declare","dojo/_base/lang","ecm/model/SearchQuery","ecm/model/Desktop", "ecm/model/SearchConfiguration"], function(declare, lang, SearchQuery, Desktop, SearchConfiguration) {
var queryParams = {};
queryParams.pageSize = 100;
queryParams.query = "Select DocumentTitle From Document ORDER BY DocumentTitle";
queryParams.retrieveAllVersions = false;
queryParams.retrieveLatestVersion = true;
queryParams.repository = Desktop.repositories[0];
var searchQuery = new SearchQuery(queryParams);
console.debug("searchQuery::", searchQuery);
searchQuery.search(function(response){
console.debug("::response", response);
console.debug("::response", response.getColumns());
console.debug("::response.items[0].name", response.items[0].name);
})
});
What am I missing here?
Added CPE related tags to allow SME resources to review the FNRCA0024E: API_PROPERTY_NOT_IN_CACHE error and advise on conditions that would create the exception.
In the SystemOut log I can see:
com.filenet.api.exception.EngineRuntimeException: FNRCA0024E: API_PROPERTY_NOT_IN_CACHE: The ClassDescription property was not found in the properties collection.
at com.filenet.apiimpl.property.PropertiesImpl.get(PropertiesImpl.java:127)
at com.filenet.apiimpl.meta.Util.getInterceptProperty(Util.java:254)
Is there a way to add a property to the property collection?
Answer by kiran.aithagani (329) | Aug 17, 2017 at 12:54 PM
Did you try adding [This] to the Query. may be something like below
"Select [This],[DocumentTitle] From Document ORDER BY DocumentTitle"
I had already tried this but this also is throwing error.
Answer by nkolunov (79) | Aug 21, 2017 at 08:53 AM
We also tried:
queryParams.query = "SELECT This, ClassDescription, DocumentTitle FROM Document ORDER BY DocumentTitle";
console.log("sql query is "+queryParams.query);
Still no effect, the system returns "The ReservationType property was not found in the properties collection"
I have engaged an ICN Dev SME resource to review this concern and lend available input. -M
Answer by TheoMekonnen (879) | Aug 22, 2017 at 11:41 AM
While waiting on SME to look into this, I found an article that suggests the following:
Add the following JVM argument to the CPE server -DFileNet.CMC.Enabled=true
Add the following JVM argument to the ICN/client server -DCMCEnableOverride=true
You will need to restart both JVMs after adding these JVM arguments.
Hello, Would you please provide the article link that you found?
ICN/ P8 Tuning 1 Answer
Custom Object vs Document Class 1 Answer
How to trigger latest entry template while viewing the properties 1 Answer
FileNet Creator unable to delete documents in FileNet (Solved) 2 Answers
GCD still using local file-based copy instead of Database even after database is online 1 Answer