Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.sql.SQLException is the right exception-type?

5 views
Skip to first unread message

gbattine

unread,
Oct 18, 2006, 4:09:10 AM10/18/06
to
Hi guys,
i've a question.
I've defined a custom error page for my jsf application and now i've to
define in web.xml how calling this page when it's needed.
In my application i've some mysql exceptions like

java.sql.SQLException: Cannot delete or update a parent row: a foreign
key constraint fails (`microarray/esperimento`, CONSTRAINT
`FK_RELATIONSHIP_2` FOREIGN KEY (`USERNAME`) REFERENCES `utente`
(`USERNAME`))
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)
at
com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1125)


i've defined in this way my web.xml

<error-page>
<exception-type>java.sql.SQLException</exception-type>
<location>/pages/protected/errorDisplay.jsp</location>
</error-page>


but when this exception is throwned i see it in normal stacktrace and
not in a jsp page.
Can someone help me solving my problem?
Thanks

0 new messages