Hi,
When running strutsvalidationxml over two forms I get the following
error:
[webdoclet] SEVERE: Invoking method failed:
xdoclet.modules.apache.struts.StrutsValidatorTagsHandler.ifFormHasFields
, line=52 of template file: jar:file:/Users/brownie/dc/bugs/
infiniteValidation2/lib/xdoclet-apache-module-1.2.2.jar!/xdoclet/
modules/apache/struts/resources/validation_xml.xdt
[webdoclet] java.lang.reflect.InvocationTargetException
This occurs multiple times at the bottom it says:
[webdoclet] Caused by: java.lang.OutOfMemoryError
It appears that this error is due to the forms referring to each
other and creating an infinite loop.
Is there a simple way to get strutsvalidationxml to work in such cases?
The two forms (simplified to the smallest possible that produces the
error):
AccountForm.java
====================================================================
package com.wonka.webapp.form;
import org.apache.struts.validator.ValidatorForm;
/**
* @struts.form name="accountForm"
*/
public class AccountForm
extends ValidatorForm
implements java.io.Serializable
{
protected OrganisationForm organisation = new OrganisationForm();
/** Default empty constructor. */
public AccountForm() {}
public OrganisationForm getOrganisationForm()
{
return this.organisation;
}
/**
* @struts.validator
*/
public void setOrganisationForm( OrganisationForm organisation )
{
this.organisation = organisation;
}
}
====================================================================
OrganisationForm.java
====================================================================
package com.wonka.webapp.form;
import org.apache.struts.validator.ValidatorForm;
/**
* @struts.form name="organisationForm"
*/
public class OrganisationForm
extends ValidatorForm
implements java.io.Serializable
{
protected AccountForm defAccount = new AccountForm();
/** Default empty constructor. */
public OrganisationForm() {}
public AccountForm getDefAccountForm()
{
return this.defAccount;
}
/**
* @struts.validator
*/
public void setDefAccountForm( AccountForm defAccount )
{
this.defAccount = defAccount;
}
}
====================================================================
cheers
Andrew Browne
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user