| try {
| user = (User) em.createQuery("from User u where
u.username=:upn")
| .setParameter("upn",upn)
| .getSingleResult();
| } catch (EJBException e) {
| logger.debug("Could not find Entity in DB for user
"+upn);
| }
|
Should be
| try {
| user = (User) em.createQuery("from User u where
u.username=:upn")
| .setParameter("upn",upn)
| .getSingleResult();
| } catch (EntityNotFoundException e) {
| logger.debug("Could not find Entity in DB for user
"+upn);
| }
|
I'm not sure if Hibernate is throwing the correct EntityNotFoundException, so,
maybe you should catch Exception instead.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3920289#3920289
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3920289
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user