cancel
Showing results for 
Search instead for 
Did you mean: 

someco sample: Could not import custom model

lucasmauricio
Champ in-the-making
Champ in-the-making
hi folks,

I am following the tutorial at the following url http://ecmarchitect.com/images/articles/alfresco-content/content-article-2ed.pdf, where Jeff Potts shows how to implement and deploy custom models.

My setup:
  • Debian Wheezy amd64

  • Java 1.6.0_24

  • OpenJDK Runtime Environment (IcedTea6 1.11.4) (6b24-1.11.4-3)

  • OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

  • Alfresco 4.0.e Community, WAR-only distribution

  • Embedded Tomcat and Postgre
Since I tried to implement and deploy a custom model, nothing have worked for me… I saw a couple of posts in this forum (here, here and here) but they didn't help me.

So, I decided to try to make things simple: I created a simple model that defines two types just to make things work. My steps are shown above:

my /opt/alfresco-4.0.e/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/core-services-context.xml has this customizations:


    <bean id="dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="resourceBundles">
        <property name="models">
            <list>
                <!– System models  –>
                <value>alfresco/model/dictionaryModel.xml</value>
                <value>alfresco/model/systemModel.xml</value>
                <value>org/alfresco/repo/security/authentication/userModel.xml</value>

                <!– Content models –>
                <value>alfresco/model/contentModel.xml</value>

                <value>alfresco/extension/someco-model-context.xml</value>
            </list>
        </property>


my complete /opt/alfresco-4.0.e/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/someco-model-context.xml is

<?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="someco.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/model/scModel.xml</value>
            </list>
        </property>
    </bean>

</beans>

my complete /opt/alfresco-4.0.e/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/model/scModel.xml is

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="sc:somecomodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>Someco Model - simplified</description>
   <author>Jeff Potts</author>
   <version>1.0</version>

   <!– Imports are required to allow references to definitions in other 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="http://www.someco.com/model/content/1.0" prefix="sc" />
   </namespaces>

   <types>
      <!– Enterprise-wide generic document type –>
      <type name="sc:doc">
         <title>Someco Document</title>
         <parent>cm:content</parent>
      </type>

      <type name="sc:whitepaper">
         <title>Someco Whitepaper</title>
         <parent>sc:doc</parent>
      </type>
   </types>
</model>

But it doesn't work yet! This is what I got in logs/catalina.out:

[alfresco/core-services-context.xml]: Cannot resolve reference to bean 'nodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeRefPropertyInterceptor' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'mlAwareNodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mlAwareNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'mtAwareNodeService' while setting bean property 'defaultBinding'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mtAwareNodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting bean property 'dictionaryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 08290001 Could not import bootstrap model alfresco/extension/someco-model-context.xml
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   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:4135)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
   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:445)
   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.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeRefPropertyInterceptor' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'mlAwareNodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mlAwareNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'mtAwareNodeService' while setting bean property 'defaultBinding'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mtAwareNodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting bean property 'dictionaryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 08290001 Could not import bootstrap model alfresco/extension/someco-model-context.xml
   at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
   at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1429)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
   … 40 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeRefPropertyInterceptor' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'mlAwareNodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mlAwareNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'mtAwareNodeService' while setting bean property 'defaultBinding'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mtAwareNodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting bean property 'dictionaryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 08290001 Could not import bootstrap model alfresco/extension/someco-model-context.xml
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.springframework.aop.framework.ProxyFactoryBean.initializeAdvisorChain(ProxyFactoryBean.java:454)
   at org.springframework.aop.framework.ProxyFactoryBean.getObject(ProxyFactoryBean.java:240)
   at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
   … 45 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mlAwareNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'mtAwareNodeService' while setting bean property 'defaultBinding'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mtAwareNodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting bean property 'dictionaryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 08290001 Could not import bootstrap model alfresco/extension/someco-model-context.xml
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
   … 57 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mtAwareNodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting bean property 'dictionaryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 08290001 Could not import bootstrap model alfresco/extension/someco-model-context.xml
   at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
   at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1429)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
   … 67 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbNodeService' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting bean property 'dictionaryService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 08290001 Could not import bootstrap model alfresco/extension/someco-model-context.xml
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.springframework.aop.framework.ProxyFactoryBean.freshTargetSource(ProxyFactoryBean.java:571)
   at org.springframework.aop.framework.ProxyFactoryBean.getSingletonInstance(ProxyFactoryBean.java:305)
   at org.springframework.aop.framework.ProxyFactoryBean.getObject(ProxyFactoryBean.java:242)
   at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
   … 72 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 08290001 Could not import bootstrap model alfresco/extension/someco-model-context.xml
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:281)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
   … 85 more
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 08290001 Could not import bootstrap model alfresco/extension/someco-model-context.xml
   at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:158)
   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:1544)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
   … 94 more
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 08290000 Failed to parse model
   at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:102)
   at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:88)
   at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:147)
   … 102 more
Caused by: org.jibx.runtime.JiBXException: No unmarshaller for element "beans" (line 4, col 😎
   at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2754)
   at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2900)
   at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:97)
   … 104 more

Any idea where I got wrong?
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
First you shouln't be hacking files below web inf.

Second you are loading a spring context file instead of a model in your hacked core services.

lucasmauricio
Champ in-the-making
Champ in-the-making
mrogers,

I did as I read in the article but I got your message!

ok, I must not touch files in web-inf. Where can I put my files?

Going on, I skipped the file someco-model-context.xml and linked my scModel.xml directly in core-services-context.xml. There is no error in my log anymore. But I cannot see my types in Share. It should be there, right?

Another issue, despite the spring context thing, how should I centralize my customization?

thanks!

mrogers
Star Contributor
Star Contributor
You probablyneed to configure share as well as adding your model to the repo.

Your custom configuration should be placed in the "shared" folder and not within the exploded war file.   This will greatly help you when re-installing, backing up and upgrading.

So TOMCAT_HOME/shared/classes/alfresco/extension/someco-model-context.xml