cancel
Showing results for 
Search instead for 
Did you mean: 

Bootstrap error

bvanyolos
Champ in-the-making
Champ in-the-making
I wanted to try the Content model example with these xml-s:

<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'><beans>  <!– Registration of new models –>  <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">    <property name="models">      <list>        <value>          alfresco/extension/model/scModel.xml        </value>      </list>    </property>  </bean></beans>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

<?xml version="1.0" encoding="UTF-8"?><!– Definition of new Model –><model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">  <!– Optional meta-data about the model –>  <description>Someco Model</description>  <author>Optaros</author>  <version>1.0</version>  <!– Imports are required to allow references to definitions inother models –>  <imports>    <!– Import Alfresco Dictionary Definitions –>    <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />    <!– Import Alfresco Content Domain Model Definitions –>    <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />  </imports>  <!– Introduction of new namespaces defined by this model –>  <namespaces>    <namespace uri="custom.model" prefix="custom" />  </namespaces>  <types>    <!– Enterprise-wide generic document type –>    <type name="custom:doc">      <title>Someco Document</title>      <parent>cm:content</parent>    </type>    <type name="custom:marketingDoc">      <title>Someco Marketing Document</title>      <parent>custom:doc</parent>    </type>    <type name="custom:whitepaper">      <title>Someco Whitepaper</title>      <parent>custom:marketingDoc</parent>    </type>  </types></model>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

I got this error during Tomcat restart:

ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'extension.dictionaryBootstrap' defined in file [C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\someco-model-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 01180000 Could not find bootstrap model alfresco/extension/model/scModel.xml

   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1401)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
   at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 01180000 Could not find bootstrap model alfresco/extension/model/scModel.xml

   at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:143)
   at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:105)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1529)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1468)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398)

Please help me how could I create a custom content model, then how could I use that.
Thanks in advance!
2 REPLIES 2

mitpatoliya
Star Collaborator
Star Collaborator
I think Alfresco is not able to find your model file.
You need to put your model file on the location which is specified in your bootstrap file.
i.e. <TOMCAT_HOME>web-apps/alfresco/WEB-INF/classes/Alfresco/extension/
Under above mentioned location.

amitabhandari1
Champ in-the-making
Champ in-the-making
Hi AlfresoUser.

There is problem in  deploying of custom model in alfresco 3.4 .
Try   to make changes as suggested below:
Go to tomcat/webapps/alfresoc/WEB-INF/classes/alfresco/extension/quickr-model-context.xml. Make the highlighted change there.
<beans>

    <!– Registration of new models –>   
    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/quickrModel.xml</value>
                <value>alfresco/extension/model/scModel.xml </value>
            </list>
        </property>
    </bean>
</beans>

Start your server again.This time your model will be deployed.

Thanks,