[DM_API_E_EXIST] Error: Document/object Specified by Does Not Exist.

2012-08-10

An obscure error in Documentum 5.3

Error message:

[DM_API_E_EXIST]error:  "Document/object specified by  does not exist."
com.documentum.fc.client.DfSession.createServerException(DfSession.java:3556)
com.documentum.fc.client.DfSession.convertToDfException(DfSession.java:3538)
com.documentum.fc.client.DfSession.apiGet(DfSession.java:217)
com.documentum.fc.bof.compoundclass.AspectMgr.getAspectCount(AspectMgr.java:235)
com.documentum.fc.bof.compoundclass.AspectMgr.getAspects(AspectMgr.java:26)
com.documentum.fc.client.DfPersObjFactoryWithAspects.makeObject(DfPersObjFactoryWithAspects.java:41)
com.documentum.fc.client.DfSession.makePersistentObject(DfSession.java:2268)
com.documentum.fc.client.DfSession.newObjectWithType(DfSession.java:2368)
com.documentum.fc.client.DfSession.newObject(DfSession.java:2348)

System: Documentum 5.3 SP5 / Oracle 10 / Windows Server 2003

Code using dfc.jar:

1
2
3
4
5
6
7
IDfSysObject report = ...;
if (report == null) {
    report = (IDfSysObject) session.newObject("dm_document");
    report.setObjectName("my log");
    report.link(folderName);
    report.save();
}

Solution / Explanation:

The code called session.disconnect() before session.newObject(…).

DCTM 5.3 does not return a proper error message like “session is invalid or disconnected”