Spring boot Thymeleaf间歇性抛出TemplateInputException和TemplateProcessingException

Spring boot Thymeleaf间歇性抛出TemplateInputException和TemplateProcessingException,spring-boot,thymeleaf,Spring Boot,Thymeleaf,我有一个springboot(2.1.0.RELEASE)webapp,我使用Thymeleaf作为模板引擎。 在一页中,我间歇性地出现以下错误。 如果我重新启动服务器或几小时后,这个错误通常会消失 2019-10-09 17:18:51.198 ERROR maa1n12-stg-004 --- [.1-6551-exec-51] o.s.b.w.s.s.ErrorPageFilter : Cannot forward to error page for reque

我有一个springboot(2.1.0.RELEASE)webapp,我使用Thymeleaf作为模板引擎。 在一页中,我间歇性地出现以下错误。 如果我重新启动服务器或几小时后,这个错误通常会消失

2019-10-09 17:18:51.198 ERROR maa1n12-stg-004 --- [.1-6551-exec-51] o.s.b.w.s.s.ErrorPageFilter              : Cannot forward to error page for
 request [/testExecutionResponse/getResponseByExecutionId/8517] as the response has already been committed. As a result, the response may have 
the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ib
m.ws.webcontainer.invokeFlushAfterService to false
org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/testCaseR
esponse/showExecutionResult.html]")
        at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:241)
        at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parseStandalone(AbstractMarkupTemplateParser.java:100)

Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: "executionSummary[i]" (template: "testCaseResponse/showExecutionResult" - line 133, col 49)

Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "executionSummary[i]" (template: "testCaseResponse/showExecutionResult" - line 133, col 49)
        at org.thymeleaf.spring5.expression.SPELVariableExpressionEvaluator.evaluate(SPELVariableExpressionEvaluator.java:290)
        at org.thymeleaf.standard.expression.VariableExpression.executeVariableExpression(VariableExpression.java:166)

Caused by: java.lang.IllegalStateException: Failed to instantiate CompiledExpression
        at org.springframework.expression.spel.standard.SpelCompiler.compile(SpelCompiler.java:111)
Caused by: java.lang.VerifyError: (class: spel/Ex124, method: getValue signature: (Ljava/lang/Object;Lorg/springframework/expression/EvaluationContext;)Ljava/lang/Object;) Expecting to find integer on stack
        at java.lang.Class.getDeclaredConstructors0(Native Method)

错误中提到的代码是

<tbody>
    <tr th:each="i : ${#numbers.sequence(executionSummary.size() - 1, 0, -1)}"
        th:with="summary=${executionSummary[i]}"
                th:classappend="${#strings.equals(summary.state,'SUCCESS')} ? 'alert alert-success' : 'alert alert-danger'">
                <td th:text="${summary.state}"></td>
                <td th:text="${summary.result}"></td>
                <td th:text="${summary.errorCategory}"></td>
                <td th:text="${summary.count}"></td>
        </tr>
</tbody>

我无法找到问题的根本原因


PS:这不是内存问题,因为所有其他组件都工作正常,内存使用率约为15-20%

您解决了这个问题吗?如果是,您可以与社区分享。否。我仍然被这个问题困扰着。