Hi all, being new to digester, I have no clue how to get around my problem. Here's the story:
I'm trying to parse a config xml that looks like this:
<root>
<a>
.......
<b>
.....
</b>
<b>
.....
</b>
</a>
<a>
.......
<b>
.....
</b>
<b>
.....
</b>
</a>
</root>


I have two beans (ABean and BBean)
and the factory :
class Factory {
processA(ABean ab){
.......
}
processB(BBean bb){
........
}
digest(){
Digester d = new Digester();
d.push(this); //stack bottom
d.addSetNext( "root/a/b", "processB" , "BBean"); // when root/a/b pattern mathes, execute processB on 'this' with BBean type param
d.addSetNext( "root/a", "processA", "ABean"); // when root/a pattern mathes, execute processA on 'this' with ABean type param
d.addObjectCreate( "root/a", ABean.class);
d.addObjectCreate( "root/a/b", BBean.class);


     ............... //var addCallMethod()
}
}

I get this error:

[DEBUG] Digester - -[SetNextRule]{root/a/b} Call Factory.processB([EMAIL PROTECTED])
[ERROR] Digester - -End event threw exception <java.lang.IllegalArgumentException: argument type mismatch>java.lang.IllegalArgumentException: argument type mismatch


Obviously, processB() was called with the wrong arg type(ABean instead of BBean) and that because the BBean obj was just poped from the stack.

Can you please help?

-- mihai



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to