cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Content Model in Alfresco Labs

nimrod
Champ in-the-making
Champ in-the-making
Hello!

Please excuse my bad English!

I have just installed Alfresco Labs and now I want to implement a custom content model. I followed the Instructions of the following Guide:

Alfresco Developer Guide Chapter No. 3 "Working with Content Models" http://agylen.com/wp-content/uploads/alfresco-developer-guide-sample-chapter-chapter-3-working-with-...

When I do all this and restart the tomcat I get the following Log:

10:38:16,508  ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'someco.dictionaryBootstrap' defined in file [/home/user/Alfresco/tomcat/shared/classes/alfresco/extension/someco-model-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not find bootstrap model /home/user/Alfresco/tomcat/shared/classes/alfresco/extension/scmodel.xml
                
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: Could not find bootstrap model /home/user/Alfresco/tomcat/shared/classes/alfresco/extension/scmodel.xml
                
   at org.alfresco.repo.dictionary.DictionaryBootstrap.initDictionary(DictionaryBootstrap.java:135)
   at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:108)
   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:1240)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1205)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
   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:525)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
   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:516)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
   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:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 

Who knows what went wrong? The file exists in this location.

Thanks for your help in advance!
3 REPLIES 3

phemelo
Champ in-the-making
Champ in-the-making
Hi all
can anyone please help with the above problem i have the exact same problem and i have googled but i cant seem to find the solution
:cry:  if there is a soul with the knowledge to assist please do. I have used the example that came with the book (Jeff Potts), so i dont have any errors when i run ant but alfresco gives the Context initialization failed error




Thanks in advance.

norgan
Champ in-the-making
Champ in-the-making
Check on the commandline, if there really does exists this file :
Could not find bootstrap model /home/user/Alfresco/tomcat/shared/classes/alfresco/extension/scmodel.xml

If not, check for the <filename>.zip file, which you use to deploy the changes. Your deployment setup is probably not working correctly. Either you forgot to adapt the biold properties or the build process did not finish or maybe you do not have the correct rights.

Norgan

notherien
Champ in-the-making
Champ in-the-making
change the bean id from "someco.dictionaryBootstrap" to "extension.dictionaryBootstrap" on custom-model-context.xml

and the model name from "sc:somecomodel" to "custom:customModel" on the "scModel.xml"

u can also change:
<namespaces>
<namespace uri="http://www.someco.com/model/content/1.0" prefix="sc" />
</namespaces>
to
<namespaces>
      <namespace uri="custom.model" prefix="custom"/>
   </namespaces>

and all "sc:*" (like <type name="sc:doc">) to "cusom:*" (like <type name="custom:doc">) on "scModel.xml"

bonne chance