cancel
Showing results for 
Search instead for 
Did you mean: 

custom-model-context.xml error

notherien
Champ in-the-making
Champ in-the-making
I've added a new custom aspect by changing "customModel.xml" and "web-client-config-custom.xml" files on extension folder (C:\Alfresco\tomcat\shared\classes\alfresco\extension)

However,when I rename the custom-model-context.xml.sample file to custom-model-context.xml in extension folder, alfresco generates this error:
11:25:48,752 ERROR [org.springframework.web.context.ContextLoader] Context initialization failedorg.alfresco.error.AlfrescoRuntimeException: 09190001 Workflow deployment failed   at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:336)   at org.alfresco.repo.workflow.WorkflowDeployer$1.doWork(WorkflowDeployer.java:443)   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:489)   at org.alfresco.repo.workflow.WorkflowDeployer.onBootstrap(WorkflowDeployer.java:439)   at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)   at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)   at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:617)   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)   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.deployDescriptor(HostConfig.java:627)   at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)   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)Caused by: org.alfresco.service.namespace.NamespaceException: Namespace prefix scwf is not mapped to a namespace URI   at org.alfresco.service.namespace.QName.createQName(QName.java:105)   at org.alfresco.service.namespace.QName.createQName(QName.java:127)   at org.alfresco.repo.workflow.jbpm.JBPMEngine.getTaskDefinition(JBPMEngine.java:1873)   at org.alfresco.repo.workflow.jbpm.JBPMEngine.createWorkflowTaskDefinition(JBPMEngine.java:2890)   at org.alfresco.repo.workflow.jbpm.JBPMEngine.createWorkflowDefinition(JBPMEngine.java:2828)   at org.alfresco.repo.workflow.jbpm.JBPMEngine.createWorkflowDeployment(JBPMEngine.java:2903)   at org.alfresco.repo.workflow.jbpm.JBPMEngine$1.doInJbpm(JBPMEngine.java:319)   at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:338)   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)   at org.alfresco.repo.workflow.jbpm.JBPMEngine.deployDefinition(JBPMEngine.java:308)   at org.alfresco.repo.workflow.WorkflowServiceImpl.deployDefinition(WorkflowServiceImpl.java:174)   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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)   at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)   at $Proxy44.deployDefinition(Unknown Source)   at org.alfresco.repo.workflow.WorkflowDeployer.init(WorkflowDeployer.java:306)   … 38 more‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

help me please
thanks
11 REPLIES 11

mrogers
Star Contributor
Star Contributor
Your exception contains the following.
"Namespace prefix scwf is not mapped to a namespace URI"

I presume scwf is one of yours?

notherien
Champ in-the-making
Champ in-the-making
thank u mrogers for ur replay, but excuse me, i don't understand ur response

this is the full code for customModel.xml and  web-client-config-custom.xml files:

customModel.xml
<?xml version="1.0" encoding="UTF-8"?><!– Custom Model –><!– Note: This model is pre-configured to load at startup of the Repository.  So, all custom –><!–       types and aspects added here will automatically be registered –><model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">   <!– Optional meta-data about the model –>      <description>Custom Model</description>   <author></author>   <version>1.0</version>   <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 –>   <!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>   <namespaces>      <namespace uri="custom.model" prefix="custom"/>   </namespaces>       <!– Moughaoui custom aspect =====================================================================================–><aspects><!– Definition of new Content Aspect: Customer Details –>   <aspect name="custom:CustomerDetails">      <title>Customer Details</title>      <properties>         <property name="custom:CustomerName">            <title>Customer Name</title>            <type>d:text</type>            <protected>false</protected>            <mandatory>false</mandatory>            <multiple>false</multiple>         </property>         <property name="custom:CustomerContactName">            <title>Customer Contact Name</title>            <type>d:text</type>         </property>         <property name="custom:CustomerContactPhone">            <title>Customer Contact Phone</title>            <type>d:text</type>         </property>         <property name="custom:CustomerProjectID">            <title>Customer Project ID</title>            <type>d:int</type>         </property>         <property name="custom:NewCustomer">            <title>New Customer</title>            <type>d:boolean</type>            <default>true</default>         </property>      </properties>   </aspect></aspects>   <!– Moughaoui custom aspect =====================================================================================–></model>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

web-client-config-custom.xml
<alfresco-config>   <!– Example of overriding the from email address –>   <!–   <config>      <client>         <from-email-address>someone@your-domain.com</from-email-address>         <search-max-results>100</search-max-results>      </client>   </config>   –>   <!– Example of adding languages to the list in the login page –>   <!–   <config evaluator="string-compare" condition="Languages">      <languages>         <language locale="ca_ES">Catalan</language>         <language locale="hr_HR">Croatian</language>         <language locale="cs_CZ">Czech</language>         <language locale="da_DK">Danish</language>         <language locale="de_DE">German</language>         <language locale="es_ES">Spanish</language>         <language locale="el_GR">Greek</language>         <language locale="fi_FI">Finnish</language>         <language locale="fr_FR">French</language>         <language locale="it_IT">Italian</language>         <language locale="ja_JP">Japanese</language>         <language locale="du_NL">Dutch</language>         <language locale="pl_PL">Polish</language>         <language locale="pt_PT">Portuguese</language>         <language locale="pt_BR">Portuguese (Brazilian)</language>         <language locale="ru_RU">Russian</language>         <language locale="sv_SV">Swedish</language>         <language locale="tr_TR">Turkish</language>         <language locale="zh_CN">Simplified Chinese</language>      </languages>   </config>   –>      <!– Example of configuring advanced search –>   <!–   <config evaluator="string-compare" condition="Advanced Search">      <advanced-search>         <content-types>         </content-types>         <custom-properties>            <meta-data aspect="app:simpleworkflow" property="app:approveStep" />         </custom-properties>      </advanced-search>   </config>   –>   <!– Example of changing the sort direction for a view in the client –>   <!–   <config evaluator="string-compare" condition="Views">      <views>         <view-defaults>            <topic>               <sort-direction>ascending</sort-direction>            </topic>         </view-defaults>      </views>   </config>   –>   <!– Example of adding a custom icon to the Create Space dialog –>   <!–   <config evaluator="string-compare" condition="cm:folder icons">      <icons>         <icon name="space-icon-custom" path="/images/icons/space-icon-custom.gif" />      </icons>   </config>   –>   <!– The config below shows how to incorporate the example model–>   <!– into the web client, for this to work you will need to –>   <!– rename example-model-context.xml.sample to example-model-context.xml –>   <!–   <config evaluator="string-compare" condition="Content Wizards">      <content-types>         <type name="my:sop" />      </content-types>   </config>   <config evaluator="node-type" condition="my:sop">      <property-sheet>         <show-property name="mimetype" display-label-id="content_type"                         component-generator="MimeTypeSelectorGenerator" />         <show-property name="size" display-label-id="size"                         converter="org.alfresco.faces.ByteSizeConverter"                         show-in-edit-mode="false" />                        <show-property name="my:publishedDate" />         <show-association name="my:signOff" />         <show-property name="my:authorisedBy" />         <show-child-association name="my:processSteps" />      </property-sheet>   </config>   <config evaluator="aspect-name" condition="my:imageClassification">      <property-sheet>         <show-property name="my:width"/>         <show-property name="my:height"/>         <show-property name="my:resolution"/>      </property-sheet>   </config>   <config evaluator="string-compare" condition="Action Wizards">      <aspects>         <aspect name="my:imageClassification"/>      </aspects>   </config>   <config evaluator="string-compare" condition="Advanced Search">      <advanced-search>         <content-types>            <type name="my:sop" />         </content-types>         <custom-properties>            <meta-data type="my:sop" property="my:authorisedBy" />            <meta-data aspect="my:imageClassification" property="my:resolution" />         </custom-properties>      </advanced-search>   </config>   –>   <!– Moughaoui custom aspect =====================================================================================–><!– Lists the custom aspect in business rules Action wizard –><config evaluator="string-compare" condition="Action Wizards">   <aspects>      <aspect name="custom:CustomerDetails"/>   </aspects></config><!– Displays the properties in view details page –><config evaluator="aspect-name" condition="custom:CustomerDetails">   <property-sheet>      <separator name="sepCust1" display-label="Customer Details" component-generator="HeaderSeparatorGenerator" />      <show-property name="custom:CustomerName"/>      <show-property name="custom:CustomerContactName"/>      <show-property name="custom:CustomerContactPhone"/>      <show-property name="custom:CustomerProjectID"/>      <show-property name="custom:NewCustomer"/>   </property-sheet></config>   <!– Moughaoui custom aspect =====================================================================================–></alfresco-config>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

thanks 4 ur help

tonyc
Champ in-the-making
Champ in-the-making
The exception you are getting is with the name space "scwf" which must be getting called from somewhere else.  That name space (scwf) is not in your custom model you have posted, was there any other models that you may have added?    Your problem appears to be located elsewhere.

notherien
Champ in-the-making
Champ in-the-making
thanks tonyc, this is my only model
this is my log file:

19 oct. 2009 14:26:20 org.apache.coyote.http11.Http11Protocol initINFO: Initialisation de Coyote HTTP/1.1 sur http-808019 oct. 2009 14:26:20 org.apache.catalina.startup.Catalina loadINFO: Initialization processed in 431 ms19 oct. 2009 14:26:20 org.apache.catalina.core.StandardService startINFO: D´┐¢marrage du service Catalina19 oct. 2009 14:26:20 org.apache.catalina.core.StandardEngine startINFO: Starting Servlet Engine: Apache Tomcat/6.0.1819 oct. 2009 14:26:21 org.apache.catalina.core.StandardContext addApplicationListenerINFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.14:26:25,872  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]14:26:25,888  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]14:26:25,888  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from URL [file:/C:/Alfresco/tomcat/shared/classes/alfresco-global.properties]14:26:25,950  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]14:26:36,466  ERROR [web.context.ContextLoader] Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'extension.dictionaryBootstrap' defined in file [C:\Alfresco\tomcat\shared\classes\alfresco\extension\custom-model-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: 09190001 Could not import bootstrap model alfresco/extension/customModel.xmlCaused by: org.alfresco.service.cmr.dictionary.DictionaryException: 09190001 Could not import bootstrap model alfresco/extension/customModel.xml        at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:151)        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:1242)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1208)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)        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.deployDescriptor(HostConfig.java:627)        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)        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)Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 09190000 Failed to parse model        at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:99)        at org.alfresco.repo.dictionary.DictionaryBootstrap.onDictionaryInit(DictionaryBootstrap.java:146)        … 43 moreCaused by: org.jibx.runtime.JiBXException: Error parsing document (line 34, col 11)        at org.jibx.runtime.impl.XMLPullReaderFactory$XMLPullReader.next(XMLPullReaderFactory.java:285)        at org.jibx.runtime.impl.UnmarshallingContext.isAt(UnmarshallingContext.java:598)        at org.alfresco.repo.dictionary.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2bindingM2Property_access.isPresent()        at org.alfresco.repo.dictionary.JiBX_MungeAdapter.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2binding_unmarshal_1_10()        at org.alfresco.repo.dictionary.M2Class.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2binding_unmarshal_1_1(M2Class.java)        at org.alfresco.repo.dictionary.M2Aspect.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2binding_unmarshal_2_0(M2Aspect.java)        at org.alfresco.repo.dictionary.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2bindingM2Aspect_access.unmarshal()        at org.alfresco.repo.dictionary.JiBX_MungeAdapter.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2binding_unmarshal_1_5()        at org.alfresco.repo.dictionary.M2Model.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2binding_unmarshal_1_0(M2Model.java)        at org.alfresco.repo.dictionary.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2bindingM2Model_access.unmarshal()        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2773)        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2916)        at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:94)        … 44 more19 oct. 2009 14:26:36 org.apache.catalina.core.StandardContext startGRAVE: Error listenerStart19 oct. 2009 14:26:36 org.apache.catalina.core.StandardContext startGRAVE: Erreur de d´┐¢marrage du contexte [/alfresco] suite aux erreurs pr´┐¢c´┐¢denteslog4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.19 oct. 2009 14:26:37 org.apache.catalina.startup.HostConfig deployWARINFO: D´┐¢ploiement de l'archive mobile.war de l'application web14:26:38,357  INFO  [alfresco.config.JBossEnabledWebApplicationContext] Refreshing org.alfresco.config.JBossEnabledWebApplicationContext@4aa085: display name [Root WebApplicationContext]; startup date [Mon Oct 19 14:26:38 GMT 2009]; root of context hierarchy14:26:38,670  INFO  [alfresco.config.JBossEnabledWebApplicationContext] Bean factory for application context [org.alfresco.config.JBossEnabledWebApplicationContext@4aa085]: org.springframework.beans.factory.support.DefaultListableBeanFactory@55800414:26:39,779  INFO  [web.scripts.DeclarativeRegistry] Registered 24 Web Scripts (+0 failed), 26 URLs14:26:39,779  INFO  [web.scripts.AbstractRuntimeContainer] Initialised Presentation Web Script Container (in 189.16113ms)14:26:39,951  INFO  [web.scripts.DeclarativeRegistry] Registered 42 Web Scripts (+0 failed), 44 URLs14:26:39,967  INFO  [web.scripts.AbstractRuntimeContainer] Initialised WebFramework Web Script Container (in 170.0671ms)14:26:40,013  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework19 oct. 2009 14:26:40 org.apache.catalina.startup.HostConfig deployWARINFO: D´┐¢ploiement de l'archive share.war de l'application web14:26:42,607  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework19 oct. 2009 14:26:42 org.apache.catalina.startup.HostConfig deployWARINFO: D´┐¢ploiement de l'archive studio.war de l'application web14:29:46,166  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework19 oct. 2009 14:29:59 org.apache.coyote.http11.Http11Protocol startINFO: D´┐¢marrage de Coyote HTTP/1.1 sur http-808019 oct. 2009 14:29:59 org.apache.catalina.startup.Catalina startINFO: Server startup in 218653 ms‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

tonyc
Champ in-the-making
Champ in-the-making
I was able to import your customModel.xml into my installation successfully, and I don't see any problems with your customModel.xml file.   Could you post the contents of your model context file that registers your model?  The default file is custom-model-context.xml in extension dir.

notherien
Champ in-the-making
Champ in-the-making
merci tonyc, this is my custom-model-context.xml:
<?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/customModel.xml</value>            </list>        </property>    </bean>          </beans>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

mrogers
Star Contributor
Star Contributor
Does your instance of alfresco run without your custom aspect?    

I suspect that the custom aspect is not what is causing your problem.

lckaley
Champ in-the-making
Champ in-the-making
I am experiencing the same error, and it appears I am using the same sample code, with a few modifications.


13:09:35,250  ERROR [web.context.ContextLoader] Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'extension.dictionaryBootstrap' defined in file [C:\Alfresco\tomcat\shared\classes\alfresco\extension\custom-model-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/extension/customModel.xmlCaused by: org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/extension/customModel.xml        at org.alfresco.repo.dictionary.DictionaryBootstrap.initDictionary(DictionaryBootstrap.java:147)        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:1242)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1208)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)        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)Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: Failed to parse model        at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:99)        at org.alfresco.repo.dictionary.DictionaryBootstrap.initDictionary(DictionaryBootstrap.java:142)        … 42 moreCaused by: org.jibx.runtime.JiBXException: Expected "{http://www.alfresco.org/model/dictionary/1.0}property" end tag, found "{http://www.alfresco.org/model/dictionary/1.0}mandatory" start tag (line 133, col 27)        at org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag(UnmarshallingContext.java:800)        at org.alfresco.repo.dictionary.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2bindingM2Property_access.unmarshal()        at org.alfresco.repo.dictionary.JiBX_MungeAdapter.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2binding_unmarshal_1_10()        at org.alfresco.repo.dictionary.M2Class.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2binding_unmarshal_1_1(M2Class.java)        at org.alfresco.repo.dictionary.M2Aspect.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2binding_unmarshal_2_0(M2Aspect.java)        at org.alfresco.repo.dictionary.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2bindingM2Aspect_access.unmarshal()        at org.alfresco.repo.dictionary.JiBX_MungeAdapter.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2binding_unmarshal_1_5()        at org.alfresco.repo.dictionary.M2Model.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2binding_unmarshal_1_0(M2Model.java)        at org.alfresco.repo.dictionary.JiBX_root_projects_repository_source_java_org_alfresco_repo_dictionary_m2bindingM2Model_access.unmarshal()        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2773)        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2916)        at org.alfresco.repo.dictionary.M2Model.createModel(M2Model.java:94)        … 43 moreOct 19, 2009 1:09:35 PM org.apache.catalina.core.StandardContext start‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

here is my custom-model-context.xml

<?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/customModel.xml</value>            </list>        </property>    </bean>          </beans>‍‍‍‍‍‍‍‍‍‍‍‍‍

my web-client-config-custom.xml
<alfresco-config>  <config evaluator="string-compare" condition="Action Wizards">      <aspects>         <aspect name="custom:RecordDetails"/>      </aspects>        </config>   <!– Displays the properties in view details page –>   <config evaluator="aspect-name" condition="custom:RecordDetails">      <property-sheet>         <separator name="sepCust1" display-label="Record Details" component-generator="HeaderSeparatorGenerator" />         <show-property name="custom:MRNumber"/>         <show-property name="custom:FirstName"/>                  <show-property name="custom:LastName"/>         <show-property name="custom:AcctNumber"/>         <show-property name="custom:FileStatus"/>         <show-property name="custom:AdmissionType"/>       <show-property name="custom:DocType"/>      </property-sheet>   </config></alfresco-config>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

lckaley
Champ in-the-making
Champ in-the-making
here is my  customModel.xml,  Alfresco was working fine until I tried to define my aspect.  Thanks in advance for any help you can give
<?xml version="1.0" encoding="UTF-8"?><!– Custom Model –><!– Note: This model is pre-configured to load at startup of the Repository.  So, all custom –><!–       types and aspects added here will automatically be registered –><model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">   <!– Optional meta-data about the model –>      <description>Custom Model</description>   <author>ckaley</author>   <version>1.0</version>   <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 –>   <!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>   <namespaces>      <namespace uri="custom.model" prefix="custom"/>   </namespaces>   <constraints>   <constraint name="custom:doctype_list" type="LIST">         <parameter name="allowedValues">              <list>                  <value>CT Scan</value>                  <value>ER Note</value>                  <value>Lab Results</value>                  <value>Medical Exam</value>                  <value>Physicians Note</value>            <value>Medical Release</value>            <value>Xray</value>              <value>History and Physical</value>            <value>Discharge Summary</value>              </list>         </parameter>   </constraint>   <constraint name="custom:admission_list" type="LIST">         <parameter name="allowedValues">              <list>                  <value>In Patient</value>                  <value>Out Patient</value>              </list>         </parameter>   </constraint>   <constraint name="custom:name_length" type="LENGTH">         <parameter name="minLength">             <value>2</value>         </parameter>         <parameter name="maxLength">             <value>50</value>         </parameter>   </constraint>   <constraint name="custom:recnum_length" type="LENGTH">         <parameter name="minLength">             <value>11</value>         </parameter>         <parameter name="maxLength">             <value>11</value>         </parameter>   </constraint>   </constraints>         <aspects>            <!– Definition of new Content Aspect: Customer Details –>      <aspect name="custom:RecordDetails">         <title>Customer Details</title>         <properties>            <property name="custom:FirstName">               <title>First Name</title>               <type>d:text</type>               <protected>true</protected>               <mandatory>true</mandatory>               <multiple>false</multiple>          <index enabled="true">             <atomic>false</atomic>             <stored>false</stored>             <tokenised>true</tokenised>          </index>               <constraints>                 <constraint ref="custom:name_length"/>               </constraints>            </property>            <property name="custom:LastName">               <title>Last Name</title>               <type>d:text</type>               <protected>true</protected>               <mandatory>true</mandatory>               <multiple>false</multiple>          <index enabled="true">             <atomic>false</atomic>             <stored>false</stored>             <tokenised>true</tokenised>          </index>               <constraints>                 <constraint ref="custom:name_length"/>               </constraints>            </property>            <property name="custom:MRNumber">               <title>Medical Record Number</title>               <type>d:int</type>          <protected>true</protected>               <mandatory>true</mandatory>               <multiple>false</multiple>               <constraints>                 <constraint ref="custom:recnum_length"/>               </constraints>            </property>      <property name="custom:AcctNumber">               <title>Account Number</title>               <type>d:int</type>          <protected>true</protected>               <mandatory>true</mandatory>               <multiple>false</multiple>               <constraints>                 <constraint ref="custom:recnum_length"/>               </constraints>            </property>            <property name="custom:FileStatus">               <title>File Status</title>               <type>d:boolean</type>         <protected>false</protected>            <multiple>false</multiple>               <mandatory>true</mandatory>               <default>true</default>            </property>                        <property name="custom:AdmissionType">               <title>Admission Type</title>               <type>d:text</type>               <protected>true</protected>         <multiple>true</multiple>               <mandatory>false</mandatory>         <constraints>                 <constraint ref="custom:admission_list"/>               </constraints>            </property>            <property name="custom:DocType">               <title>Document Type</title>               <type>d:text</type>               <multiple>false</multiple>               <protected>true</protected>               <mandatory>true</mandatory>         <constraints>                 <constraint ref="custom:doctype_list"/>               </constraints>            </property>         </properties>      </aspect>         </aspects>         </model>  ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍