AnsweredAssumed Answered

Web Script Status 500 / Alfresco 5 on Tomcat 8

Question asked by basti.g on Mar 9, 2015
Latest reply on Mar 28, 2015 by basti.g
Hi Alfresco community,

For quite a while I've been trying to find out how to deploy Alfresco Community Edition to the Tomcat 8 instance that is already running on my server (Arch Linux kernel 3.18.6, JRE 8 OpenJDK). Installation and WAR deployment worked fine as far as I can tell: alfresco, share and solr webapps come up according to the Tomcat server manager.

Whenever I try to login to http://myhost:8080/share using the default admin user I only get a Surf web script error "02090001 Failed to process template org/alfresco/share/header/share-header.get.html.ftl". I'm seeing this error with Alfresco 5.0.a, 5.0.c and also on the latest 5.1-NIGHTLY (March 8).
<!–break–>
Exception dump:
java.lang.IllegalArgumentException - The resource path [/../service/constants/Default-min.js] has been normalized to [null] which is not valid

org.apache.catalina.webresources.StandardRoot.validate(StandardRoot.java:265)
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:212)
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:206)
org.apache.catalina.core.ApplicationContext.getResource(ApplicationContext.java:557)
org.apache.catalina.core.ApplicationContextFacade.getResource(ApplicationContextFacade.java:199)
org.springframework.web.context.support.ServletContextResource.exists(ServletContextResource.java:102)
org.springframework.extensions.surf.DependencyHandler.getResourceInputStream(DependencyHandler.java:511)
org.springframework.extensions.surf.DojoDependencyRule.addJavaScriptDependency(DojoDependencyRule.java:276)
org.springframework.extensions.surf.DojoDependencyRule.processDependency(DojoDependencyRule.java:256)
org.springframework.extensions.surf.DojoDependencyRule.processRegexRules(DojoDependencyRule.java:149)
org.springframework.extensions.surf.DojoDependencyHandler.getDependencies(DojoDependencyHandler.java:248)
[ … ]


and also

org.springframework.extensions.webscripts.WebScriptException - 02090001 Failed to process template org/alfresco/share/header/share-header.get.html.ftl

org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:175)


What I read from it: somehow service/constants/Default-min.js is referenced in the web application so the Servlet filter    org.alfresco.web.site.servlet.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:168) is invoked and throws that exception because the file is apparently missing. I have no idea where I could get it. Even more confusing - the same installation is working fine on Tomcat 7, and the file doesn't exist there either?!

Java ClassLoaders make my head hurt …

Anybody else faced such an issue or even got a workaround? I really would like to avoid having to maintain two Tomcat instances at different major releases.

Thanks in advance,
Sebastian

Outcomes