5 Replies Latest reply: Jan 8, 2013 5:10 AM by Johnny Gee RSS

Write operations are not allowed in read-only mode(Session).

Tju_Lee

Dear,

 

When I execute the code bellow, it reports an error.

-------------------------------------------------------------------------------

IDfSession session = this.dmsSessionManager.getSession(SessionHelper.getUserName(),PlatformFramework.getProperty("dfc.defaultPwd"));

IDfUser iu = session.getUser(userName);

IDfSysObject docu = (IDfSysObject) session.getObject(new DfId(documentId));

IDfRelation relation = docu.addChildRelative("dm_subscription",iu.getObjectId(), null, false, null);

relation.save();

------------------------------------------------------------------------------

1.png

But when i use the same session create a dm_document,it woks very well. 

 

Can anyone help me? Thank you very much!