Hi All – Please assist with the below error.
at Documentum.Interop.DFC.IDfQuery.execute(IDfSession session, Int32 queryType)
at ExportDctm.ChequeImageMetadata.insertChkImage(String[] chk_img_path, String trans_id, String product_name, String prod_cat_name, String eflow_batch_no, String batch_no, String[] img_id, String type, String clotno, String[] cbp_no)DfException:: THREAD: main; MSG: [DM_QUERY_F_UP_SAVE]fatal: "UPDATE: An error has occurred during a save operation."; ERRORCODE: 100; NEXT: DfException:: THREAD: main; MSG: [DM_SYSOBJECT_E_CANT_ACCESS_FILE]error: "Cannot access file 'D:\temp\eflowshare\Cims\100001445\1445001.001.tif' due to Operating System error."; ERRORCODE: 100; NEXT: null:DfException:: THREAD: main; MSG: [DM_QUERY_F_UP_SAVE]fatal: "UPDATE: An error has occurred during a save operation."; ERRORCODE: 100; NEXT: DfException:: THREAD: main; MSG: [DM_SYSOBJECT_E_CANT_ACCESS_FILE]error: "Cannot access file 'D:\temp\eflowshare\Cims\100001445\1445001.001.tif' due to Operating System error."; ERRORCODE: 100; NEXT: null
- atcom.documentum.fc.client.impl.docbase.DocbaseExceptionMapper.newException(DocbaseExceptionMapper.java:57)
at com.documentum.fc.client.impl.connection.docbase.MessageEntry.getException(MessageEntry.java:39)
- atcom.documentum.fc.client.impl.connection.docbase.DocbaseMessageManager.getException(DocbaseMessageManager.java:137)
- atcom.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient.checkForMessages(NetwiseDocbaseRpcClient.java:290)
- atcom.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient.applyForCollection(NetwiseDocbaseRpcClient.java:385)
- atcom.documentum.fc.client.impl.connection.docbase.DocbaseConnection$3.evaluate(DocbaseConnection.java:1129)
- atcom.documentum.fc.client.impl.connection.docbase.DocbaseConnection.evaluateRpc(DocbaseConnection.java:1000)
- atcom.documentum.fc.client.impl.connection.docbase.DocbaseConnection.applyForCollection(DocbaseConnection.java:1117)
at com.documentum.fc.client.impl.docbase.DocbaseApi.exec(DocbaseApi.java:70)
at com.documentum.fc.client.impl.session.Session.query(Session.java:3242)
at com.documentum.fc.client.impl.session.SessionHandle.query(SessionHandle.java:2219)
at com.documentum.fc.client.impl.dql.DqlUpdate.processCreate(DqlUpdate.java:536)
at com.documentum.fc.client.DfQuery.runQuery(DfQuery.java:181)
at com.documentum.fc.client.DfQuery.execute(DfQuery.java:210)
Followed by: DfException:: THREAD: main; MSG: [DM_SYSOBJECT_E_CANT_ACCESS_FILE]error: "Cannot access file 'D:\temp\eflowshare\Cims\100001445\1445001.001.tif' due to Operating System error."; ERRORCODE: 100; NEXT: null
- atcom.documentum.fc.client.impl.docbase.DocbaseExceptionMapper.newException(DocbaseExceptionMapper.java:57)
at com.documentum.fc.client.impl.connection.docbase.MessageEntry.getException(MessageEntry.java:39)
- atcom.documentum.fc.client.impl.connection.docbase.DocbaseMessageManager.getException(DocbaseMessageManager.java:137)
- atcom.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient.checkForMessages(NetwiseDocbaseRpcClient.java:290)
- atcom.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient.applyForCollection(NetwiseDocbaseRpcClient.java:385)
- atcom.documentum.fc.client.impl.connection.docbase.DocbaseConnection$3.evaluate(DocbaseConnection.java:1129)
- atcom.documentum.fc.client.impl.connection.docbase.DocbaseConnection.evaluateRpc(DocbaseConnection.java:1000)
- atcom.documentum.fc.client.impl.connection.docbase.DocbaseConnection.applyForCollection(DocbaseConnection.java:1117)
at com.documentum.fc.client.impl.docbase.DocbaseApi.exec(DocbaseApi.java:70)
at com.documentum.fc.client.impl.session.Session.query(Session.java:3242)
at com.documentum.fc.client.impl.session.SessionHandle.query(SessionHandle.java:2219)
at com.documentum.fc.client.impl.dql.DqlUpdate.processCreate(DqlUpdate.java:536)
at com.documentum.fc.client.DfQuery.runQuery(DfQuery.java:181)
at com.documentum.fc.client.DfQuery.execute(DfQuery.java:210)
- Documentum.Dfc.1
Scenario Introduction:
I am getting this error while executing a DQL to create an object in documentum and to set a file to that object. Please find the below query that is being executed:
“create ctb_supp_img object set trans_id='1112', set prod_name='CCLR', set prod_cat_name='General', set eflow_batch_no='000112', set batch_no='100001445', set cbp_no='100001445', set attachment_id='1001', set attachment_typeid='1', set object_name='ChequeCCLR1112', set clot_no='001', setfile 'D:\temp\eflowshare\Cims\100001445\1445001.001.tif' with content_format='tiff', link'/CIMS/TRANSACTION/CCLR/100001445/1112/CHEQUE/DOCUMENT'”
Please find the below code snippet that I am using in my project to do the same.
--------------------------------------++-------------------------------------
public String insertImage(String trans_id, String product_name, String prod_cat_name, String imagepath, String eflow_batch_no, String batch_no, String clotno, string client_code, string client_name, string client_refno, string full_batch_no, string BaseNo, string Deposit_Slip_Count, string Base_Transaction_Id, string Upload_date){
String flag = "";
String str_img_create_qry = "";
IDfQuery img_objid_qry = null;
IDfQuery img_create_qry = null;
IDfCollection imgobjid_coll = null;
StringBuilder str_bui_img_create_qry;
int intreturnSuccess = 1;
String main_imgobj_id = "";
try
{
img_objid_qry = _m_DfClientX.getQuery();
img_objid_qry.setDQL("select r_object_id from ctb_main_img where trans_id ='" + trans_id + "' and prod_name ='" + product_name + "' and prod_cat_name ='" + prod_cat_name + "' and eflow_batch_no ='" + eflow_batch_no + "' and batch_no='" + batch_no + "' and clot_no='" + clotno + "'");
imgobjid_coll = img_objid_qry.execute(loSession, (int)tagDfQueryTypes.DF_READ_QUERY);
while (imgobjid_coll.next())
{
main_imgobj_id = imgobjid_coll.getString("r_object_id");
}
if (main_imgobj_id == null || main_imgobj_id.Equals(string.Empty))
{
try
{
int intdepslipcount = 0;
if (!string.IsNullOrEmpty(Deposit_Slip_Count))
{
Int32.TryParse(Deposit_Slip_Count, out intdepslipcount);
}
DateTime dtuploaddate = DateTime.Now;
DateTime.TryParse(Upload_date, out dtuploaddate);
string struploaddate = string.Empty;
string format;
DateTime result;
CultureInfo provider = CultureInfo.InvariantCulture;
try
{
format = "dd/mm/yyyy";
result = DateTime.ParseExact(dtuploaddate.ToShortDateString(), format, provider);
}
catch
{
format = "d/m/yyyy";
result = DateTime.ParseExact(dtuploaddate.ToShortDateString(), format, provider);
}
struploaddate = result.ToShortDateString();
String loObjectName = "Main" + product_name + trans_id;
String loLinkPath = "/CIMS/TRANSACTION/" + product_name + "/" + batch_no + "/" + trans_id + "/MAIN/DOCUMENT";
str_bui_img_create_qry = new StringBuilder();
str_bui_img_create_qry.Append("create ctb_main_img object set trans_id='" + trans_id + "', ");
str_bui_img_create_qry.Append("set prod_name='" + product_name + "', ");
str_bui_img_create_qry.Append("set prod_cat_name='" + prod_cat_name + "', ");
str_bui_img_create_qry.Append("set eflow_batch_no='" + eflow_batch_no + "', ");
str_bui_img_create_qry.Append("set batch_no='" + batch_no + "', ");
str_bui_img_create_qry.Append("set upload_date=DATE('" + struploaddate + "','dd/mm/yyyy'), ");
str_bui_img_create_qry.Append("set base_no='" + BaseNo + "', ");
str_bui_img_create_qry.Append("set basetransaction_id='" + Base_Transaction_Id.Replace("'", "''").Replace("\n", " ") + "', ");
str_bui_img_create_qry.Append("set deposit_slip_count=" + intdepslipcount.ToString() + ", ");
str_bui_img_create_qry.Append("set clot_no='" + clotno + "', ");
str_bui_img_create_qry.Append("set client_code='" + client_code.Replace("'", "''").Replace("\n", " ") + "', ");
str_bui_img_create_qry.Append("set client_name='" + client_name.Replace("'", "''").Replace("\n", " ") + "', ");
str_bui_img_create_qry.Append("set client_refno='" + client_refno.Replace("'", "''").Replace("\n", " ") + "', ");
str_bui_img_create_qry.Append("set full_batch_no='" + full_batch_no + "', ");
str_bui_img_create_qry.Append("set object_name='" + loObjectName + "', ");
str_bui_img_create_qry.Append("setfile '" + imagepath + "' with content_format='tiff', ");
str_bui_img_create_qry.Append("link'" + loLinkPath + "'");
str_img_create_qry = Convert.ToString(str_bui_img_create_qry);
img_create_qry = _m_DfClientX.getQuery();
img_create_qry.setDQL(str_img_create_qry);
img_create_qry.execute(loSession, (int)tagDfQueryTypes.DF_EXEC_QUERY);
flag = "Success in main image insertion";
}
catch (Exception e)
{
:Error Print<this catch is throwing the above error>
flag = "failed in image insertion with exception of" + e.Message;
}
}
else
{
flag = "Main Image Already Exists";
}
}
catch (Exception e)
{
:Error Print
flag = "failed in image insertion with exception of" + e.Message;
}
finally
{
try
{
if (img_objid_qry != null)
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(img_objid_qry);
img_objid_qry = null;
}
if (img_create_qry != null)
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(img_create_qry);
img_create_qry = null;
}
if (imgobjid_coll != null)
{
System.Runtime.InteropServices.Marshal.ReleaseComObject(imgobjid_coll);
imgobjid_coll = null;
}
}
catch (Exception e)
{
:Error Print
}
}
return flag;
}
--------------------------------------++-------------------------------------
NB:
While trying the same query through DA, it is working fine and creating object and setting file properly with the same admin credential which is in use to run this code. However, the code is creating the object and setting the file for the first time. Next time onwards, this snippets are giving the above error.
Here the Documentum server 6.5sp1 is in windows PC and the the code is basically running as WINDOWS service on some other windows PC. The permissions are set properly as when we are trying the same operation with the help of API rather than DQL. But I need DQL to be worked as the API process is very slow.
Please help.