Getting native jdbc exception

View: New views
2 Messages — Rating Filter:   Alert me  

Getting native jdbc exception

by Giambalvo Christian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Getting native jdbc exception

Hello,

how can i get the sql exception thrown by the native sql driver?
Example: if i try to login into an oracle database with wron username, oracle answers with an Message containing the "ORA-01017" error code.

This error code gets logged in the logfiles, but c3p0 throws an TimeOutException and hides the orginal error message. But i need this message to forward the user to a given error page. Is there a property to set or a method to override to handle this?

I'm a newbie with c3p0 and connectionpooling in general, so please be patient with me :)

Greets

chris


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
c3p0-users mailing list
c3p0-users@...
https://lists.sourceforge.net/lists/listinfo/c3p0-users

Re: Getting native jdbc exception

by Cecchi Sandrone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey, I have the same problem as you. I'm using spring with c3p0. However, this doesn't happen when using Commons DBCP (JDBC exceptions are correctly thrown).
Giambalvo Christian wrote:
Hello,

how can i get the sql exception thrown by the native sql driver?
Example: if i try to login into an oracle database with wron username,
oracle answers with an Message containing the "ORA-01017" error code.
This error code gets logged in the logfiles, but c3p0 throws an
TimeOutException and hides the orginal error message. But i need this
message to forward the user to a given error page. Is there a property
to set or a method to override to handle this?

I'm a newbie with c3p0 and connectionpooling in general, so please be
patient with me :)

Greets

chris

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
c3p0-users mailing list
c3p0-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/c3p0-users