FreeMarker template error (DEBUG mode; use RETHROW in production!):
The value you try to list is an extended_hash (wrapper: f.t.SimpleHash), thus you must specify two loop variables after the "as"; one for the key, and another for the value, like <#... as k, v>).
----
FTL stack trace ("~" means nesting-related):
- Failed at: #list resource.content as childResource [in template "queryResults_GET.ftl" at line 20, column 43]
- Reached through: #include "queryResults_GET.ftl" [in template "queryResults.ftl" at line 7, column 9]
----
Java stack trace (for programmers):
----
freemarker.core.NonSequenceOrCollectionException: [... Exception message was already printed; see it above ...]
at freemarker.core.IteratorBlock$IterationContext.executedNestedContentForCollOrSeqListing(IteratorBlock.java:351)
at freemarker.core.IteratorBlock$IterationContext.executeNestedContent(IteratorBlock.java:271)
at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.java:244)
at freemarker.core.Environment.visitIteratorBlock(Environment.java:657)
at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:108)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:94)
at freemarker.core.Environment.visit(Environment.java:347)
at freemarker.core.Environment.visit(Environment.java:353)
at freemarker.core.Environment.visit(Environment.java:353)
at freemarker.core.Environment.include(Environment.java:2955)
at freemarker.core.Include.accept(Include.java:171)
at freemarker.core.Environment.visit(Environment.java:347)
at freemarker.core.Environment.visit(Environment.java:353)
at freemarker.core.Environment.visit(Environment.java:353)
at freemarker.core.Environment.process(Environment.java:326)
at freemarker.template.Template.process(Template.java:383)
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:509)
at org.restlet.engine.adapter.ServerCall.sendResponse(ServerCall.java:453)
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.RestServlet$AdapterProxy.service(RestServlet.java:283)
at com.supermap.services.rest.RestServlet.service(RestServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
at com.supermap.server.impl.DefaultServiceInstance.service(DefaultServiceInstance.java:254)
at com.supermap.server.api.ServiceInstance.service(ServiceInstance.java:89)
at com.supermap.server.host.webapp.handlers.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:81)
at com.supermap.server.host.webapp.handlers.HandleRequestAndSaveToCacheTask.call(HandleRequestAndSaveToCacheTask.java:66)
at com.supermap.server.host.webapp.handlers.HandleRequestAndSaveToCacheTask.call(HandleRequestAndSaveToCacheTask.java:27)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at com.supermap.server.host.webapp.handlers.ServiceDispatcherHandler.handleRequestByCacheResponse(ServiceDispatcherHandler.java:568)
at com.supermap.server.host.webapp.handlers.ServiceDispatcherHandler.handle(ServiceDispatcherHandler.java:423)
at com.supermap.server.host.webapp.handlers.AbstractHandler.process(AbstractHandler.java:207)
at com.supermap.server.host.webapp.handlers.AbstractHandler.invokeHandlers(AbstractHandler.java:239)
at com.supermap.server.host.webapp.handlers.AbstractHandler.invokeLowerPriorityHandlers(AbstractHandler.java:224)
at com.supermap.server.host.webapp.handlers.AbstractHandler.process(AbstractHandler.java:209)
at com.supermap.server.host.webapp.handlers.BasicHandler.process(BasicHandler.java:313)
at com.supermap.server.host.webapp.ApplicationFilter.doFilter(ApplicationFilter.java:258)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at com.supermap.services.filter.TunnelFilter.doFilter(SourceFile:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:331)
at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:129)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:383)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:936)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Unknown Source)
SuperMap iServer REST API