Hi All,
When I am trying to export the virtual documents and its children elements, then I am getting the following error. Also My virtual document contains 76 child documents. But I am getting only 74 child documents. After exporting 74 documents I am getting the following error.
com.documentum.fc.client.impl.session.StrongSessionHandle@a2220f is connected successfully
About to export object: 0900000180234b12: Attaching Server to Storage System- Master.xml
Found a vDoc Attaching Server to Storage System- Master.xml Owner : Pelon, Anne
DfException:: THREAD: main; MSG: [DFC_QUERY_SESSION_CLOSED] The session associated with the collection has been disconnected; Additional msg - object name: Attaching Server to Storage System- Master.xml; ERRORCODE: ff; NEXT: null
at com.documentum.fc.common.DfException.newQuerySessionClosedException(DfException.java:190)
at com.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient$TypedDataIterator.next(NetwiseDocbaseRpcClient.java:1277)
at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection$IteratorSynchronizer.next(DocbaseConnection.java:1625)
at com.documentum.fc.client.impl.collection.TypedDataCollection.next(TypedDataCollection.java:133)
at com.documentum.fc.client.impl.collection.CollectionHandle.next(CollectionHandle.java:47)
at com.documentum.operations.nodeactions.outbound.DfApplyXMLForExport.getRelatedObjectsDRL(DfApplyXMLForExport.java:1744)
at com.documentum.operations.nodeactions.outbound.DfApplyXMLForExport.processOpWithDescendents(DfApplyXMLForExport.java:1149)
at com.documentum.operations.nodeactions.outbound.DfApplyXMLForExport.executeInternal(DfApplyXMLForExport.java:264)
at com.documentum.operations.nodeactions.outbound.DfApplyXMLForExport.execute(DfApplyXMLForExport.java:53)
at com.documentum.operations.steps.impl.OperationStep.executeStep(OperationStep.java:151)
at com.documentum.operations.steps.impl.OperationStep.execute(OperationStep.java:40)
at com.documentum.operations.impl.OperationExecutionEngine.execute(OperationExecutionEngine.java:51)
at com.documentum.operations.DfOperation.execute(DfOperation.java:342)
at com.emc.upd.SunitaExport.main(SunitaExport.java:77)
My Java code for export is as below:
public class SunitaExport {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try
{
String id;
IDfId idObj;
IDfSysObject myObj;
IDfSessionManager sMgr = createSessionManager();
IDfSession session = sMgr.getSession("upd");
System.out.println(session + " is connected successfully");
IDfClientX clientX = new DfClientX();
IDfExportOperation export = clientX.getExportOperation();
export.enableManageApplicationSupportDocuments(false);
//List masterSource = createConfigFile();
String qualification = "select * from dm_document where FOLDER('/CLARiiON/Working Folder/Final',DESCEND) AND r_object_type='emc_master_document' AND language_code='en' AND i_latest_flag=1.0 AND a_content_type= 'xml' AND object_name='Attaching Server to Storage System- Master.xml'";
IDfCollection col = null;
IDfQuery q = new DfQuery();
q.setDQL(qualification);
col = q.execute(session, 0);
boolean flag = false;
while (col.next())
{
flag = true;
id = col.getString("r_object_id");
idObj = clientX.getId(id);
myObj = (IDfSysObject)session.getObject(idObj);
System.out.println("About to export object: " + idObj.getId() + ": " + myObj.getObjectName());
if (myObj.isVirtualDocument())
{
System.out.println("Found a vDoc " + myObj.getObjectName() + " Owner : " + myObj.getOwnerName());
IDfVirtualDocument vDoc = myObj.asVirtualDocument("CURRENT", false);
export.add(vDoc);
int childCount = vDoc.getUniqueObjectIdCount();
for (int ctrChild = 0; ctrChild < childCount; ++ctrChild) {
}
}
else
{
System.out.println("Found a Doc " + myObj.getObjectName() + " Owner : " + myObj.getOwnerName());
export.add(myObj);
}
}
col.close();
export.setDestinationDirectory("C:\\Temp\\en");
if (!(export.execute()))
{
System.out.println("export failed");
}
System.out.println("export succeeded");
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
public static IDfSessionManager createSessionManager() throws Exception {
// create Client objects
IDfClientX clientx = new DfClientX();
IDfClient client = clientx.getLocalClient();
// create a Session Manager object named sMgr
IDfSessionManager sMgr = client.newSessionManager();
// create an IDfLoginInfo object named loginInfoObj
IDfLoginInfo loginInfoObj = clientx.getLoginInfo();
loginInfoObj.setUser("doccmbp1");
loginInfoObj.setPassword("bless2emc");
// bind the Session Manager to the login info
sMgr.setIdentity("upd", loginInfoObj);
return sMgr;
}
}