derek_walker
10 years agoGuide
Freemarker URL directive is broken.
Just a heads up. Not sure if this is happening on other communities.
{ "error":" FreeMarker template error: To do URL encoding, the framework that encloses FreeMarker must specify the output encoding or the URL encoding charset, so ask the programmers to fix it. Or, as a last chance, you can set the url_encoding_charset setting in the template, e.g. <#setting url_escaping_charset='ISO-8859-1'>, or give the charset explicitly to the buit-in, e.g. foo?url('ISO-8859-1'). The failing instruction (FTL stack trace): ---------- ==> ${q?url} [in template "api_search.ftl" at line 13, column 79] #assign url = "\${url}?restapi.respon... [in template "api_search.ftl" at line 13, column 1] ---------- Java stack trace (for programmers): ---------- freemarker.core._TemplateModelException: [... Exception message was already printed; see it above ...] at freemarker.core.StringBuiltins$urlBI$urlBIResult.getAsString(StringBuiltins.java:323) at freemarker.core.EvalUtil.modelToString(EvalUtil.java:91) at freemarker.core.EvalUtil.coerceModelToString(EvalUtil.java:376) at freemarker.core.Expression.evalAndCoerceToString(Expression.java:115) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment.renderElementToString(Environment.java:1798) at freemarker.core.StringLiteral.evalAndCoerceToString(StringLiteral.java:116) at freemarker.core.StringLiteral._eval(StringLiteral.java:93) at freemarker.core.Expression.eval(Expression.java:111) at freemarker.core.Assignment.accept(Assignment.java:106) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.MixedContent.accept(MixedContent.java:93) at freemarker.core.Environment.visit(Environment.java:265) at freemarker.core.Environment.process(Environment.java:243) at freemarker.template.Template.process(Template.java:277) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:366) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:283) at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:233) at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167) at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263) at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208) at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at lithium.servlet.spring.SpringControllerDispatcherServlet.service(SpringControllerDispatcherServlet.java:89) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at lithium.util.http.DelegatingApplicationServletProxy.service(DelegatingApplicationServletProxy.java:223) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.JsonCallbackFilter.doHttpFilter(JsonCallbackFilter.java:49) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.webui.CustomPageInitializationHttpFilter.doHttpFilter(CustomPageInitializationHttpFilter.java:90) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.fusion.FusionServlet.doHttpFilter(FusionServlet.java:227) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.HttpRequestContextFilter.doHttpFilter(HttpRequestContextFilter.java:77) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.MaskedIpFilter.doHttpFilter(MaskedIpFilter.java:102) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.HashedIpFilter.doHttpFilter(HashedIpFilter.java:180) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.device.ClientDeviceDetectionFilter.doHttpFilter(ClientDeviceDetectionFilter.java:198) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.boards.servlet.pagecache.PageCacheManager.doHttpFilter(PageCacheManager.java:416) at lithium.boards.servlet.pagecache.PageCacheFilter.doHttpFilter(PageCacheFilter.java:42) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.banuser.BannedUserFilter.doHttpFilter(BannedUserFilter.java:129) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.web.clickjacking.ClickjackingServletFilter.doHttpFilter(ClickjackingServletFilter.java:125) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.traffic.visitor.VisitorFilter.doHttpFilter(VisitorFilter.java:42) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.session.UserSessionFilter.doHttpFilter(UserSessionFilter.java:162) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.xsl.PluginXslTransformFilter.doHttpFilter(PluginXslTransformFilter.java:76) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.MimeFilter.doHttpFilter(MimeFilter.java:37) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.limit.StandardLimitPool.processRequest(StandardLimitPool.java:539) at lithium.servlet.limit.StandardLimitManager.processRequest(StandardLimitManager.java:184) at lithium.servlet.limit.LimitFilter.doHttpFilter(LimitFilter.java:67) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.RequestTransformFilter.doHttpFilter(RequestTransformFilter.java:73) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.MetricsFilter.doHttpFilter(MetricsFilter.java:95) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.SetHeaderValidationFilter.doHttpFilter(SetHeaderValidationFilter.java:52) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.SessionIdStripperFilter.doHttpFilter(SessionIdStripperFilter.java:44) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.device.AgentDetectionFilter.doHttpFilter(AgentDetectionFilter.java:111) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.session.ReplicatedSessionFilter.doFilter(ReplicatedSessionFilter.java:57) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.rewrite.RewriteFilter.doHttpFilter(RewriteFilter.java:410) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.BlackboxFilter.doHttpFilter(BlackboxFilter.java:88) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.OperationsLoggingFilter.doHttpFilter(OperationsLoggingFilter.java:106) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.tracking.TrackingManager.doHttpFilter(TrackingManager.java:270) at lithium.servlet.tracking.TrackingFilter.doHttpFilter(TrackingFilter.java:25) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.AccessCheckFilter.doHttpFilter(AccessCheckFilter.java:75) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.util.servlet.P3PHeaderFilter.doHttpFilter(P3PHeaderFilter.java:80) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.util.http.GenericFilter.doHttpFilter(GenericFilter.java:21) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.VanityHostnameRedirectFilter.doHttpFilter(VanityHostnameRedirectFilter.java:79) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.CanonicalIpFilter.doHttpFilter(CanonicalIpFilter.java:50) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.ForwardedHeadersFilter.doHttpFilter(ForwardedHeadersFilter.java:227) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.funnel.FunnelManager.doHttpFilter(FunnelManager.java:91) at lithium.servlet.funnel.FunnelFilter.doHttpFilter(FunnelFilter.java:41) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at lithium.util.http.DelegatingApplicationFilterProxy.doFilter(DelegatingApplicationFilterProxy.java:184) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.apps.main.container.filters.ApplicationSelectorFilter.doHttpFilter(ApplicationSelectorFilter.java:176) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.boards.servlet.ClearStateFilter.doHttpFilter(ClearStateFilter.java:64) at lithium.util.http.HttpFilter.doFilter(HttpFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at lithium.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:57) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at lithium.apps.main.webserver.Tomcat70Bootstrap$3.invoke(Tomcat70Bootstrap.java:394) at lithium.apps.main.webserver.Tomcat70Bootstrap$2.invoke(Tomcat70Bootstrap.java:347) at lithium.apps.main.webserver.SessionIdValidator.invoke(SessionIdValidator.java:107) at lithium.apps.main.webserver.ApplicationWebserverConfigurationValve.invoke(ApplicationWebserverConfigurationValve.java:69) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) " }
Also, including
<#setting url_escaping_charset='ISO-8859-1'>
fixed my problem. Kind of a pain but not a huge problem.