AnsweredAssumed Answered

Bootstrap Categories

Question asked by buurd on Sep 23, 2008
Hi!

I'm trying to import categories for my module to make sure that they exist. Since I'm going to package my modifications as an amp-file I'd like the import to happen automatically at installation of the amp. Is it possible in the first place to import categories this way?

My bootstrap-context.xml contains the following bean:

<bean id="jkp_bootstrapSpaces" class="org.alfresco.repo.module.ImporterModuleComponent"
      parent="module.baseComponent">
      <property name="moduleId" value="jkp" />
      <property name="name" value="jkp.bootstrapSpaces" />
      <property name="description" value="Initial data requirements" />
      <property name="sinceVersion" value="0.1" />
      <property name="appliesFromVersion" value="0.1" />
      
      <property name="bootstrapViews">
         <list>
            <props>
               <prop key="path">/cm:categoryRoot/cm:generalclassifiable</prop>
               <prop key="location">alfresco/module/jkp/context/iso82045_categories.xml</prop>
            </props>
         </list>
      </property>
   </bean>

Right now in an attempt to  make sure that my configuration works,  I'm using the https://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/repository/config/alfresco/bootstrap/categories.xml as source for my categories (downloaded and renamed according to the configuration-file).

I have tried to follow the example at: http://wiki.alfresco.com/wiki/Bootstrap_Data and adapt it for my purpose. When starting the Alfresco server i get the following error:

Caused by: org.alfresco.error.AlfrescoRuntimeException: Property 'importerBootstrap' has not been set: ModuleComponent[module=jkp, name=jkp_bootstrapSpaces, since=0.1, appliesFrom=0.1, appliesTo=999, onceOnly=true]
        at org.alfresco.util.PropertyCheck.mandatory(PropertyCheck.java:50)
        at org.alfresco.repo.module.ImporterModuleComponent.checkProperties(ImporterModuleComponent.java:87)
        at org.alfresco.repo.module.AbstractModuleComponent.execute(AbstractModoleComponent.java:340)
        at org.alfresco.repo.module.ModuleComponentHelper.executeComponent(ModuleComponentHelper.java:578)
        at org.alfresco.repo.module.ModuleComponentHelper.startModule(ModuleComponentHelper.java:497)
        at org.alfresco.repo.module.ModuleComponentHelper.access$000(ModuleComponentHelper.java:61)

Is there anyone out there who could point out what I have done wrong?

Thanks in advance
Roland

Outcomes