Since we have customized templates, it may be our fault. If you can
exclude our customized templates from being merged, you can see if
this happens with Struts's default templates. If it does, it's a
Struts bug. If it doesn't, it's our bug.

Matt

On 7/18/07, Travers Snyman <[EMAIL PROTECTED]> wrote:
Thanks Matt,

Removing the following line from
/src/main/webapp/css_xhtml/form-close.ftl

<#include "/${parameters.templateDir}/xhtml/form-close-validate.ftl" />

Solves the problem. I would like to understand the problem though - is
it struts core or appfuse ? Why is including the struts-plugin
dependencies causing this?

Travers


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt
Raible
Sent: 17 July 2007 04:22 PM
To: users@appfuse.dev.java.net
Subject: Re: [appfuse-user] Freemarker error when including struts
plugin dependencies

Are you using full-source, or a merged/embedded version of AppFuse?
The only thing I can think of is its a bug in our custom templates. If
you copy the templates from
target/appname-version/src/main/webapp/template - you can customize
them and possibly fix this bug. Otherwise, you might be able to
exclude this directory from being merged by modifying your pom.xml.

Matt

On 7/17/07, Travers Snyman <[EMAIL PROTECTED]> wrote:
>
>
>
>
> 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


--
http://raibledesigns.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to