I followed Chapter 1 of the
Hibernate Annotations Reference but couldn't get Hibernate to recognize my hibernate.cfg.xml . As a Hibernate novice, it took me a long time of poking around to realize that the example code given in Section 1.2
Quote:
sessionFactory = new AnnotationConfiguration().buildSessionFactory();
should call the configure() method, as follows:
Quote:
sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
This fixed my problem. Perhaps a doc change could help others avoid the same problem.
Great work otherwise, keep it up!