Exception:
javax.ejb.ObjectNotFoundException:
No such entity!
Scenario:
findByPrimaryKey() method called on an EJB entity bean.
Not able to find a record with the provided key/id.
Solution:
There are two cases here :
- There is something wrong in the code, probably querying a wrong EJB to retrieve information, resulting in the exception.
- Probably you want to catch the exception and do something meaningful, when there is no record with the given key/id.
No comments:
Post a Comment