This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am trying to save data using session.saveOrUpdate(obj). Here obj is a bean object and is returned by calling a method from a class that is in another jar. The bean class is also defined in this jar file.
For e.g in below Market.hbm.xml file, the Market bean is in the jar file and the package points to the jar. In MktPersistance.java, the below error is thrown at saveOrUpdate(). Looks like Market class is not being identified since its in the jar file. Also, the values in obj object are displaying correctly logger.info("\nEntity to be persisted=" + obj).
If you use JPA entities, you must mention your entity in "hibernate.cfg.xml" that way:
<mapping class="com.pnd.data.Market" />