<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot create a Folder in a Store in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/cannot-create-a-folder-in-a-store/m-p/61188#M37940</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think your ParentReference is not correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try using ASSOC_CONTAINS instead of ASSOC_CHILDREN.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ParentReference parent_folder_ref = new ParentReference(almacen, almacen_root.getUuid(), null, Constants.ASSOC_CONTAINS, "{user_folder}"+folder_name); &lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Fred&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 29 Oct 2006 11:39:36 GMT</pubDate>
    <dc:creator>fchevance</dc:creator>
    <dc:date>2006-10-29T11:39:36Z</dc:date>
    <item>
      <title>Cannot create a Folder in a Store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-create-a-folder-in-a-store/m-p/61187#M37939</link>
      <description>Hi all,I'm trying to create a new folder in a recently created store.My intention is to have the following structure&lt;IMG id="smileytongue" class="emoticon emoticon-smileytongue" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ersonal(Store)||- folder1…||- folderNOnce I've created the store and got its root node, I have the following code in order to create the folder://Create a new folder (child of root n</description>
      <pubDate>Thu, 26 Oct 2006 17:07:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-create-a-folder-in-a-store/m-p/61187#M37939</guid>
      <dc:creator>doblek</dc:creator>
      <dc:date>2006-10-26T17:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create a Folder in a Store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-create-a-folder-in-a-store/m-p/61188#M37940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think your ParentReference is not correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try using ASSOC_CONTAINS instead of ASSOC_CHILDREN.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ParentReference parent_folder_ref = new ParentReference(almacen, almacen_root.getUuid(), null, Constants.ASSOC_CONTAINS, "{user_folder}"+folder_name); &lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Fred&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Oct 2006 11:39:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-create-a-folder-in-a-store/m-p/61188#M37940</guid>
      <dc:creator>fchevance</dc:creator>
      <dc:date>2006-10-29T11:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create a Folder in a Store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-create-a-folder-in-a-store/m-p/61189#M37941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tested the solution Fred suggested me (thanks Fred), but I got the same result… =/ Nothing is created in the store…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my new code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;//Create a new folder (child of root node in store)&lt;BR /&gt;trace += "Step 4: creating a folder in the store.&amp;lt;BR&amp;gt;";&lt;BR /&gt;//Create reference to the store where this folder is going to be placed. This folder hangs from the root node as its child. &lt;BR /&gt;ParentReference parent_folder_ref = new ParentReference(almacen, almacen_root.getUuid(), null, Constants.ASSOC_CONTAINS, "{user_folder}"+folder_name);&lt;BR /&gt;trace += " parent reference created: "+almacen_root.getUuid()+" Â·:Â· "+folder_name+"&amp;lt;BR&amp;gt;"; &lt;BR /&gt;&lt;BR /&gt;NamedValue[] folder_properties = new NamedValue[]{new NamedValue(Constants.PROP_NAME, false, folder_name, null)};&lt;BR /&gt;trace += " folder properties array created&amp;lt;BR&amp;gt;";&lt;BR /&gt;&lt;BR /&gt;//Create the command (based on the previous reference)&lt;BR /&gt;CMLCreate create_folder = new CMLCreate("user_folder_"+folder_name, parent_folder_ref, Constants.TYPE_FOLDER, folder_properties);&lt;BR /&gt;trace += " command created&amp;lt;BR&amp;gt;"; &lt;BR /&gt;&lt;BR /&gt;//Execute the command&lt;BR /&gt;CML cml = new CML();&lt;BR /&gt;cml.setCreate(new CMLCreate[]{create_folder});&lt;BR /&gt;trace += " command executed&amp;lt;BR&amp;gt;";&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I know from the traces I put (this time I was trying to create a folder called "jonas" in store "personal"):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Starting web service…&lt;BR /&gt;Step 1: logged in as admin user.&lt;BR /&gt;Step 2: checking for existing previous stores… &lt;BR /&gt;store(0): alfrescoUserStore&lt;BR /&gt;store(1): system&lt;BR /&gt;store(2): lightWeightVersionStore&lt;BR /&gt;store(3): SpacesStore&lt;BR /&gt;store(4): SpacesStore&lt;BR /&gt;store(5): personal&lt;BR /&gt;The store does exist. So we retrieve it.&lt;BR /&gt;The store is: personal &lt;BR /&gt;Step 3: looking for the root node in the store.&lt;BR /&gt;Founded 1 nodes in the store "personal"&lt;BR /&gt;Root founded: org.alfresco.webservice.types.Reference@1a5f1cc5 &lt;BR /&gt;Step 4: creating a folder in the store.&lt;BR /&gt;parent reference created: 081690f5-6505-11db-b0c1-a302df063455 Â·:Â· jonas&lt;BR /&gt;folder properties array created&lt;BR /&gt;command created&lt;BR /&gt;command executed&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;everything went fine. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, Alfresco Node Browser still says that "personal" store does not contain anything…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Node Identifier Primary Path: /&amp;nbsp; &lt;BR /&gt;Reference: workspace://personal/081690f5-6505-11db-b0c1-a302df063455 &lt;BR /&gt;Type: {&lt;A href="http://www.alfresco.org/model/system/1.0}store_root" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/system/1.0}store_root&lt;/A&gt; &lt;BR /&gt;Parent:&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Properties Name Value Property Type Value Type Residual &lt;BR /&gt;{&lt;A href="http://www.alfresco.org/model/system/1.0}store-protocol" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/system/1.0}store-protocol&lt;/A&gt; workspace &lt;BR /&gt; { &lt;A href="http://www.alfresco.org/model/dictionary/1.0}text" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/dictionary/1.0}text&lt;/A&gt;&amp;nbsp; &lt;BR /&gt; false &lt;BR /&gt;{&lt;A href="http://www.alfresco.org/model/content/1.0}name" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}name&lt;/A&gt; 081690f5-6505-11db-b0c1-a302df063455 &lt;BR /&gt; { &lt;A href="http://www.alfresco.org/model/dictionary/1.0}text" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/dictionary/1.0}text&lt;/A&gt;&amp;nbsp; &lt;BR /&gt; false &lt;BR /&gt;{&lt;A href="http://www.alfresco.org/model/system/1.0}node-uuid" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/system/1.0}node-uuid&lt;/A&gt; 081690f5-6505-11db-b0c1-a302df063455 &lt;BR /&gt; {&lt;A href="http://www.alfresco.org/model/dictionary/1.0}text" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/dictionary/1.0}text&lt;/A&gt;&amp;nbsp; &lt;BR /&gt; false &lt;BR /&gt;{ &lt;A href="http://www.alfresco.org/model/system/1.0}store-identifier" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/system/1.0}store-identifier&lt;/A&gt; personal &lt;BR /&gt; {&lt;A href="http://www.alfresco.org/model/dictionary/1.0}text" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/dictionary/1.0}text&lt;/A&gt;&amp;nbsp; &lt;BR /&gt; false &lt;BR /&gt;{ &lt;A href="http://www.alfresco.org/model/system/1.0}node-dbid" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/system/1.0}node-dbid&lt;/A&gt; 407 &lt;BR /&gt; {&lt;A href="http://www.alfresco.org/model/dictionary/1.0}long" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/dictionary/1.0}long&lt;/A&gt;&amp;nbsp; &lt;BR /&gt; false &lt;BR /&gt;&lt;BR /&gt;Aspects {&lt;A href="http://www.alfresco.org/model/system/1.0}aspect_root" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/system/1.0}aspect_root&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Permissions Inherit: true &lt;BR /&gt;&lt;BR /&gt;Assigned Permission To Authority Access &lt;BR /&gt;&lt;BR /&gt;Children Child Name Child Node Primary Association Type Index &lt;BR /&gt;&lt;BR /&gt;Associations To Node Association Type &lt;BR /&gt;&lt;BR /&gt;Parents Child Name Parent Node Primary Association Type&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Do I have to create a new node for each folder (which is a child of the root node of the store) through a "child association" and then create a folder in this new node (through a "contain association")?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But, in any case, I should see a folder called "jonas" hanging on root node… and as far as I know, "personal" store does not contain anything…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could it be a problem with the path(which is "null") or the name when creating the ParentReference object?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be very much appreciatted &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Enrique&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2006 16:16:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-create-a-folder-in-a-store/m-p/61189#M37941</guid>
      <dc:creator>doblek</dc:creator>
      <dc:date>2006-11-03T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot create a Folder in a Store</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/cannot-create-a-folder-in-a-store/m-p/61190#M37942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It was my mistake…&amp;nbsp; &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;ops:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The line I thought it was executing the CML command, it actually does not do that… it's just part of the creation of the command…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The CML command executes when updating the repository…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now that I have this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;//Create a new folder (child of root node in store)&lt;BR /&gt;//Create reference to the store where this folder is going to be placed. This folder hangs from the root node as its child.&lt;BR /&gt;ParentReference parent_folder_ref = new ParentReference(almacen, almacen_root.getUuid(), null, Constants.ASSOC_CONTAINS, "{user_folder}"+folder_name);&lt;BR /&gt;trace += " parent reference created:&amp;lt;BR&amp;gt;";&lt;BR /&gt;NamedValue[] folder_properties = new NamedValue[]{new NamedValue(Constants.PROP_NAME, false, folder_name, null)};&lt;BR /&gt;&lt;BR /&gt;//Create the command (based on the previous reference)&lt;BR /&gt;CMLCreate create_folder = new CMLCreate(folder_name, parent_folder_ref, Constants.TYPE_FOLDER, folder_properties);&lt;BR /&gt;CML cml = new CML();&lt;BR /&gt;cml.setCreate(new CMLCreate[]{create_folder});&lt;BR /&gt;trace += " command created&amp;lt;BR&amp;gt;";&lt;BR /&gt;&lt;BR /&gt;//Execute the command&lt;BR /&gt;WebServiceFactory.getRepositoryService().update(cml);&amp;nbsp;&amp;nbsp;&amp;nbsp; //This is the missing line&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I see some changes expected in Alfresco:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Node Identifier Primary Path: /&amp;nbsp; &lt;BR /&gt;Reference: workspace://personal/a0bb0866-6e81-11db-b14b-fbaff357da54 &lt;BR /&gt;Type: {&lt;A href="http://www.alfresco.org/model/system/1.0}store_root" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/system/1.0}store_root&lt;/A&gt; &lt;BR /&gt;Parent:&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;[…]&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Children Child Name Child Node Primary Association Type Index &lt;BR /&gt;{user_folder}jonas workspace://personal/63f80dac-6f4c-11db-8930-df44c0173c45 true {&lt;A href="http://www.alfresco.org/model/content/1.0}contains" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}contains&lt;/A&gt; 0 &lt;BR /&gt;{user_folder}jonas workspace://personal/65ed58d3-6f4d-11db-9132-2fa3219893eb true {&lt;A href="http://www.alfresco.org/model/content/1.0}contains" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/content/1.0}contains&lt;/A&gt; 1 &lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Though I don't see why Alfresco has let me create two folders very similar (if not equal)… I have to study this more deeply because now I see in Tomcat's log a warning from the "node integrity checker", letting me know that it has found 2 integrity violations (Duplicate child associations are not allowed). So I suppose I've tried to create three folders with the same name…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I've managed to create the folder &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question now is… how can I navigate to that folder?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Enrique&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2006 17:55:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/cannot-create-a-folder-in-a-store/m-p/61190#M37942</guid>
      <dc:creator>doblek</dc:creator>
      <dc:date>2006-11-08T17:55:03Z</dc:date>
    </item>
  </channel>
</rss>

