Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 65523 invoked from network); 9 Sep 2004 06:52:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Sep 2004 06:52:06 -0000 Received: (qmail 45780 invoked by uid 500); 9 Sep 2004 06:52:02 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 45385 invoked by uid 500); 9 Sep 2004 06:51:54 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 45371 invoked by uid 99); 9 Sep 2004 06:51:54 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 08 Sep 2004 23:51:54 -0700 Received: (qmail 17956 invoked by uid 50); 9 Sep 2004 06:53:38 -0000 Date: 9 Sep 2004 06:53:38 -0000 Message-ID: <20040909065338.17955.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 31137] New: - Caching of rules X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=31137 Caching of rules Summary: Caching of rules Product: Commons Version: 1.5 Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Digester AssignedTo: commons-dev@jakarta.apache.org ReportedBy: larsvonk@hotmail.com Hello, I am trying to define my rules in a xml file, read it once and reuse them throughout the application. I experienced the following problems by doing so: I defined my rules in a rule-file and created a RulesSet with the org.apache.commons.digester.xmlrules.FromXmlRuleSet. However when i reused this RuleSet for the second Digester call: Digester digester = new Digester() digester.addRuleSet(rsh.getRuleSet()); (where rsh.getRuleSet() returns the one instance of the RuleSet), the call addRuleSet failed with a "java.lang.NoSuchMethodException: No such accessible method: add() on object: org.apache.commons.digester.ObjectCreateRule." This is logical because there is no such method in ObjectCreateRule. If i create a new RuleSet for each digester it works fine. I did some debugging and i found out that when you add a RuleSet to a Digester the Digester performs a [ruleSet.addRuleInstances(this);] Is it true that this call adds all the standard rules to the RulesSet again so they are now devined double in the RuleSet? What is the proper way to define your rules in a xml file and create Rules from that file. In http://wiki.apache.org/jakarta-commons/Digester/FAQ 1.3 is stated that one can reuse a RulesBase safely, but how can a RulesBase be created from a xml file? Does the FAQ 1.3 not apply to a RulesSet? Regards, Lars Vonk --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org