cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble Importing User Groups in bootstrap-context.xml

mikeshultz
Champ in-the-making
Champ in-the-making
Hello, I'm having a problem importing user groups in Alfresco.  I exported my group using the "Export" feature in the "Administration Console" which yielded an acp file that contained the group's export information.  Then I modified the bootstrap-context.xml to include the group during the first startup.

So I took a clean version of Alfresco (no alf data, new db instance), build and deployed my xml file and no luck (but my spaces deployed just fine).  Where I'm having the problem is in the bootstrap-context.xml file (see code below).  My path is current set to ${system.system_container.childname} but when Alfresco reads this parameter, it appends and extra system reference like so:

This is what it should look like:

/{http://www.alfresco.org/model/system/1.0}system/{http://www.alfresco.org/model/system/1.0}authoritie...

This is what I get:

/{http://www.alfresco.org/model/system/1.0}system/{http://www.alfresco.org/model/system/1.0}system/{ht...

system.system_container.childname is mapped out to sys:system in my repository properties file.  I've tried using sys:system in the path, but it yields the same results.

I've tried using "/" and no path in the path property, but both generate a stack trace.  I've tried removing any reference to sys:system in the OneGroupOnly.xml file, but that didn't help.

Any insight or suggestions would be greatly appreciated.  Thanks.

Here is a snippet from my bootstrap-context.xml file:


  <bean id="warehouseManager.bootstrapGroups" class="org.alfresco.repo.module.ImporterModuleComponent"
                                        parent="module.baseComponent">
    <property name="moduleId" value="warehouseManager" />
    <property name="name" value="warehouseManager.bootstrapGroups" />
    <property name="description" value="Initial data requirements" />
    <property name="sinceVersion" value="1.0" />
    <property name="appliesFromVersion" value="1.0" />
    <property name="importer" ref="userBootstrap"/>
   <property name="bootstrapViews">
     <list>
      <props>
        <prop key="path">/${system.system_container.childname}</prop>
        <prop key="location">alfresco/module/warehouseManager/bootstrap/OneGroupOnly.xml</prop>
      </props>
     </list>
   </property>
  </bean>



This is my full OneGroupOnly.xml file (which has one user, "reviewer"):


<?xml version="1.0" encoding="UTF-8"?>
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0">
  <view:reference xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns="" view:pathref="/">
    <view:aspects>
      <sys:aspect_root></sys:aspect_root>
    </view:aspects>
    <view:properties>
      <sys:node-uuid>0f19f414-58ef-11dd-9c06-992d91a6e0f8</sys:node-uuid>
      <sys:node-dbid>1</sys:node-dbid>
      <sys:store-protocol>user</sys:store-protocol>
      <cm:name>0f19f414-58ef-11dd-9c06-992d91a6e0f8</cm:name>
      <sys:store-identifier>alfrescoUserStore</sys:store-identifier>
    </view:properties>
    <view:associations>
      <sys:children>
        <sys:container view:childName="sys:system">
          <view:aspects>
            <sys:referenceable></sys:referenceable>
          </view:aspects>
          <view:properties>
            <sys:node-uuid>0f6fdc46-58ef-11dd-9c06-992d91a6e0f8</sys:node-uuid>
            <sys:node-dbid>2</sys:node-dbid>
            <sys:store-protocol>user</sys:store-protocol>
            <cm:name>0f6fdc46-58ef-11dd-9c06-992d91a6e0f8</cm:name>
            <sys:store-identifier>alfrescoUserStore</sys:store-identifier>
          </view:properties>
          <view:associations>
            <sys:children>
              <sys:container view:childName="sys:people">
                <view:aspects>
                  <sys:referenceable></sys:referenceable>
                </view:aspects>
                <view:properties>
                  <sys:node-uuid>0fc0e27b-58ef-11dd-9c06-992d91a6e0f8</sys:node-uuid>
                  <sys:node-dbid>3</sys:node-dbid>
                  <sys:store-protocol>user</sys:store-protocol>
                  <cm:name>0fc0e27b-58ef-11dd-9c06-992d91a6e0f8</cm:name>
                  <sys:store-identifier>alfrescoUserStore</sys:store-identifier>
                </view:properties>
                <view:associations>
                  <sys:children>
                    <usr:user view:childName="usr:user">
                      <view:aspects>
                        <sys:referenceable></sys:referenceable>
                      </view:aspects>
                      <view:properties>
                        <usr:accountExpires>false</usr:accountExpires>
                        <usr:credentialsExpire>false</usr:credentialsExpire>
                        <usr:password>98bb35737013aaff03181d0fe9fda09e</usr:password>
                        <usr:accountLocked>false</usr:accountLocked>
                        <sys:node-uuid>ca8839ec-58f5-11dd-99cf-b177fea279e1</sys:node-uuid>
                        <sys:node-dbid>460</sys:node-dbid>
                        <usr:username>reviewer</usr:username>
                        <usr:salt>
                          <view:value view:isNull="true"></view:value>
                        </usr:salt>
                        <sys:store-protocol>user</sys:store-protocol>
                        <cm:name>ca8839ec-58f5-11dd-99cf-b177fea279e1</cm:name>
                        <usr:enabled>true</usr:enabled>
                        <sys:store-identifier>alfrescoUserStore</sys:store-identifier>
                      </view:properties>
                      <view:associations></view:associations>
                    </usr:user>
                  </sys:children>
                </view:associations>
              </sys:container>
              <sys:container view:childName="sys:authorities">
                <view:aspects>
                  <sys:referenceable></sys:referenceable>
                </view:aspects>
                <view:acl>
                  <view:ace view:access="ALLOWED">
                    <view:authority>GROUP_EVERYONE</view:authority>
                    <view:permission>Read</view:permission>
                  </view:ace>
                </view:acl>
                <view:properties>
                  <sys:node-uuid>0fe4be35-58ef-11dd-9c06-992d91a6e0f8</sys:node-uuid>
                  <sys:node-dbid>5</sys:node-dbid>
                  <sys:store-protocol>user</sys:store-protocol>
                  <cm:name>0fe4be35-58ef-11dd-9c06-992d91a6e0f8</cm:name>
                  <sys:store-identifier>alfrescoUserStore</sys:store-identifier>
                </view:properties>
                <view:associations>
                  <sys:children>
                    <usr:authorityContainer view:childName="usr:GROUP_TestGroupForAW">
                      <view:aspects>
                        <sys:referenceable></sys:referenceable>
                      </view:aspects>
                      <view:properties>
                        <sys:node-uuid>c3335018-58f3-11dd-99cf-b177fea279e1</sys:node-uuid>
                        <sys:node-dbid>457</sys:node-dbid>
                        <sys:store-protocol>user</sys:store-protocol>
                        <usr:members>
                          <view:values>
                            <view:value view:isNull="true"></view:value>
                            <view:value>reviewer</view:value>
                          </view:values>
                        </usr:members>
                        <cm:name>c3335018-58f3-11dd-99cf-b177fea279e1</cm:name>
                        <usr:authorityName>GROUP_TestGroupForAW</usr:authorityName>
                        <sys:store-identifier>alfrescoUserStore</sys:store-identifier>
                      </view:properties>
                      <view:associations></view:associations>
                    </usr:authorityContainer>
                  </sys:children>
                </view:associations>
              </sys:container>
            </sys:children>
          </view:associations>
        </sys:container>
      </sys:children>
    </view:associations>
  </view:reference>
</view:view>
1 REPLY 1

zaizi
Champ in-the-making
Champ in-the-making
Try this path
<prop key="path">/${alfresco_user_store.system_container.childname}/sys:authorities</prop>