commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Pérez Testa <>
Subject Re: Help with digester!
Date Mon, 17 May 2004 13:22:45 GMT
It looks like everything is ok.
Look at the logs and see what's happening.
Maybe some problem with the arguments types. Try the method 
addCallMethod(String pattern, String methodName, int paramCount, 
String[] paramTypes)
and explicitly set the argument types. I've found a similar problem in 
calling ArrayList.add and it is because of the argument being 

Good luck.

Marco Mistroni wrote:

>Hi all,
>	I am experiencing problem with digester when I use
>The xml files for the rules.
>I have following SQL file :
><?xml version="1.0" encoding="UTF-8"?>
>  <statement>
>     <name>getUsers</name>
>     <value>select * from user_details</value>
>  </statement>
>  <statement>
>     <name>getContact</name>
>     <value>select *  from contact WHERE contact_ref = ? </value>
>  </statement>
>I want, for each statement, to populate an Hashtable with name as key
>Value as index.
>When running normal digester and setting rules in java code
>digester.addObjectCreate("sql", java.util.Hashtable.class);
>			digester.addCallMethod("sql/statement",
>			digester.addCallParam("sql/statement/name", 0);
>			digester.addCallParam("sql/statement/value",1);
>		} catch(Exception e) {
>the problem is that either I don't know how to do the same in an xml
>or my xml file for rules is incorrect.
>I have tried with the following
><?xml version="1.0"?>
>  <pattern value="sql">
>      <object-create-rule classname="java.util.Hashtable" />
>	   <set-properties-rule />
>	   <call-method-rule pattern="statement" methodname="put"
>             paramcount="2" />
>              <call-param-rule pattern="statement/name"
>              <call-param-rule pattern="statement/value"
>  </pattern>
>can anyone help?
>Thanx in advance and regards
>	Marco
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información
de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda
prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita
de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar
inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.

The information in this e-mail and in any attachments is confidential and solely for the attention
and use of the named addressee(s). You are hereby notified that any dissemination, distribution
or copy of this communication is prohibited without the prior written consent of Indra. If
you have received this communication in error, please, notify the sender by reply e-mail

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message