AnsweredAssumed Answered

Problems registering model resource bundle

Question asked by roman on Jun 11, 2008
Latest reply on Aug 26, 2013 by hammerguy
Hello folkz,

i'm developing an own AMP and have created the same AMP structure as Record Management.

I put my model-file "xxxModel.xml" in the "config/alfresco/module/de.xxx.alfresco.module.XxxModule/model" folder
and the resource bundle file "xxxModel.properties" in the same directory

further i have this directory : "config/alfresco/module/de.xxx.alfresco.module.XxxModule/context" where the bootstrap-context.xml is located.

in the module-context.xml i'm importing the bootstrap-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>
   <import resource="classpath:alfresco/module/de.xxx.alfresco.module.XxxModule/context/bootstrap-context.xml" />
</beans>

and in the bootstrap-context.xml i configure the model and the labels:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
   
   <!– Model –>   
   
   <bean id="de_swipe_alfresco_module_SwipeModule_dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
      <property name="models">
         <list>
            <value>alfresco/module/de.xxx.alfresco.module.XxxModule/model/xxxModel.xml</value>
         </list>
      </property>
      <property name="labels">
         <list>
            <value>alfresco/module/de.xxx.alfresco.module.XxxModule/model/xxxModel</value>
         </list>
      </property>
   </bean>
</beans>

and on starting server i get the following error:

11:54:55,437 ERROR [ContextLoader] Context initialization failed
java.util.MissingResourceException: Can't find bundle for base name alfresco/module/de.xxx.alfresco.module.XxxModule/model/xxxModel, locale de_DE
        at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1521)
        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1260)
        at java.util.ResourceBundle.getBundle(ResourceBundle.java:787)
        at org.alfresco.i18n.I18NUtil.getLocaleProperties(I18NUtil.java:411)
        at org.alfresco.i18n.I18NUtil.getMessage(I18NUtil.java:311)
        at org.alfresco.i18n.I18NUtil.getMessage(I18NUtil.java:341)
        at org.alfresco.i18n.I18NUtil.getMessage(I18NUtil.java:328)
        at org.alfresco.util.LogUtil.error(LogUtil.java:106)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:812)
        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:241)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)

I've tried to do anything like in the records management module.
any suggestions?

thx in advance
best regards
rome

Outcomes