cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: [BUG] Wrong error messages in database modular actions.
Date Sat, 17 May 2003 19:20:49 GMT
On 17.May.2003 -- 11:16 AM, Antonio Gallardo wrote:
> Hi:
> 
> I am using Modular Database actions. I also turned on all the
> <throw-exceptions> option in the configuration of all 3 Actions. When an
> error occur it always attach this string:
> 
> "Could not add record"
> 
> to the raised error (generated by JBDC Driver) even when we are deleting
> or updating a record.

I believe that the error message does not reflect the real cause because
it is placed in DatabaseAction rather than any of the sub classes.

> The complete error String I got is:
> 
> <snip>
> org.apache.cocoon.ProcessingException: Could not add record:
> java.sql.SQLException: ERROR: $2 referential integrity violation - key in
> bancos still referenced from empleados
> </snip>
> 
> The string is located at:
> 
> org.apache.cocoon.acting.modular.DatabaseAction.act(DatabaseAction.java:800)

see ;-)

> I think we dont need to attach any string, since the message returned by
> the JDBC controler is clear.
> 
> I the worst case we need to change the String to something like:
> 
> "A Database error" or "Cannot process the requested SQL statement".

Right, good suggestion. Will do that when I'm back tue/wed.
Thanks for reporting.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

Mime
View raw message