0 Replies Latest reply on Apr 16, 2004 12:39 PM by sbrbot

    SQLException and RemoveException


      In my database (Oracle 9i,JBoss 3.2.3) I have 1:n relationship between Departments and Employees tables with referential integrity set to prevent deleting Department until there's Employee referencing it.

      When I call remove method on Department EJB for department being currently referenced with employees, Oracle database prevents it and I get JDBC (SQLException) saying this is not allowed. That's exactly what I want but I want to proceed further. I want to warn user that he's not allowed to delete this dept while other emps reference it so I catch exception and redirect app workflow to warning. Problem is that JBoss shows the error stack of this SQLException in server console! I don't like JBoss to send stack of cought exception in console! How to prevent this?