2) After adding this class i got another exception
that i solved by explicitly downloading lucene.2.9.1.jar from apache's website.
Now i am able to insert records in DB.
However, this whole case has generated few doubts in my mind.
1) Why one has to use JPA annotation? isn't hibernate annotation jar sufficient enough to do the same work what JPA annotations do ?
2) Why at all one use annotations ? because every thing that can be done in annotation can be done easily by mapping hbm.xml files .
3) Why in my case there is dependency on lucene.jar ? while i haven't seen on any of tutorial on web using this jar in hibernate .
i am using hibernate-core-3.3.2.GA.jar and hibernate-annotations.3.3.1.jar and hibernate - common-annotation.3.3.1.jar and hibernate-jpa.2.0.api.jar