This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping class="org.netbeans.test.entity.Testsuite"/> | ||
---|---|---|---|
Product: | javaee | Reporter: | Jan Horvath <jhorvath> |
Component: | Hibernate | Assignee: | Vadiraj Deshpande <vadirajvd> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | hmichel |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=64345 | ||
Issue Type: | DEFECT | Exception Reporter: | 64345 |
Description
Jan Horvath
2008-06-11 14:33:25 UTC
AnnotationConfiguration is yet to be supported. Fix : Use AnnotationConfiguration instead of Configuration. This issue blocks HQL from using with Annotated classes and should be fixed for Beta Initial fix: http://hg.netbeans.org/main/rev/46c9d34cf55b *** Issue 141470 has been marked as a duplicate of this issue. *** Fixed (with workaround) http://hg.netbeans.org/main/log?rev=136996 Honza, Can you please verify the issue so that we can check into branch. Please also add the keyword once you have verified. thanks I was able to run a query only on fresh project with entity classes generated by rev.eng. from the sample db. When I was trying HQL editor on my existing project with entity classes generated by Entity Classes from DB it was no successful. I've got an exception: org.hibernate.hql.ast.QuerySyntaxException: Testsuite is not mapped [select t from Testsuite t] at org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:158) at org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:87) at org.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:70) That exception is due to the reason of using related Entities in the query. Now HQL Editor supports related entities (OneToMany, ManyToMany etc...). http://hg.netbeans.org/main/rev/653397c12bef Please reverify. I was not successful with query on the entity with a relationship. org.hibernate.AnnotationException: @OneToOne or @ManyToOne on org.netbeans.test.entity.Testsuite.hostname references an unknown entity: org.netbeans.test.entity.Hostname at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:81) at org.hibernate.cfg.AnnotationConfiguration.processFkSecondPassInOrder(AnnotationConfiguration.java:499) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:304) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859) at org.netbeans.modules.hibernate.hqleditor.HQLEditorController.getHibernateSessionFactoryForThisContext(HQLEditorController.java:187) at org.netbeans.modules.hibernate.hqleditor.HQLEditorController.processAndConstructSessionFactory(HQLEditorController.java:275) at org.netbeans.modules.hibernate.hqleditor.HQLEditorController$1.run(HQLEditorController.java:112) Honza, Can you please attach the IDE log also ? Thnx Fixed remaining issues: http://hg.netbeans.org/main/rev/a7405dd38963 http://hg.netbeans.org/main/rev/6cf97ed3ff9e Verified Product Version: NetBeans IDE Dev (Build 200811240201) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Linux version 2.6.27-7-generic running on i386; UTF-8; en_US (nb) |