On 8/20/01 3:21 PM, "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:

> Jason, I think I fixed the underlying cause of this with the patch I just
> checked in.  CallMethodRule was pushing an array to accumulate the
> parameters onto the object stack, which interfered with the call that
> (3) made onto the object immediately beneath the parameters array (which
> it expected to be the bean in question.  Now, parameter arrays are
> accumulated onto a separate stack, so you can have (1), (2), and (3) -- or
> as many more as you want.
> 
> Could you try this with current CVS code?

I tried the code from CVS with the test and everything is cool. Thanks
Craig, much appreciated :-)
 
> Craig
> 
> 
> On Sun, 19 Aug 2001, Jason van Zyl wrote:
> 
>> Hi,
>> 
>> I'm not sure if this is a bug in digester or not ...
>> 
>> I have the following scenerio:
>> 
>> 
>> <module name="bsf">
>>   <description>
>>     Bean Scripting Framework
>>   </description>
>>   <cvs repository="devworks" dir="bsf"/>
>> </module>
>> 
>> 
>> (1)
>> addObjectCreate("module", moduleClass);
>> addSetProperties("module");
>> addCallMethod("module/description", "setDescription", 0);
>> 
>> (2)
>> addCallMethod("module/cvs", "setRepositoryName", 1);
>> addCallParam("modules/cvs", 0, "repository");
>> 
>> (3)
>> addCallMethod("module/cvs", "setCvsdir", 1);
>> addCallParam("modules/cvs", 0, "dir");
>> 
>> If I execute (1) and (2) I get the following debug log:
>> 
>> New org.apache.gump.entity.Module
>> Set org.apache.gump.entity.Module
>> properties Call org.apache.gump.entity.Module.setDescription(Bean Scripting
>> Framework/java.lang.String) Call
>> org.apache.gump.entity.Module.setRepositoryName(devworks/java.lang.String)
>> 
>> But if I execute (1), (2), and (3) I get this is the debug log:
>> 
>> New org.apache.gump.entity.Module
>> Set org.apache.gump.entity.Module
>> properties
>> Call org.apache.gump.entity.Module.setDescription(Bean Scripting
>> Framework/java.lang.String) Call
>> [Ljava.lang.String;.setCvsdir(bsf/java.lang.String)
>> End event threw
>> exception
>> java.lang.NoSuchMethodException
>> 
>>> From the log it appears that setRepository(String) isn't called and than
>> setCvsdir(String) is invoked using a String instead of the Module object. I
>> might possibly be doing something wrong, and I am looking at the source now,
>> but this might be a bug I don't know enough about the digester yet. Thanks.
>> 
>> -- 
>> 
>> jvz.
>> 
>> Jason van Zyl
>> 
>> http://tambora.zenplex.org
>> http://jakarta.apache.org/turbine
>> http://jakarta.apache.org/velocity
>> http://jakarta.apache.org/alexandria
>> http://jakarta.apache.org/commons
>> 
>> 
>> 

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons


Reply via email to