So I think the problem is, that the CallMethod rule does not expect any parameters
since you have specified: 
          1. no parameters 
          2. there is no body text to retrieve the parameter value from
 
I guess it will help, if you specify 
 
          1. digester.addCallMethod("access/reader", "setReader", 1);
          2. digester.addCallParam("access/reader", 0, true);
 
so that your RWClass instance will be taken from the stack to tell the
call method rule to invoke setReader(RWClass) respectively setReader(Object) 
later on.
 
Hope this solves your problem!!!
 
Regards,
CK
 
 
 
-----Urspr�ngliche Nachricht----- 
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Gesendet: Do 28.08.2003 10:46 
An: Jakarta Commons Users List 
Cc: 
Betreff: [digester] interface and setter



        I have a class that have 2 private attributes Reader and Writer who define
        getter and setter methodes
        
        I use an factory to instanciate attributes class. I define it like this :
        
        <acces name="SuivitServices">
              <reader classe="com.arso.trelaze.socle.persistance.RWClass"/>
              <writer classe="com.arso.trelaze.socle.persistance.RWClass"/>
        </acces>
        
        I call factories for the reader and writer to instanciate the good class :
        
        digester.addFactoryCreate( "acces/reader",
                                    "com.arso.trelaze.socle.persistance.ReaderFactory" 
);
        
        It works perfect I get an RWClass who implement both the reader interface
        and the writer interface.
        But when I try to call the setter void setReader(Reader reader) with the
        rule :
        digester.addCallMethod( "acces/reader", "setReader", 0 );
        I had the following error :
        
        java.lang.NoSuchMethodException: No such accessible method: setReader() on
        object: com.arso.trelaze.socle.persistance.RWClass
                at
        org.apache.commons.digester.Digester.createSAXException(Digester.java:2383)
                at
        org.apache.commons.digester.Digester.createSAXException(Digester.java:2409)
                at
        org.apache.commons.digester.Digester.endElement(Digester.java:1067)
                at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
        Source)
                at
        org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
        Source)
                at
        org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
        Source)
                at
        
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
        Source)
                at
        org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
        Source)
                at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
        Source)
                at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
        Source)
                at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
                at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
        Source)
                at org.apache.commons.digester.Digester.parse(Digester.java:1600)
                at
        
com.arso.trelaze.socle.persistance.ConfigurationLoader.chargerConfiguration(ConfigurationLoader.java:90)
        
        I think it was an introspection error : it try to find a void
        setReader(RWClass reader) and don't find it but how could I do to make
        digester calling the good setter ?
        I try to define it has void setReader(Object reader) but I had the same
        error.
        
        I am new to digester so sorry if it is an evidence for you.
        
        thanks
        Nicolas
        
        ---------------------------------------------------------------------
        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]

Reply via email to