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.
Product Version: NetBeans IDE Dev (Build 200809241401) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119 System: Mac OS X version 10.5.5 running on i386; MacRoman; en_EN (nb) -create a new web application -generate POJOs from oracle database -run HQL query 'from Division' -ERROR: org.hibernate.MappingException: Association references unmapped class: pojo.Employee at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2380) at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2662) at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43) at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:324) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859) It is strange because the Employee class is mapped in the cfg.
Created attachment 70491 [details] cfg
Created attachment 70492 [details] log
I've reproduced similar behavior with MySQL as well
It is issue is not connected to any particular database or jdbc driver. POJOs are generated correctly. Looks like a regression, reproduced with the schema which used to work in previous builds.
Created attachment 70551 [details] testing project
I am running into something similar, but different exception. 1. Create web app 2. generate pojos + mapping files from sakila/MySQL db 3. run HQL query 'from Film' The following error is displayed in the HQL query results window: org.hibernate.DuplicateMappingException: Duplicate collection role mapping dvdrental.Language.filmsForOriginalLanguageId at org.hibernate.cfg.Mappings.addCollection(Mappings.java:124) at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2066) at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2041) at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:359) at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:273) at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144) at org.hibernate.cfg.Configuration.add(Configuration.java:669) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:519) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:286) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
Fixed : http://hg.netbeans.org/main/rev/ec686a6c2726 The issue with mapping processing for HQL execution is now solved.
Verified in NetBeans IDE Dev (Build 200810111401) with JDBC and MySQL databases.