commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chad Woolley <li...@thewoolleyweb.com>
Subject Re: Digester / BeanUtils - No Such Accessible Method error
Date Tue, 10 Feb 2004 17:02:34 GMT
José Antonio Pérez Testa wrote:
> Can you send the rules and an extract of the code you are using ?

Sure.  If you want to actually see the error happen, I can give you instructions 
to check out my source and run the unit test.

Here is the XML:

<?xml version="1.0" encoding="UTF-8"?>
<virtualmock xmlns="http://www.virtualmock.org/virtualmock.xsd">
	<excluded-classes>
		<exclusion-pattern>test.*</exclusion-pattern>
	</excluded-classes>
	<rules>
		<rule>
			<rule-type>org.virtualmock.rule.AllRecordedCallsMustBeInvokedRule</rule-type>
		</rule>
	</rules>
</virtualmock>

-------------------------------------

Here is the Digester:

         vmConfig = new VMConfig();

         digester.push(vmConfig);
         digester.setValidating(validate);

         digester.addCallMethod("virtualmock/excluded-classes/exclusion-pattern",
             "addClassExclusionPattern", 0);

         digester.addObjectCreate("virtualmock/rules/rule", RuleConfig.class);
         digester.addBeanPropertySetter("virtualmock/rules/rule/rule-type",
             "ruleType");
         digester.addSetNext("virtualmock/rules/rule", "addRuleConfig", 
"org.virtualmock.configuration.RuleConfig");

         try {
             digester.parse(inputStream);
         } catch (SAXException saxException) {

-------------------------------------

Here is the Parent object:

public class VMConfig {
     private List classExclusionPatterns = null;
     private List ruleConfigs = null;

     public VMConfig() {
         classExclusionPatterns = new ArrayList();
         ruleConfigs = new ArrayList();
     }

     public List getClassExclusionPatterns() {
         return classExclusionPatterns;
     }

     public List getRuleConfigs() {
         return ruleConfigs;
     }

     public void addClassExclusionPattern(String classExclusionPattern) {
         classExclusionPatterns.add(classExclusionPattern);
     }

     public void addRuleConfig(RuleConfig ruleConfig) {
         ruleConfigs.add(ruleConfig);
     }
}

-------------------------------------

Here is the Child object:

public class RuleConfig {
     private String ruleType = null;

     public void setRuleType(String ruleType) {
         this.ruleType = ruleType;
     }

     public String getRuleType() {
         return ruleType;
     }

     public RuleConfig() {
         super();
     }

}







---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message