Mark Spritzler wrote:OK, so it looks like you have your configuration all set up and correct.
The error you are getting is now specific to JPA/Hibernate and not a Spring issue. There is something wrong with your Mapped class. It looks like you didn't set the @GeneratedValue for the @Id correctly or, the database that you are connecting to does not have the Table in it that you are mapping your class to.
Mark Spritzler wrote:Why do you define two SessionFactories in your config file. The error that you are receiving is coming from the first one, because you did not put the location of the hbm.xml into the hibernate.cfg.xml.
First choose one bean to define for us, then we can help you get that to work if it doesn't work.
Pawan Kr Gupta wrote:Dear The second code will not compile.
This will give you a compile time error - incompatible types error , required:java.util.List<javax.swing.Document> found :java.util.HashSet