I have a managed bean for a JSF page that makes JPA calls in the constructor to populate the fields in the bean. I have problems with another call to save the entity (fill in the data for testing). I expect it to close some kind of exception, since it doesn't work, but I get nothing. Just because of this, I tried the following:
Query newQuery = em.createQuery("Bad Syntax");
List newList = newQuery.getResultList();
I would expect it IllegalArgumentExceptionhere since the query string is completely invalid, but the page is still loading, and I don't see any exceptions anywhere.
Can this exception be expected? If so, why don't I see him?
source
share