AnsweredAssumed Answered

Alfresco 311 bundled with tomcat :more than 5000 'dos' files

Question asked by zomurn on Mar 8, 2010
Latest reply on Mar 9, 2010 by zomurn
Hello,

I have a problem of my custom alfresco 311 application : I works very well under windows.
But when I generate the alfresco.war under eclipse, and then start the alfresco tomcat server under linux (debian)the application doesn't start saying a "stupid" error like :

alfresco311@AlfrescoDemo:~/alfresco$ vim alfresco.log
        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)
        … 45 more

And then, I was suspicious about the portability from dos 2 unix systems. So I ran the command :

find . -type f -print0 | xargs -0 dos2unix -b

which rename all dos files with an extension ".bak"
and then I did :

find . -name "*.bak"

All command done from alfresco root folder.

And I counted more than 5000 line (ie 5000 files) which are in dos format where as I code under eclipse under windows.

I think it is the reason why the application doesn't start : here some sample of the 5000 files :

    ./tomcat/endorsed/serializer.bak
    ./tomcat/shared/classes/alfresco/messages/lock-service_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/bpm-messages_fi_FI.bak
    ./tomcat/shared/classes/alfresco/messages/jbpm_fi_FI.bak
    ./tomcat/shared/classes/alfresco/messages/content-filter-languages_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/bootstrap-tutorial_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/version-service_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/coci-service_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/content-service_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/workflow-interpreter-help_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/wcm-workflow-messages_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/bootstrap-templates_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/dictionary-messages_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/readme_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/webdav-messages_fr_FR.bak
    ./tomcat/shared/classes/alfresco/messages/readme_fi_FI.bak

    ./tomcat/shared/classes/alfresco/extension/web-client-config-custom.bak
    ./tomcat/shared/classes/alfresco/extension/restore-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/customModel.bak
    ./tomcat/shared/classes/alfresco/extension/custom-activities-SqlMapConfig.bak
    ./tomcat/shared/classes/alfresco/extension/asynchronous-avm-indexing-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/mimetypes-extension.xml.bak
    ./tomcat/shared/classes/alfresco/extension/license/MSCA  Mutuelle Saint Christophe Assurance-ent31-6997.lic.bak
    ./tomcat/shared/classes/alfresco/extension/web-client-config-custom.xml.unicode.bak
    ./tomcat/shared/classes/alfresco/extension/custom-repository-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/chaining-authentication-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/mt/mt-contentstore-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/mt/mt-admin-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/mt/mt-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/ehcache-custom.xml.sample.bak
    ./tomcat/shared/classes/alfresco/extension/custom-email-server.sample.bak
    ./tomcat/shared/classes/alfresco/extension/scheduled-action-services-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/lifecycleModel.bak
    ./tomcat/shared/classes/alfresco/extension/ldap-synchronisation.bak
    ./tomcat/shared/classes/alfresco/extension/replicating-content-services-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/wcm-xml-metadata-extracter-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/example-model-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/file-servers-custom.xml.bak
    ./tomcat/shared/classes/alfresco/extension/ldap-authentication-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/avm-lookup-cache-context.xml.bak
    ./tomcat/shared/classes/alfresco/extension/msc-services.bak
    ./tomcat/shared/classes/alfresco/extension/mimetype-map-extension.xml.bak

    ./tomcat/logs/host-manager.2010-03-05.bak
    ./tomcat/RUNNING.bak
    ./tomcat/conf/tomcat-users.bak
    ./tomcat/conf/logging.bak
    ./tomcat/conf/server.bak
    ./tomcat/conf/context.bak
    ./tomcat/conf/catalina.bak
    ./tomcat/conf/web.bak

    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/my_pressreleases.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/readme_template.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/company_logos.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/userhome_docs.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/client/portlet_node_summary_panel.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/client/node_summary_panel.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/client/task_summary_panel.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/client/myspaces_preview_panel.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/client/task_resource_panel.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/client/doclist_preview_panel.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/system_users.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/RSS_2.0_recent_docs.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/email_templates.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/webframework/metadata.get.html.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/webframework/avm-metadata.get.desc.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/webframework/avmstore.delete.desc.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/webframework/jsf-client-redirect.get.desc.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/webframework/avm-metadata.get.html.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/webframework/jsf-client-redirect.get.html.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/webframework/metadata.get.desc.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/webframework/avm-metadata.get.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresc

    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/webscripts/org/alfresco/scriptinstall.get.desc.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/cmis-ws-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/scheduled-jobs-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/ownable-services-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/index-recovery-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/templates/bannettes.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/templates/webscripts/com/opsera/omm/start-workflow.get.html.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/templates/webscripts/com/opsera/omm/start-workflow.get.desc.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/templates/webscripts/com/opsera/omm/start-workflow.get.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/alfresco-link-validation-bootstrap-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/opsera-mimetypes-extension.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/bootstrap/remote-api-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/mimetypes-extension-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/node-services-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/hibernate-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/file-servers.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/alfresco-jmxrmi.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/avm-services-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/public-services-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/enterprise-web-scripts-application-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/webscript-framework-application-context-test.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/blog-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/wcm-services-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/cmis-api-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/avm-console-context.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/web-client-config.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/alfresco/activities/org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect/ActivityFeed.bak
    ./tomcat/webapps/alfresco/WEB-INF/classes/a

    ./tomcat/webapps/alfresco/WEB-INF/lib/commons-jxpath-1.2.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/backport-util-concurrent-2.1.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/alfresco311-msc_core2.1r.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/xml-resolver-1.2.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/excalibur-logger-2.1.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/JMagick.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/tm-extractors-1.0.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/avalon-framework-impl-4.3.1.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/commons-fileupload-1.1.1.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/jstl-1.1.0.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/dom4j-1.6.1.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/cxf-2.1.2.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/bsh-1.3.0.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/avalon-framework-api-4.3.1.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/axiom-impl-1.2.5.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/cglib-nodep-2.2_beta1.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/james-server-core-api-3.0-SNAPSHOT.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/commons-dbcp-1.2.1.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/alfresco-jlan-embed.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/jdom-1.0.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/rhino-js-1.6R7.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/hrtlib.bak
    ./tomcat/webapps/alfresco/WEB-INF/lib/openoffice-unoil-2.0.3.bak
    ./tomcat/webapps/alfresco/W
and even more.

Why all these files are in DOS format ? : I took the original war, integrates two modules with MMT and that's all.

Outcomes