Digester 1.7

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Digester 1.7

Blake Meike
I've been using Digester 1.7 for several days now and it all seems good.
  I have only one small complaint.  Actually, it isn't even new to 1.7:

addCallMethod(pattern, method, 0);

and

<call-method-rule methodname="method" paramcount="0" />

behave in, perhaps, an unexpected manner.  The problem is compounded by
the fact that, in both cases, if you have, naively, defined a method on
the object on top of the stack with the signature:

public void method()

you will get an error message that says:

No such accessible method: method() on object: <tos>

Pretty confusing.

I think the plausible solution is a quick note in the commons-digester
FAQ that explains the semantics of:

addCallMethod(pattern, method, 0);
vs.
addCallMethod(pattern, method);

Just Sayin'
   Blake Meike

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[DbUtils] Handling null values during an update

Alfredo Ledezma Melendez
Hello,

I've been using dbutils with mysql, postgresql, even with SQL Server
successfully for quite a long time. But now I'm facing a little problem with
Oracle9i (thin-driver and jdbc-odbc). I have a table with two fields of type
DATE; when I try to UPDATE a row using methos update from QueryRunner in this
table using null values, it throws the exception:
java.sql.SQLException: Invalid column type Query: UPDATE factura SET
fechaFacturacion = ?, fechaPedido = ? WHERE folioECAC = ? Parameters: [null,
null, 278]
However, using not null values it runs perfect. I've been looking in some forums
and they say the problem is that driver does not how to set null values for
those values of the table. Is there any workaround, somebody has solved this
problem before, should I use PreparedStatement instead of QueryRunner?

Any help would be really appreciated.

Best regards,
____________________________________________
Alfredo Ledezma Mel?ndez.
Gerencia de Sistemas CRM
Consultor Externo de Sistemas de Atenci?n a Clientes
RadioMovil DIPSA, S. A. de C. V.
Ej?rcito Nacional No. 488, Col. Anahuac, C.P. 11570
M?xico D.F.




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [DbUtils] Handling null values during an update

David Graham
In the latest nightly builds, QueryRunner.fillStatement() uses
Types.VARCHAR to set columns to NULL:
http://jakarta.apache.org/commons/dbutils/xref/org/apache/commons/dbutils/QueryRunner.html#118

If you are using DbUtils 1.0, try a nightly build.  If you're already
using the latest code and it still fails, subclass QueryRunner and
override fillStatement() with the appropriate behavior.

David


--- Alfredo Ledezma Melendez <[hidden email]> wrote:

> Hello,
>
> I've been using dbutils with mysql, postgresql, even with SQL Server
> successfully for quite a long time. But now I'm facing a little problem
> with
> Oracle9i (thin-driver and jdbc-odbc). I have a table with two fields of
> type
> DATE; when I try to UPDATE a row using methos update from QueryRunner in
> this
> table using null values, it throws the exception:
> java.sql.SQLException: Invalid column type Query: UPDATE factura SET
> fechaFacturacion = ?, fechaPedido = ? WHERE folioECAC = ? Parameters:
> [null,
> null, 278]
> However, using not null values it runs perfect. I've been looking in
> some forums
> and they say the problem is that driver does not how to set null values
> for
> those values of the table. Is there any workaround, somebody has solved
> this
> problem before, should I use PreparedStatement instead of QueryRunner?
>
> Any help would be really appreciated.
>
> Best regards,
> ____________________________________________
> Alfredo Ledezma Mel?ndez.
> Gerencia de Sistemas CRM
> Consultor Externo de Sistemas de Atenci?n a Clientes
> RadioMovil DIPSA, S. A. de C. V.
> Ej?rcito Nacional No. 488, Col. Anahuac, C.P. 11570
> M?xico D.F.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


Get Firefox!
http://www.mozilla.org/firefox/


               
__________________________________
Discover Yahoo!
Stay in touch with email, IM, photo sharing and more. Check it out!
http://discover.yahoo.com/stayintouch.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Digester 1.7

Simon Kitching
In reply to this post by Blake Meike
On Tue, 2005-06-07 at 15:22 -0400, Blake Meike wrote:
> I've been using Digester 1.7 for several days now and it all seems good.

Thanks for the info.

>   I have only one small complaint.  Actually, it isn't even new to 1.7:
[snip]
> I think the plausible solution is a quick note in the commons-digester
> FAQ that explains the semantics of:
>
> addCallMethod(pattern, method, 0);
> vs.
> addCallMethod(pattern, method);

I agree that the API is not particularly well-designed in this case.

As the FAQ is on the wiki, please feel free to add an entry yourself;
that's why it's a wiki!

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]