You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2022/01/13 09:10:00 UTC

[jira] [Resolved] (WW-5163) Error executing FreeMarker template

     [ https://issues.apache.org/jira/browse/WW-5163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart resolved WW-5163.
-------------------------------
    Resolution: Fixed

> Error executing FreeMarker template
> -----------------------------------
>
>                 Key: WW-5163
>                 URL: https://issues.apache.org/jira/browse/WW-5163
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5.27, 2.5.28
>            Reporter: Sebastian Henz
>            Priority: Major
>             Fix For: 2.5.29, 2.6
>
>
> Since struts2-core version 2.5.27 we are unable to access our web application.
> This is part of the error log:
> {{12 Jan. 2022 09:23:22 DEBUG [qtp1918833478-32] org.apache.struts2.components.UIBean:577 - Rendering template /template/jquery/head}}
> {{12 Jan. 2022 09:23:22 DEBUG [qtp1918833478-32] o.a.s.c.t.FreemarkerTemplateEngine:119 - Rendering template: /template/jquery/head.ftl}}
> {{12 Jan. 2022 09:23:22 DEBUG [qtp1918833478-32] o.a.s.c.t.FreemarkerTemplateEngine:151 - Puts action on the top of ValueStack, just before the tag}}
> {{12 Jan. 2022 09:23:22 ERROR [qtp1918833478-32] freemarker.runtime:60 - Error executing FreeMarker template}}
> {{freemarker.core.NonBooleanException: For "#if" condition: Expected a boolean, but this has evaluated to an extended_hash+string (org.apache.struts2.dispatcher.Parameter$Empty wrapped into f.e.b.StringModel):}}
> {{==> parameters.compressed?default(true) [in template "template/jquery/head.ftl" at line 44, column 6]}}
> {{----}}
> {{FTL stack trace ("~" means nesting-related):}}
> {{- Failed at: #if parameters.compressed?default(true) [in template "template/jquery/head.ftl" at line 44, column 1]}}
> {{---- }}
> The file "template/jquery/head.ftl" is from struts2-jquery-plugin (version 4.0.3).
>  
> The stack trace contains this:
> {{[WARNING] /home.action}}
> {{javax.servlet.ServletException: javax.servlet.ServletException: java.lang.RuntimeException: org.apache.jasper.JasperException: java.lang.IllegalStateException: Exception occurred when flushing data}}
>  
> Version 2.5.26 of struts-core is working fine. I bisected the git history and found that the problem first appears with commit [a65b8d5d5|https://github.com/apache/struts/commit/a65b8d5d51d8bed0bdb10dcca57058712a5c0521].
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)