InterviewSolution
Saved Bookmarks
| 1. |
What happens when the no-args constructor is absent in the Entity bean? |
|
Answer» Hibernate framework INTERNALLY uses Reflection API for creating entity bean instances when GET() or load() METHODS are called. The method Class.newInstance() is used which requires a no-args constructor to be PRESENT. When we don't have this constructor in the entity beans, then hibernate fails to instantiate the bean and hence it throws HibernateException. |
|