chenejac / VIVOTestMigrationJIRANotClosed

0 stars 0 forks source link

VIVO-1549: Misleading TemplateException thrown on home page when Solr URL set incorrectly #205

Open chenejac opened 6 years ago

chenejac commented 6 years ago

Brian Lowe (Migrated from VIVO-1549) said:

Error reported on vivo-tech list by Daniel Wolf.

 

Steps to reproduce:

 

Error message: TemplateException creating processing environment

Stack trace (full trace available in the vivo log): edu.cornell.mannlib.vitro.webapp.controller.freemarker.TemplateProcessingHelper$TemplateProcessingException: TemplateException creating processing environment at edu.cornell.mannlib.vitro.webapp.controller.freemarker.TemplateProcessingHelper.processTemplate(TemplateProcessingHelper.java:59) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.TemplateProcessingHelper.processTemplate(TemplateProcessingHelper.java:36) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.processTemplate(FreemarkerHttpServlet.java:493) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.writeTemplate(FreemarkerHttpServlet.java:520) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.writePage(FreemarkerHttpServlet.java:510) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doTemplate(FreemarkerHttpServlet.java:283) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doResponse(FreemarkerHttpServlet.java:233) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doGet(FreemarkerHttpServlet.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet.service(VitroHttpServlet.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:470) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:356) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316) at edu.cornell.mannlib.vitro.webapp.filters.PageRoutingFilter.doFilter(PageRoutingFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.ClickjackFilter.doFilter(ClickjackFilter.java:34) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.RequestModelsPrep.doFilter(RequestModelsPrep.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.URLRewriterFilter.doFilter(URLRewriterFilter.java:40) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.JSessionStripFilter.doFilter(JSessionStripFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.produceBasicResponse(CachingResponseFilter.java:321) at edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.doFilter(CachingResponseFilter.java:120) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionFilter.doFilter(LocaleSelectionFilter.java:64) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.CharsetEncodingFilter.doFilter(CharsetEncodingFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.SessionTimeoutLimitingFilter.doFilter(SessionTimeoutLimitingFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.StartupStatusDisplayFilter.doFilter(StartupStatusDisplayFilter.java:66) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing: ==> vClassGroups [in template "lib-home-page.ftl" at line 118, column 37] ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: @lh.researchClasses [in template "page-home.ftl" at line 69, column 9] ---- at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:131) at freemarker.core.Macro$Context.sanityCheck(Macro.java:252) at freemarker.core.Macro$Context.runMacro(Macro.java:181) at freemarker.core.Environment.invoke(Environment.java:701) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:84) at freemarker.core.Environment.visit(Environment.java:324) at freemarker.core.MixedContent.accept(MixedContent.java:54) at freemarker.core.Environment.visit(Environment.java:324) at freemarker.core.Environment.process(Environment.java:302) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.TemplateProcessingHelper.processTemplate(TemplateProcessingHelper.java:57) ... 64 more

Caused by: FreeMarker template error: The following has evaluated to null or missing: ==> vClassGroups [in template "lib-home-page.ftl" at line 118, column 37] ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: @lh.researchClasses [in template "page-home.ftl" at line 69, column 9] ---- Java stack trace (for programmers): ---- freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...] at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:131) at freemarker.core.Macro$Context.sanityCheck(Macro.java:252) at freemarker.core.Macro$Context.runMacro(Macro.java:181) at freemarker.core.Environment.invoke(Environment.java:701) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:84) at freemarker.core.Environment.visit(Environment.java:324) at freemarker.core.MixedContent.accept(MixedContent.java:54) at freemarker.core.Environment.visit(Environment.java:324) at freemarker.core.Environment.process(Environment.java:302) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.TemplateProcessingHelper.processTemplate(TemplateProcessingHelper.java:57) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.TemplateProcessingHelper.processTemplate(TemplateProcessingHelper.java:36) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.processTemplate(FreemarkerHttpServlet.java:493) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.writeTemplate(FreemarkerHttpServlet.java:520) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.writePage(FreemarkerHttpServlet.java:510) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doTemplate(FreemarkerHttpServlet.java:283) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doResponse(FreemarkerHttpServlet.java:233) at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doGet(FreemarkerHttpServlet.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet.service(VitroHttpServlet.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:470) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:356) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316) at edu.cornell.mannlib.vitro.webapp.filters.PageRoutingFilter.doFilter(PageRoutingFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.ClickjackFilter.doFilter(ClickjackFilter.java:34) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.RequestModelsPrep.doFilter(RequestModelsPrep.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.URLRewriterFilter.doFilter(URLRewriterFilter.java:40) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.JSessionStripFilter.doFilter(JSessionStripFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.produceBasicResponse(CachingResponseFilter.java:321) at edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.doFilter(CachingResponseFilter.java:120) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionFilter.doFilter(LocaleSelectionFilter.java:64) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.CharsetEncodingFilter.doFilter(CharsetEncodingFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.SessionTimeoutLimitingFilter.doFilter(SessionTimeoutLimitingFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at edu.cornell.mannlib.vitro.webapp.filters.StartupStatusDisplayFilter.doFilter(StartupStatusDisplayFilter.java:66) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)

chenejac commented 6 years ago

Brian Lowe said:

As an additional note, when the Solr URL was set incorrectly I received only two yellow smoke test warnings:  one about the fact that my runtime.properties was in the legacy location, and the other about the SMTP server's invalid URL.  I might have expected a red error about the lack of Solr.