hibernate-3.2.5.ga, hibernate-annotations-3.3.0.GA, HibernateTools-3.2.0.beta10, Oracle 9.2.0.8
I've :
- created hibernate.cfg.xml
- created hibernate console usign hibernate.cfg.xml (with "Annotations" option)
- used console to create code generator
- used generator to create java class from jdbc connection (Domain generator) and to insert its definitions in hibernate.cfg.xml (with enabled options "Use Java 5 syntax" and "Generate EJB3 annotations")
Next, when I'm trying to open console (Create Session Factory or double-click) I'm getting an exception :
org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping class="pl.com.pentacomp.kpp.daj.SourceInterfaceVersions"/>
This exception raises if references to any generated class appears in hibernate.cfg.xml.
It seems Hibernate Tools doesn't see hibernate-annotations.jar (or hibernate-commons-annotations.jar) - but generator does !
I was trying to include directy this library into classpath in console definition but with no success.
I'm very astonish because I've repeated all described above operations in new separate Eclipse project (only to test Hibernate Tools) and I have no problems with console (everything was OK).
It means Hibenate Tools behaviour is not deterministic?
Any idea how to solve this problem (I need to have working console in main project) ?
|