IBM CE 错误集之(FNRCS0005E)

 

// 通过ObjectStore获取所有的StorageArea对象,CEUtil是我封装的一个获取ObjectStore 的工具类

ObjectStore os = CEUtil.getStore();
StorageAreaSet areaSet = os.get_StorageAreas();

执行以上代码,ObjectStore 获取成功,获取StorageArea时出现如下错误:

Exception in thread "main" com.filenet.api.exception.EngineRuntimeException: FNRCS0005E: SECURITY_INVALID_CREDENTIALS: Access to the Content Engine was not allowed because the Content Engine API library or the Web Service Interface (WSI) Listener could not find the required security context information. Expected credentials were not found in the security context.
at com.filenet.apiimpl.wsi.ClientOperation.getCredential(ClientOperation.java:361)
at com.filenet.apiimpl.wsi.ClientOperation.getSoapEnvelopeSecurity(ClientOperation.java:294)
at com.filenet.apiimpl.wsi.ServiceSessionNst.bStartXmlDocument(ServiceSessionNst.java:847)
at com.filenet.apiimpl.wsi.ServiceSessionNst.cReqRespPath(ServiceSessionNst.java:155)
at com.filenet.apiimpl.wsi.ServiceSessionNst.getObjects(ServiceSessionNst.java:104)
at com.filenet.apiimpl.util.SessionHandle.getObjects(SessionHandle.java:381)
at com.filenet.apiimpl.core.Session.callGetObjects(Session.java:122)
at com.filenet.apiimpl.core.Session.executeGetObject(Session.java:327)
at com.filenet.apiimpl.core.Session.getProperty(Session.java:450)
at com.filenet.apiimpl.property.PropertyImpl.fetchValue(PropertyImpl.java:355)
at com.filenet.apiimpl.property.PropertyImpl.getObjectValue(PropertyImpl.java:295)
at com.filenet.apiimpl.property.PropertyImpl.getObjectValue(PropertyImpl.java:276)
at com.filenet.apiimpl.property.PropertyImpl.getIndependentObjectSetValue(PropertyImpl.java:589)
at com.filenet.apiimpl.property.PropertiesImpl.getIndependentObjectSetValue(PropertiesImpl.java:1191)
at com.filenet.apiimpl.core.ObjectStoreImpl.get_StorageAreas(ObjectStoreImpl.java:621)

 

错误原因:

我虽然正确的或得到了ObjectStore,但是当我获得到ObjectStore的同时,执行了如下代码:

UserContext uc = UserContext.get();

。。。。

uc.popSubject();  // 提前结束了认证。

 

解决方案:

对ObjectSotre操作完成后,再结束认证。

posted @   zero516cn  阅读(1108)  评论(0编辑  收藏  举报
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· [AI/GPT/综述] AI Agent的设计模式综述
点击右上角即可分享
微信分享提示