struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject s:fielderror not working in Java 8, WebSphere
Date Tue, 22 May 2018 18:24:34 GMT
Struts, WebSphere, IBM Java 8 (level 1.8.0_161) on AIX.

We have a JSP with a plain <s:fielderrors /> element that works without issue when we
switch WebSphere back to Java 7, but in Java 8 produces the following error:

2018-05-22 12:43:24,384 ERROR [freemarker.runtime]: error - Error executing FreeMarker template
FreeMarker template error:
Java method "AbstractCollection.size()" threw an exception when invoked on LinkedHashMap$LinkedKeySet
object "[]"; see cause exception in the Java stack trace.

FTL stack trace ("~" means nesting-related):
        - Failed at: #assign eKeysSize = eKeys.size()  [in template "template/simple/fielderror.ftl"
at line 23, column 5]

Java stack trace (for programmers):
freemarker.core._TemplateModelException: [... Exception message was already printed; see it
above ...]
        at freemarker.ext.beans._MethodUtil.newInvocationTemplateModelException(
        at freemarker.ext.beans._MethodUtil.newInvocationTemplateModelException(
        at freemarker.ext.beans.SimpleMethodModel.exec(
        at freemarker.core.MethodCall._eval(
        at freemarker.core.Expression.eval(
        at freemarker.core.Assignment.accept(
        at freemarker.core.Environment.visit(
        at freemarker.core.Environment.visit(
        at freemarker.core.Environment.visit(
        at freemarker.core.Environment.process(
        at freemarker.template.Template.process(
        at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(
        at org.apache.struts2.components.UIBean.mergeTemplate(
        at org.apache.struts2.components.UIBean.end(
        at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(
.. my JSP
Caused by: java.lang.AbstractMethodError: java/util/AbstractCollection.size()I
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at freemarker.ext.beans.BeansWrapper.invokeMethod(
        at freemarker.ext.beans.SimpleMethodModel.exec(

Does anyone know what could be the cause of this?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message