2 Replies Latest reply: Nov 29, 2012 5:32 AM by phoudek RSS

infrequent DM_FOLDER_E_CANT_ADD_LINK2 error problem


Hi Experts,


really infrequent we get some DfException in our production system. it happens, when the application tried to move a folder.

In more than 99 percent of the cases it all works fine - but sometimes not.


So we can't reproduce it, but need to know how to avoid.


The java code:

com.documentum.fc.client.IDfFolder theMovedFolder;

// ...

theMovedFolder.unlink((String) oldParentFolderId);

theMovedFolder.link((String) newParentFolderId);

theMovedFolder.save(); // <- Exception

// ...


hint: The ids, string, etc. are anonymised (cause data from production system). Every id is replaced with a fantasy id. Strings are replaced this way: "My Original String" -> "Xy XxXyXxxx XXxXxy"


The problem:

DfException:: THREAD: http-; MSG: [DM_FOLDER_E_CANT_ADD_LINK2]error:  "Failed to recompute the folder paths of the folder 'XxxyxXXxxXXxXyx', which is a descendent of the folder 'XX_xxyXxxxxX XXxxXxxXx'."; ERRORCODE: 100; NEXT: DfException:: THREAD: http-; MSG: [DM_OBJ_MGR_E_SAVE_FAIL]error:  "save failed for object with handle 0123abcd00000815 of type xxXxx_xxxyxxxXx_XxXXxx: table on which save failed was DM_FOLDER_R; error from database system was ORA-00001: unique constraint (XXXXXX.D_1F00XXXXXX000146) violated"; ERRORCODE: 100; NEXT: null

    at com.documentum.fc.client.impl.docbase.DocbaseExceptionMapper.newException(DocbaseExceptionMapper.java:57)

    at com.documentum.fc.client.impl.connection.docbase.MessageEntry.getException(MessageEntry.java:39)

    at com.documentum.fc.client.impl.connection.docbase.DocbaseMessageManager.getException(DocbaseMessageManager.java:137)

    at com.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient.checkForMessages(NetwiseDocbaseRpcClient.java:310)

    at com.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient.applyForInt(NetwiseDocbaseRpcClient.java:581)

    at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection$6.evaluate(DocbaseConnection.java:1254)

    at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.evaluateRpc(DocbaseConnection.java:1056)

    at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.applyForInt(DocbaseConnection.java:1247)

    at com.documentum.fc.client.impl.docbase.DocbaseApi.parameterizedSave(DocbaseApi.java:768)

    at com.documentum.fc.client.DfSysObject$1.evaluate(DfSysObject.java:373)

    at com.documentum.fc.client.DfSysObject.doSaveImpl(DfSysObject.java:403)

    at com.documentum.fc.client.DfSysObject.doSave(DfSysObject.java:206)

    at com.documentum.fc.client.DfFolder.doSave(DfFolder.java:51)


Some additional informations:

0123abcd00000815 is the r_object_id of sub-folder "XxxyxXXxxXXxXyx", "XxxyxXXxxXXxXyx" is a sub-folder of "XX_xxyXxxxxX XXxxXxxXx"

The unique constraint (XXXXXX.D_1F00XXXXXX000146) is the index for columns of R_OBJECT_ID and I_POSITION of table dm_folder_r.


In the database all looks fine:

0123456789abcdef321654987aaa666cXxxXxXxXX_xxyXxxxxX XXxxXxxXx/XxxyxXXx/XX XxXxxxxX/XxxyxXXxxxxyxxxxX XX/XX_xxyXxxxxX XXxxXxxXx
0123abcd000008150123456789abcdefXxyXxx, XyxxxXxxyxXXxxXXxXyx/XxxyxXXx/XX XxXxxxxX/XxxyxXXxxxxyxxxxX XX/XX_xxyXxxxxX XXxxXxxXx/XxxyxXXxxXXxXyx


What i tried:

  • reproduce on development system
  • search for any informations about "DM_FOLDER_E_CANT_ADD_LINK2" in this forum, powerlink, google.
  • search for inconsistencies in production system
  • pray to god

Nothing helped.


Any ideas how this could happen? And of cause how to avoid it?





best regards,


  • 1. Re: infrequent DM_FOLDER_E_CANT_ADD_LINK2 error problem
    Jørg Krause



    Nasty business when something like this occurs


    A couple of questions:


    1. The object id's provided are kind of weird. Folder objects do have object tab 0b, so all id's (r_object_id, i_folder_id) are supposed to start with 0b. Where do the 01.... id's come from?


    2. How many levels of folders to you have? Plz note the r_folder_path is 450 characters long, so you're running into problems if the total length is exceeding this.


    3. Do you link/unlink any parent folders in the same sequence?





  • 2. Re: infrequent DM_FOLDER_E_CANT_ADD_LINK2 error problem

    Hi Jørg,


    thanks for your fasr reply.


    1. Sorry, forgotten to write this info: The ids, string, etc. are anonymised (cause data from production system). Every id is replaced with a fantasy id. Strings are replaced this way: "My Original String" -> "Xy XxXyXxxx XXxXxy"
    2. The r_folder_path is less then 150 characters (see in the table), so that's not the reason
    3. Don't think so, but i will check it. No, just this folder.






    Nachricht geändert durch phoudek