Hello friends,
I am having this problem while using hibernateTemplate to save the contents of an annotated POJO class into database using Hibernate. My application uses Spring to handle the services and Hibernate (org.springframework.orm.hibernate3.HibernateTemplate) to handle the database functionality. In my Data Access Object (DAO) class, I have a simple method which gets a VO (POJO) class and saves it to the database using hibernateTemplate.save(obj). The class is :
When the above method is run, a "null" is being printed on the console log and it is not being saved into database. There is no other error shown. There is no null values in the VO class as I've tried printing the values in it. In the spring applicationContext, I've created a bean for this class as :
The annotated VO class looks like :
I am running this application on apache
tomcat 6 and MySQL database. Can you please help me identify problems in the code if any. Do you want me to put the log appearing in the console on application startup?
Thanks in advance.