FileNet3.5 按条件查询文件列表求救
我打算调用FileNet3.5的接口进行文件查询,查询条件是文件名称、大小、创建时间、修改时间、版本、文件类型、目录路径,现在是总是报告如下错误:
2008-07-04 13:34:50,520 [main] ERROR com.filenet.wcm.api.ReadOnlyObjectException -[throw] Failure setting the value of a read only property.. The property in the error is: OIID [Code=8004022d] ... Object Reference [OBJECT_STORE:4] ID "BaseOS" in ObjectStore "BaseOS"; OMFC/Library/CreateDocument/Server.Unknown.8004022d
com.filenet.wcm.api.ReadOnlyObjectException: Failure setting the value of a read only property.. The property in the error is: OIID [Code=8004022d] ... Object Reference [OBJECT_STORE:4] ID "BaseOS" in ObjectStore "BaseOS"; OMFC/Library/CreateDocument/Server.Unknown.8004022d
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at com.filenet.wcm.api.impl.soapenc.SOAPFacilities.convertSoapFault(SOAPFacilities.java:397)
at com.filenet.wcm.api.impl.soapenc.RcAs.dealWithResponse(RcAs.java:366)
at com.filenet.wcm.api.impl.soapenc.RcAs.doRpcRecursive(RcAs.java:167)
at com.filenet.wcm.api.impl.soapenc.RcAs.doRpc(RcAs.java:89)
at com.filenet.wcm.api.impl.RemoteCommand.execute(RemoteCommand.java:416)
at com.filenet.wcm.api.impl.RemoteCommand.executeInner(RemoteCommand.java:398)
at com.filenet.wcm.api.impl.RemoteCommand.execute(RemoteCommand.java:330)
at com.filenet.wcm.api.impl.RemoteCommand.executeExpectingBO(RemoteCommand.java:249)
at com.filenet.wcm.api.impl.ObjectStoreImpl.callCreateObject(ObjectStoreImpl.java:588)
at com.filenet.wcm.api.impl.ObjectStoreImpl.createObject(ObjectStoreImpl.java:518)
at com.obj.ecm.conn.handle.HandleFileNet3.getSearchDocumentId(HandleFileNet3.java:384)
at com.obj.ecm.conn.handle.HandleFileNet3.doFileSearch(HandleFileNet3.java:307)
at com.obj.ecm.conn.handle.HandleFileNet3.main(HandleFileNet3.java:94)
2008-07-04 13:34:50,520 [main] WARN com.filenet.wcm.api.impl.RemoteCommand -Library/CreateDocument RemoteCommand.execute stamps beg/i.b/i.a/end/conv,1215149689457,1215149689457,0,0,1215149690520
2008-07-04 13:34:50,520 [main] WARN com.filenet.wcm.api.impl.RemoteCommand -Library/CreateDocument RemoteCommand.execute deltas beg/i.b/i.a/end/conv/tot,0,0,-1215149689457,0,1215149690520,1063
2008-07-04 13:34:50,535 [main] ERROR root -Unable to load class for system performance counters
com.filenet.wcm.api.ReadOnlyObjectException: Failure setting the value of a read only property.. The property in the error is: OIID [Code=8004022d] ... Object Reference [OBJECT_STORE:4] ID "BaseOS" in ObjectStore "BaseOS"; OMFC/Library/CreateDocument/Server.Unknown.8004022d
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at com.filenet.wcm.api.impl.soapenc.SOAPFacilities.convertSoapFault(SOAPFacilities.java:397)
at com.filenet.wcm.api.impl.soapenc.RcAs.dealWithResponse(RcAs.java:366)
at com.filenet.wcm.api.impl.soapenc.RcAs.doRpcRecursive(RcAs.java:167)
at com.filenet.wcm.api.impl.soapenc.RcAs.doRpc(RcAs.java:89)
at com.filenet.wcm.api.impl.RemoteCommand.execute(RemoteCommand.java:416)
at com.filenet.wcm.api.impl.RemoteCommand.executeInner(RemoteCommand.java:398)
at com.filenet.wcm.api.impl.RemoteCommand.execute(RemoteCommand.java:330)
at com.filenet.wcm.api.impl.RemoteCommand.executeExpectingBO(RemoteCommand.java:249)
at com.filenet.wcm.api.impl.ObjectStoreImpl.callCreateObject(ObjectStoreImpl.java:588)
at com.filenet.wcm.api.impl.ObjectStoreImpl.createObject(ObjectStoreImpl.java:518)
at com.obj.ecm.conn.handle.HandleFileNet3.getSearchDocumentId(HandleFileNet3.java:384)
at com.obj.ecm.conn.handle.HandleFileNet3.doFileSearch(HandleFileNet3.java:307)
at com.obj.ecm.conn.handle.HandleFileNet3.main(HandleFileNet3.java:94)
Exception in thread "main"
但是我试了所有相关的属性值啊,那位仁兄有类时的代码,请给一个demon,不胜感激,我的源代码如下:
private List getSearchDocumentId(SearchCondition condition,Session session, ObjectStore objectStore)
{
List idList=new ArrayList();
Properties collProps = ObjectFactory.getProperties();
Property p = ObjectFactory.getProperty(Property.OIID);
p.setValue(" ");
collProps.add(p);
// Search search = ObjectFactory.getSearch(session);
StoredSearch storedSearch = (StoredSearch) objectStore.createObject(ClassDescription.STORED_SEARCH, collProps, null);
System.out.println("=============================1111111111111");
BaseObjects baseObjects1 = (BaseObjects) storedSearch.execute(this.getDoFileSearchDql(condition));
System.out.println("=============================2222222222222");
BaseObjects baseObjects2 = (BaseObjects) storedSearch.execute(this.getXmlVQL(condition));
System.out.println("=============================3333333333333");
// System.out.println("--------------------------- "+storedSearch.executeXML(this.getXmlVQL(condition)));
// Iterator os= baseObjects.iterator();
//
// while(os.hasNext())
// {
// String iobject=(String)os.next();
// idList.add(iobject);
// }
return idList;
}
还有其中的storedSearch.execute()方法中的参数是一个vql的查询字符串还是符合xml结构的字符串???
xml格式的字符串形成如下:
private String getXmlVQL(SearchCondition condition)
{
StringBuffer vql = new StringBuffer();
vql.append("<request>");
vql.append("<objectstores mergeoption="union">");
vql.append("<objectstore id="BaseOS"/>");
vql.append("<querystatement>");
vql.append(this.getDoFileSearchDql(condition));
vql.append("</querystatement>");
vql.append("<options maxrecords="100"/>");
vql.append("</objectstores>");
vql.append("</request>");
System.out.println("vql.toString() ====================== "+vql.toString());
return vql.toString();
}
vql的查询语句如下:SELECT d.[Id] FROM Document d WHERE 1=1 and [DocumentTitle] LIKE '%jim%'
谁知到请指点,谢谢拉????
|