Hi,
I'm new to the OpenCMIS Java API. I got errors when trying to retrieve
an object (a folder) with some properties with custom extensions. But I
can retrieve normal CMIS objects without custom properties without any
problem.
Here is the error message:
Exception in thread "main"
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException:
Property 'dc:issued' doesn't exist!
at
org.apache.chemistry.opencmis.client.runtime.repository.ObjectFactoryImpl.convertProperty(ObjectFactoryImpl.java:247)
at
org.apache.chemistry.opencmis.client.runtime.repository.ObjectFactoryImpl.convertProperties(ObjectFactoryImpl.java:270)
at
org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.initialize(AbstractCmisObject.java:108)
at
org.apache.chemistry.opencmis.client.runtime.FolderImpl.<init>(FolderImpl.java:69)
at
org.apache.chemistry.opencmis.client.runtime.repository.ObjectFactoryImpl.convertObject(ObjectFactoryImpl.java:483)
at
org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:397)
at
org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:367)
at
org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:359)
at cmispageturner.CMISRequester.checkStatus(CMISRequester.java:85)
at cmispageturner.CMISRequester.main(CMISRequester.java:23)
Java Result: 1
My code where the error was thrown:
... // build a session object ...
SessionFactory f = SessionFactoryImpl.newInstance();
Map<String, String> parameter = new HashMap<String, String>();
parameter.put(SessionParameter.USER, user);
parameter.put(SessionParameter.PASSWORD, passwd);
parameter.put(SessionParameter.ATOMPUB_URL, url);
parameter.put(SessionParameter.BINDING_TYPE,
BindingType.ATOMPUB.value());
parameter.put(SessionParameter.REPOSITORY_ID, "content");
Session session = f.createSession(parameter);
CmisObject obj = session.getObject(objId); // error thrown!!!
...
Is it because the server is not set up correctly or do I need to some
extra coding on the client side for objects with custom properties? I
can use the Python API to retrieve the object without any problem. Here
is what python code would retrieve:
cmis:objectId: L3JlcS90ZXN0L0swMDAyNjguMDAw
bamboo:source-url:
http://ramman.grainger.uiuc.edu:8080/fedora/objects/bamboo:K000268.000
cmis:creationDate: 2011-08-23 11:22:58
cmis:objectTypeId: bamboo:book
cmis:lastModificationDate: 2011-08-23 16:22:58
cmis:baseTypeId: cmis:folder
cmis:path: /req/test/K000268.000
dc:title: Every man in his own way: An epistle to a friend. By Stephen Duck.
dc:issued: 1741.
cmis:lastModifiedBy: bamboo
bamboo:source: tcp
cmis:name: Every man in his own way: An epistle to a friend. By Stephen
Duck.
cmis:createdBy: bamboo
dc:date: 1741.
dc:identifier: bamboo:K000268.000
cmis:parentId: L3JlcS90ZXN0
dc:publisher: printed for J. Roberts; and R. Dodsley,
dc:creator: Duck, Stephen, 1705-1756.
Apparently there exists an "dc:issued" property. so I am guess it's the
client Java code. Any ideas?
Thank you very much!
David
--
Dazhi (David) Jiao
System Analyst
Indiana University Digital Library Program
1320 E 10th Street W501, Bloomington, IN 47405
812.856.0089