get()
or load()
methods. The method Class.newInstance()
is used for this and it requires no-args
constructor. So if you won’t have no-args
constructor in entity beans, hibernate will fail to instantiate it and you will get HibernateException.