Re: [vivo-tech] FreeMarker template error

63 views
Skip to first unread message

Graham Triggs

unread,
Jul 11, 2017, 9:15:48 AM7/11/17
to vivo...@googlegroups.com
Hi Jochen,

Are you upgrading an existing instance? It’s most likely that you have multiple Freemarker JARs in your WEB-INF/lib, and the application loading the wrong (older) one.

G

-- 

Graham Triggs
Technical Lead for VIVO
DuraSpace.org


On 26 June 2017 at 14:19:55, freyberg.die via VIVO Tech (vivo...@googlegroups.com) wrote:

Hi VIVO-Team,
after installing VIVO1.9.2 via github, I got an error on nearly all pages.:

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]

Can you give me an hint?
There was a similar problem with an explanation, but I don't know what to do about it.: https://groups.google.com/forum/?_escaped_fragment_=topic/vivo-tech/iENhkq12HxM#!topic/vivo-tech/iENhkq12Hx

Thanks in advance for your help.
Jochen

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:60)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.TemplateProcessingHelper.processTemplate(TemplateProcessingHelper.java:37)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.processTemplate(FreemarkerHttpServlet.java:510)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.writeTemplate(FreemarkerHttpServlet.java:537)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.writePage(FreemarkerHttpServlet.java:527)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doTemplate(FreemarkerHttpServlet.java:289)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doResponse(FreemarkerHttpServlet.java:238)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doGet(FreemarkerHttpServlet.java:112)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        at edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet.service(VitroHttpServlet.java:71)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:721)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:466)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:358)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
        at edu.cornell.mannlib.vitro.webapp.filters.PageRoutingFilter.doFilter(PageRoutingFilter.java:93)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.ClickjackFilter.doFilter(ClickjackFilter.java:31)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.RequestModelsPrep.doFilter(RequestModelsPrep.java:56)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.URLRewriterFilter.doFilter(URLRewriterFilter.java:38)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.JSessionStripFilter.doFilter(JSessionStripFilter.java:61)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.produceBasicResponse(CachingResponseFilter.java:319)
        at edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.doFilter(CachingResponseFilter.java:113)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionFilter.doFilter(LocaleSelectionFilter.java:62)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.CharsetEncodingFilter.doFilter(CharsetEncodingFilter.java:34)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.SessionTimeoutLimitingFilter.doFilter(SessionTimeoutLimitingFilter.java:39)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.StartupStatusDisplayFilter.doFilter(StartupStatusDisplayFilter.java:64)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1570)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1527)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)
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. (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:58)
        ... 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. (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:58)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.TemplateProcessingHelper.processTemplate(TemplateProcessingHelper.java:37)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.processTemplate(FreemarkerHttpServlet.java:510)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.writeTemplate(FreemarkerHttpServlet.java:537)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.writePage(FreemarkerHttpServlet.java:527)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doTemplate(FreemarkerHttpServlet.java:289)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doResponse(FreemarkerHttpServlet.java:238)
        at edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHttpServlet.doGet(FreemarkerHttpServlet.java:112)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        at edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet.service(VitroHttpServlet.java:71)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:721)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:466)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:358)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
        at edu.cornell.mannlib.vitro.webapp.filters.PageRoutingFilter.doFilter(PageRoutingFilter.java:93)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.ClickjackFilter.doFilter(ClickjackFilter.java:31)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.RequestModelsPrep.doFilter(RequestModelsPrep.java:56)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.URLRewriterFilter.doFilter(URLRewriterFilter.java:38)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.JSessionStripFilter.doFilter(JSessionStripFilter.java:61)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.produceBasicResponse(CachingResponseFilter.java:319)
        at edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.doFilter(CachingResponseFilter.java:113)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionFilter.doFilter(LocaleSelectionFilter.java:62)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.CharsetEncodingFilter.doFilter(CharsetEncodingFilter.java:34)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.SessionTimeoutLimitingFilter.doFilter(SessionTimeoutLimitingFilter.java:39)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at edu.cornell.mannlib.vitro.webapp.filters.StartupStatusDisplayFilter.doFilter(StartupStatusDisplayFilter.java:64)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1570)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1527)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)

--
You received this message because you are subscribed to the Google Groups "VIVO Tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vivo-tech+...@googlegroups.com.
To post to this group, send email to vivo...@googlegroups.com.
Visit this group at https://groups.google.com/group/vivo-tech.
To view this discussion on the web visit https://groups.google.com/d/msgid/vivo-tech/2e7db9d1-8348-494d-8a04-b70ecc6219e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wolf

unread,
Aug 5, 2018, 4:34:31 PM8/5/18
to VIVO Tech
Hi Graham,

I am facing the same error when installing VIVO 1.10 on localhost. I checked Freemarker JARs within WEB-INF/lib and there is only one (freemarker-2.3.23.jar). Do you have any recommendations?

There was an error in the system.

Error message: TemplateException creating processing environment

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-......



Also, I am not sure if it is related, but I am seeing a separate error when trying to add a user via the Site Admin page. I am brought to the error page shown here after entering a name for a new Faculty Member:

HTTP Status 500 – Internal Server Error


Type Exception Report

Message Expected mime type application/octet-stream but got text/html. <!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 – Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> &#47;vivosolr&#47;select</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/9.0.10</h3></body></html>

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream but got text/html. <!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 – Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> &#47;vivosolr&#47;select</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/9.0.10</h3></body></html>
        org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:512)
        org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
        org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
        org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:91)
        org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301)
        edu.cornell.mannlib.vitro.webapp.searchengine.solr.SolrSearchEngine.query(SolrSearchEngine.java:171)
        edu.cornell.mannlib.vitro.webapp.searchengine.InstrumentedSearchEngineWrapper.query(InstrumentedSearchEngineWrapper.java:194)
        edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.findEtagForIndividual(CachingResponseFilter.java:252)
        edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.doFilter(CachingResponseFilter.java:123)
        edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionFilter.doFilter(LocaleSelectionFilter.java:64)
        edu.cornell.mannlib.vitro.webapp.filters.CharsetEncodingFilter.doFilter(CharsetEncodingFilter.java:36)
        edu.cornell.mannlib.vitro.webapp.filters.SessionTimeoutLimitingFilter.doFilter(SessionTimeoutLimitingFilter.java:41)
        edu.cornell.mannlib.vitro.webapp.filters.StartupStatusDisplayFilter.doFilter(StartupStatusDisplayFilter.java:66)

Note The full stack trace of the root cause is available in the server logs.


Apache Tomcat/9.0.10


Huda J. Khan

unread,
Aug 14, 2018, 12:40:21 PM8/14/18
to vivo...@googlegroups.com

Hi Wolf,

Graham may have further suggestions but I looked this over a little and had some questions that may be useful to answer as we try to track down what is leading to this error. 

 

https://github.com/vivo-project/VIVO/blob/develop/webapp/src/main/webapp/templates/freemarker/lib/lib-home-page.ftl#L118 is the line throwing the error.  This page is included in page-home.ftl. The vclassgroup variable is expected to be available when this macro is called, which leads me to believe that perhaps the system is not seeing the vclassgroups that it normally expects to (as it loads with some classgroups defined).

 

If you could do one of the following:  check the class group page using the link on the site admin page or query the system (either using the site admin sparql query page or the sparql query api) to check if any class groups exist (i.e. SELECT ?classgroup where ?classgroup http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://vitro.mannlib.cornell.edu/ns/vitro/0.7#ClassGroup .)

 

If you do see classgroups, we’ll have to review why the system doesn’t populate that variable. If you don’t, we’ll have to review why the system has not loaded them (this file defines them https://github.com/vivo-project/VIVO/blob/develop/home/src/main/resources/rdf/applicationMetadata/firsttime/classgroups.rdf and should be loaded into the system the first time you deploy).

 

Hope this helps!

 

Huda

Daniel Wolf

unread,
Aug 28, 2018, 10:28:45 PM8/28/18
to VIVO Tech
Thank you for the detailed guidance but I am still having the same issue despite additional research. I do see the classgroups (e.g. courses, people, events, etc.) both via the Site Admin page and via the SPARQL query, as you suggest. So why would the system not be populating that variable..

To clarify my last post a bit, I receive the FreeMarker TemplateException error when selecting Home on the VIVO home page. When I select any of the other options on the home page (e.g. People, Organizations, Research) I get the HTTP Not Found SolrException. (Both errors are quoted in my last post.)

If you or other members of the community have additional ideas they would be very much appreciated! 

Brian Lowe

unread,
Aug 29, 2018, 4:21:18 AM8/29/18
to vivo...@googlegroups.com

Hi Daniel,

 

I have a feeling that null vClassGroups is a misleading symptom of the same underlying problem.  I’ve seen this happen in the past when VIVO can’t find the SOLR server, but it doesn’t seem to be easily reproducible.

 

Check your vitro.local.solr.url property in runtime.properties in the VIVO home directory and ensure that it

’s pointing to your SOLR installation.  When VIVO can find SOLR, I’m betting that the silly classgroups error will also go away.

 

Brian

 

De la: vivo...@googlegroups.com <vivo...@googlegroups.com> În numele Daniel Wolf
Trimis: miercuri, 29 august 2018 05:29
Către: VIVO Tech <vivo...@googlegroups.com>
Subiect: Re: [vivo-tech] FreeMarker template error

Brian Lowe

unread,
Aug 29, 2018, 6:54:13 AM8/29/18
to vivo...@googlegroups.com

Actually, turns out it’s not so difficult to reproduce.  I just did a fresh installation of VIVO and after editing vitro.local.solr.url to a value of http://localhost:8080/errorvivosolr (a value that will result in a 404) it produced the same vClassGroups-related TemplateException on the home page that you observed.  Changing the property back to http://localhost:8080/vivosolr restored the home page to its normal operation.

 

So, most likely, when you get VIVO connected to Solr the problem will go away.  I’ve opened a bug in JIRA, as there should be better error handling when this happens: https://jira.duraspace.org/browse/VIVO-1549 .

 

Brian

 

De la: vivo...@googlegroups.com <vivo...@googlegroups.com> În numele Brian Lowe
Trimis: miercuri, 29 august 2018 11:21
Către: vivo...@googlegroups.com
Subiect: RE: [vivo-tech] FreeMarker template error

Reply all
Reply to author
Forward
0 new messages