AnsweredAssumed Answered

Singleton attribute invalid when trying to bootstrap folder

Question asked by kartech11 on Jul 16, 2018
Latest reply on Jul 19, 2018 by kartech11

I am currently looking to bootstrap my sites and folders to alfresco 5.2.3 enterprise server. I want to create a folder under Company Home/Data Dictionary

 

I have included the below bean to my bootstrap-context.xml. But I get the error that attribute singleton is not allowed to appear in element bean. 

 

Error trace

 

Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:alfresco/module/alfresco-bootstrap-platform-jar/context/bootstrap-context.xml]
Offending resource: URL [jar:file:/C:/dev/workspaces/intellij-workspaces/alfresco-bootstrap/target/tomcat/webapps/alfresco-bootstrap-platform/WEB-INF/lib/alfresco-bootstrap-platform-jar-1.0-SNAPSHOT.jar!/alfresco/module/alfresco-bootstrap-platform-jar/module-context.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 19 in XML document from class path resource [alfresco/module/alfresco-bootstrap-platform-jar/context/bootstrap-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 19; columnNumber: 85; cvc-complex-type.3.2.2: Attribute 'singleton' is not `
at 
Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 19 in XML document from class path resource [alfresco/module/alfresco-bootstrap-platform-jar/context/bootstrap-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 19; columnNumber: 85; cvc-complex-type.3.2.2: Attribute 'singleton' is not allowed to appear in element 'bean'.
at 

 

bootstrap-context.xml as below

<bean id="customSpacesBootstrap" parent="spacesStoreImporter" singleton="true" >
    <property name="useExistingStore">
        <value>${alfresco-bootstrap-platform-jar.bootstrap.data}</value>
    </property>
    <property name="bootstrapViews">
        <list>
            <props>
                <prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}</prop>
                <prop key="location">alfresco/module/alfresco-bootstrap-platform-jar/bootstrap/config_email_templates.xml</prop>
            </props>
        </list>
    </property>
</bean>

My config_email_templates.xml file has the below content

<view:view xmlns:view='http://www.alfresco.org/view/repository/1.0'
           xmlns:cm='http://www.alfresco.org/model/content/1.0' xmlns:app='http://www.alfresco.org/model/application/1.0'>

    <cm:folder view:childName='cm:My First Folder'>
        <app:uifacets />
        <cm:name>My First Folder</cm:name>
        <app:icon>space-icon-default</app:icon>
        <cm:title>My First Folder</cm:title>
        <cm:description></cm:description>
    </cm:folder>
</view:view>

Outcomes