commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Klaudel <klei...@poczta.fm>
Subject [Digester] java.lang.NoSuchMethodException: No such accessible method: add() on object: org.apache.commons.digester.ObjectCreateRule
Date Fri, 08 Nov 2002 16:05:15 GMT
Hi,

I have rules like this:
<?xml version="1.0"?>
<digester-rules>
<pattern value="dml">
   <object-create-rule classname="DmlMap">
    <pattern value="select">
       <object-create-rule classname="Select" />
       <call-method-rule pattern="nazwa" methodname="setNazwa" 
paramcount="0" />
       <call-method-rule pattern="body" methodname="setBody" 
paramcount="0" />
	<call-method-rule pattern="bindparam" methodname="setParam" 
paramcount="2" />
       <call-method-rule pattern="bindparam/lp" paramnumber="0" />
       <call-method-rule pattern="bindparam/value" paramnumber="1" />
       <set-next-rule methodname="putDml" paramtype="Select"/>
    </pattern>
   </object-create-rule>
</pattern>
</digester-rules>

and I parse this :

File input = new File("test.xml");
File rules = new File("test2.xml");
Digester digester = DigesterLoader.createDigester( rules.toURL() );
DmlMap dm = (DmlMap)digester.parse( input );

and I get:
java.lang.NoSuchMethodException: No such accessible method: add() on 
object: org.apache.commons.digester.ObjectCreateRule
         at 
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:248)
         at 
org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
         at 
org.apache.commons.digester.Digester.endElement(Digester.java:1036)
         at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:568)
         at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:217)
         at 
org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:594)
         at 
org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:829)
         at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:748)
         at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1454)
         at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
         at 
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:525)
         at 
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:581)
         at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
         at 
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1157)
         at org.apache.commons.digester.Digester.parse(Digester.java:1514)
         at 
org.apache.commons.digester.xmlrules.FromXmlRuleSet.addRuleInstances(FromXmlRuleSet.java:137)
         at 
org.apache.commons.digester.Digester.addRuleSet(Digester.java:1610)
         at 
org.apache.commons.digester.xmlrules.DigesterLoader.createDigester(DigesterLoader.java:89)
         at pl.com.agora.uom.common.DmlDigest.digest(DmlDigest.java:25)
         at pl.com.agora.uom.common.DmlDigest.<init>(DmlDigest.java:17)
         at pl.com.agora.uom.common.DmlDigest.main(DmlDigest.java:36)
[ERROR] Digester - -End event threw exception 
<java.lang.NoSuchMethodException: No such accessible method: add() on 
object: org.apache.commons.digester.ObjectCreateRule>
[ERROR] DmlDigest - 
-org.apache.commons.digester.xmlrules.XmlLoadException: Error at (10, 
50: No such accessible method: add() on object: 
org.apache.commons.digester.ObjectCreateRule


What's wrong?

Tomek


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message