咨询一个,导致下述错误的原因有哪些?感谢
2021-9-10 16:19:00 - ERROR - Error executing FreeMarker template
FreeMarker template error:
The following has evaluated to null or missing:
==> resource.customVariables.startuptime [in template "js/getTime.js" at line 5, column 21]
----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to 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: ${resource.customVariables.startuptime} [in template "js/getTime.js" at line 5, column 19]
- Reached through: #include "js/getTime.js" [in template "iServer_managerRoot_zh_CN.ftl" at line 31, column 9]
- Reached through: #include "iServer_managerRoot_zh_CN.ftl" [in template "managerRoot_zh_CN.ftl" at line 6, 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:134)
at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:467)
at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:389)
at freemarker.core.EvalUtil.coerceModelToStringOrMarkup(EvalUtil.java:358)
at freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:100)
at freemarker.core.DollarVariable.accept(DollarVariable.java:63)
at freemarker.core.Environment.visit(Environment.java:330)
at freemarker.core.Environment.visit(Environment.java:336)
at freemarker.core.Environment.include(Environment.java:2582)
at freemarker.core.Include.accept(Include.java:171)
at freemarker.core.Environment.visit(Environment.java:330)
at freemarker.core.Environment.visit(Environment.java:336)
at freemarker.core.Environment.include(Environment.java:2582)
at freemarker.core.Include.accept(Include.java:171)
at freemarker.core.Environment.visit(Environment.java:330)
at freemarker.core.Environment.visit(Environment.java:336)
at freemarker.core.Environment.process(Environment.java:309)
at freemarker.template.Template.process(Template.java:384)
at org.restlet.ext.freemarker.TemplateRepresentation.write(TemplateRepresentation.java:315)
at org.restlet.representation.CharacterRepresentation.write(CharacterRepresentation.java:67)
at org.restlet.engine.adapter.ServerCall.writeResponseBody(ServerCall.java:507)
at org.restlet.engine.adapter.ServerCall.sendResponse(ServerCall.java:451)
at org.restlet.ext.servlet.internal.ServletCall.sendResponse(ServletCall.java:421)
at org.restlet.engine.adapter.ServerAdapter.commit(ServerAdapter.java:191)
at org.restlet.ext.servlet.ServletAdapter.service(ServletAdapter.java:196)
at com.supermap.services.rest.servlets.ManagementServlet.service(SourceFile:174)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at com.supermap.server.host.webapp.handlers.WebAppRequestDispatcher.forward(SourceFile:63)
at com.supermap.server.host.webapp.handlers.SelectForward.a(SourceFile:32)
at com.supermap.server.host.webapp.handlers.ManagerServiceHandler.handle(SourceFile:299)
at com.supermap.server.host.webapp.handlers.AbstractHandler.process(SourceFile:197)
at com.supermap.server.host.webapp.handlers.AbstractHandler.a(SourceFile:223)
at com.supermap.server.host.webapp.handlers.AbstractHandler.invokeLowerPriorityHandlers(SourceFile:212)
at com.supermap.server.host.webapp.handlers.AbstractHandler.process(SourceFile:199)
at com.supermap.server.host.webapp.handlers.BasicHandler.process(SourceFile:324)
at com.supermap.server.host.webapp.ApplicationFilter.doFilter(SourceFile:254)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:423)
at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:169)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:124)
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:478)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
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:799)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1457)
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)