Rest Service returns nothing on keys and column for Categorised View when Upgraded from FP6 to FP8

我的未来我决定 提交于 2019-12-11 16:49:39

问题


I am working in the application in which I have implemented the search and passing the "searchKeys" in url by Rest Service xpage,

In fix pack 6 I get the results as expected but the same application i configured in a server with Feature Pack 8, the keys in the Rest service simple returns nothing and in Categorised view I update the Keys with Categorised column value which returns Null pointer .

if I tries to get the categorised columns results I get the error

{
    "code":500,
    "text":"Interner Fehler",
    "message":"",
    "type":"text",
    "data":"java.lang.NullPointerException\r\n\tat com.ibm.domino.services.rest.das.view.RestViewNavigatorFactory$ViewNavigatorNavigator.getTopLevelEntryCount(RestViewNavigatorFactory.java:644)\r\n\tat com.ibm.domino.services.rest.das.view.RestViewNavigatorFactory$SearchKeyNavigatorNavigator.getTopLevelEntryCount(RestViewNavigatorFactory.java:581)\r\n\tat com.ibm.domino.services.rest.das.view.RestViewItemFileService.renderServiceJSONGet(RestViewItemFileService.java:263)\r\n\tat com.ibm.domino.services.rest.das.view.RestViewItemFileService.renderService(RestViewItemFileService.java:77)\r\n\tat com.ibm.domino.services.HttpServiceEngine.processRequest(HttpServiceEngine.java:168)\r\n\tat com.ibm.xsp.extlib.component.rest.UIBaseRestService._processAjaxRequest(UIBaseRestService.java:257)\r\n\tat com.ibm.xsp.extlib.component.rest.UIBaseRestService.processAjaxRequest(UIBaseRestService.java:234)\r\n\tat com.ibm.xsp.util.AjaxUtilEx.renderAjaxPartialLifecycle(AjaxUtilEx.java:206)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.renderAjaxPartial(FacesServletEx.java:249)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.serviceAjaxPartialView(FacesServletEx.java:200)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.serviceAjaxPartialViewSync(FacesServletEx.java:169)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:155)\r\n\tat com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:159)\r\n\tat com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)\r\n\tat com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:588)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1335)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:865)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:808)\r\n\tat com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:577)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1319)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:662)\r\n\tat com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:482)\r\n\tat com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:357)\r\n\tat com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:313)\r\n\tat com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)\r\n"
}

In the case of search the Keys in Rest Service the error is simply Empty

  {
"@timestamp":"2017-12-11T12:24:41Z",
"@toplevelentries":1799,
"items":
[
]
}

Note : Same thing works with FP6 but Dont Works with FP8


回答1:


I faced similar issue in my project. You get nullPointerException because the REST service returns nothing (Null). Hence, while loading the data (null data) in the REST service to grid the code that loads the data should handle the exception. Below code may help you on this.

listeners: {
    exception : function(proxy, response, operation) {
    operation.records = []; //set the value of exceptional data to blank.
}


来源:https://stackoverflow.com/questions/47752975/rest-service-returns-nothing-on-keys-and-column-for-categorised-view-when-upgrad

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!