cancel
Showing results for 
Search instead for 
Did you mean: 

problem boostraping model after OS migration

zomurn
Champ in-the-making
Champ in-the-making
Hello,

Taking the same alfresco.war, alf_data+db from windows to linux, causes a boostrap problem : not any changes in the application code.
I really don't understand this error causes (certainly) by a side effect.
Because this URI is well imported in msc_model.xml and and well defined in another module.

12:50:00,399 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'msc.dictionaryBootstrap' defined in URL [jar:file:/home/alfrescomsc311/alfresco/tomcat/webapps/alfresco/WEB-INF/lib/alfresco311-msc_core2.0r.jar!/alfresco/extension/bootstrap-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/module/msc_core/model/msc-model.xml
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/module/msc_core/model/msc-model.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 compile model msc:mscmodel
        at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:112)
        at org.alfresco.repo.dictionary.M2Model.compile(M2Model.java:134)
        at org.alfresco.repo.dictionary.DictionaryDAOImpl.putModel(DictionaryDAOImpl.java:217)
        at org.alfresco.repo.dictionary.DictionaryBootstrap.initDictionary(DictionaryBootstrap.java:143)
        … 42 more
Caused by: org.alfresco.service.namespace.NamespaceException: URI http://www.opsera.com/opsera/model/0.1 cannot be imported as it is not defined (with prefix opsera
        at org.alfresco.repo.dictionary.CompiledModel.createLocalPrefixResolver(CompiledModel.java:209)
        at org.alfresco.repo.dictionary.CompiledModel.constructDefinitions(CompiledModel.java:134)
        at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:94)

why this ?
3 REPLIES 3

ssaravanan
Champ in-the-making
Champ in-the-making
It means some jar bundle is missing in the tomcat/webapps/alfresco/WEB_INF/lib folder
You have copied the alfresco.war , alf_data, db, thats correct, in theory it should work
with the migration from windows to linux. But you have done some custom implementation
which I could read from the logs, the vendor probably had compiled his code as jar file
and copied it over to the tomcat/webapps/alfresco/WEB_INF/lib folder once alfresco folder
is expanded in tomcat/webapps , so ideally if you copy the missing jar file or copy
the exploded tomcat/webapps/alfresco folder as well, then that will fix the issue

zomurn
Champ in-the-making
Champ in-the-making
I have a look a bit closer to this problem and it still exists.
I checked for librairies into WEB-INF/lib as you said and all seems correct.
I do exactly the same archive build and deployment that in windows….the "bundle" is the same.
There is probably a sadly side effect somewhere else ! I fear that's not easy to find the problem.  :cry:

piousbox
Champ in-the-making
Champ in-the-making
My guess is that somewhere, the same namespace is associated with a different uri, or this uri is associated with some different namespace

Caused by: org.alfresco.service.namespace.NamespaceException: URI http://www.opsera.com/opsera/model/0.1 cannot be imported as it is not defined (with prefix opsera

To iterate, I think http://www.opsera.com/opsera/model/0.1 does not correlate with opsera. It could be as simple as that you should use uri http://www.opsera.com/opsera/0.1 but then, I don't know for sure.