I get a Freemarker template error when I include struts plugins as
dependencies like jfreechart and jasperreports. This only happens on
long jsp pages like editprofile. The page actually still works, but
right at the bottom I get the freemarker error output. I include struts
plugins in my pom as follows for example:

 

      <dependency>

            <groupId>jasperreports</groupId>

            <artifactId>jasperreports</artifactId>

            <version>1.0.0</version>

            <scope>compile</scope>

                <exclusions>

                        <exclusion>

                                <groupId>org.appfuse</groupId>

 
<artifactId>appfuse-hibernate</artifactId>

                        </exclusion>

                </exclusions>

       </dependency>

 

The exclusion is necessary to avoid conflicts with xwork which is
already loaded by struts core. This happens on basic appfuse ie no other
pojos etc. included yet (only the dependency added). I use struts basic
archtype on m5. I saw a similar problem on some other lists which
suggests it has to do with an issue in maven 2.0.6 where there are
version lists as is the case for example with jasperreports. I get the
same problem with maven 2.0.7 as well and I am not sure if that is
actually the problem here. Here is part of the stack trace (which is
very long) which is pasted from the rendered jsp page

 

The userlist jsp does not give this error.

 

FreeMarker template error!

 
Method public java.util.List
org.apache.struts2.components.Form.getValidators(java.lang.String) threw
an exception when invoked on [EMAIL PROTECTED]
The problematic instruction:
----------
==> list tag.getValidators("${tagName}") as validator [on line 23,
column 9 in template/xhtml/form-close-validate.ftl]
 in include "/${parameters.templateDir}/xhtml/form-close-validate.ftl"
[on line 3, column 1 in template/css_xhtml/form-close.ftl]
----------
 
Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: Method public java.util.List
org.apache.struts2.components.Form.getValidators(java.lang.String) threw
an exception when invoked on [EMAIL PROTECTED]
        at
freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136)
        at
freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
        at
freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
        at freemarker.core.IteratorBlock.accept(IteratorBlock.java:87)
etc...
 

 

Travers

Reply via email to