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

G

gbattine

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top