Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Entity Manager doesn't throw SQL Exceptions

843830Feb 21 2008 — edited Feb 22 2008
I'm using the default (TopLink) Entity Manager for persistance. I'm using EJB 3.0 running on SJSAS 9.0 with Microsoft's JDBC driver for SQL Server 2005 configured on the server.

During setup I misspled the database name, no biggie to fix. Obviously this generated a SQLException for not being able to connect to the database. The problem was that I had to go look at the SJSAS log files to find the error, the EM reported no error, and in fact had no exception what so ever!

Why didn't my Entity Manager catch the SQLException? It is kind of scary not to be able to report a SQLException! Do I have something mis-configured? How can I handle this so a SQLException doesn't go un-reported to the client in some way.

Thank you very much,

dr_linux
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2008
Added on Feb 21 2008
4 comments
1,242 views