Hi,
As i am trying to work through the sample code as provided in alfresco-developer-series-tutorials by Jeff Potts. I am facing a problem while creating content programmatically. This is occurring at the line where i am trying to grab a reference to the folder where we want to create the content.
public Document createTestDoc(String docName, String contentType) {
Session session = getSession();
Folder folder = (Folder) session.getObjectByPath("/" + getFolderName());
-----
-----
}
In the argument expected by the sample application I have tried to pass the default folder "SomeCo" as mentioned in the tutorial as well as some named folders as I see in the Alfresco ProjectLibrary but each time following exception is getting thrown -
Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Object not found: /SomeCo
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:473)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:619)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getObjectInternal(AbstractAtomPubService.java:842)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getObjectByPath(ObjectServiceImpl.java:628)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObjectByPath(SessionImpl.java:554)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObjectByPath(SessionImpl.java:532)
at com.someco.cmis.examples.CMISExampleBase.createTestDoc(CMISExampleBase.java:93)
at com.someco.cmis.examples.SomeCoCMISDataCreator.create(SomeCoCMISDataCreator.java:28)
at com.someco.cmis.examples.SomeCoCMISDataCreator.main(SomeCoCMISDataCreator.java:24)