JSF hiding exceptions?

Posted by bshacklett on Stack Overflow See other posts from Stack Overflow or by bshacklett
Published on 2010-05-31T23:39:07Z Indexed on 2010/05/31 23:43 UTC
Read the original article Hit count: 320

Filed under:
|
|

I have a managed bean for a JSF page which is doing JPA calls in the constructor to populate fields in the bean. I'm having a bit of trouble with another call to persist an entity (to populate data for testing). I'm expecting it to throw some sort of exception since it's not working, but I'm not getting anything. Just of the heck of it I tried the following:

Query newQuery = em.createQuery("Bad Syntax");
List newList = newQuery.getResultList();

I'd expect an IllegalArgumentException here since the query string is completely invalid, but the page still loads and I don't see any exceptions anywhere.

Am I right in expecting this exception? If so, why am I not seeing it?

© Stack Overflow or respective owner

Related posts about java

Related posts about jsf