cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Bug 148260 - Not able to run HQL query
: Not able to run HQL query
Status: VERIFIED FIXED
: javaee
Hibernate
: 6.5
: All Mac OS X
: P2 (vote)
: 6.5
Assigned To:
:
:
:
: REGRESSION
:
:
  Show dependency treegraph
 
Reported: 2008-09-24 16:20 by
Modified: 2008-10-13 09:56 (History)
Issue Type: DEFECT
:


Attachments
cfg (1.61 KB, text/plain)
2008-09-24 16:20, Jan Horvath
Details
log (86.74 KB, text/plain)
2008-09-24 16:21, Jan Horvath
Details
testing project (15.15 KB, text/plain)
2008-09-25 09:44, Jan Horvath
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-09-24 16:20:13
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.
------- Comment #1 From 2008-09-24 16:20:58 -------
Created an attachment (id=70491) [details]
cfg
------- Comment #2 From 2008-09-24 16:21:50 -------
Created an attachment (id=70492) [details]
log
------- Comment #3 From 2008-09-24 16:25:26 -------
I've reproduced similar behavior with MySQL as well
------- Comment #4 From 2008-09-25 09:42:46 -------
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.
------- Comment #5 From 2008-09-25 09:44:01 -------
Created an attachment (id=70551) [details]
testing project
------- Comment #6 From 2008-10-02 16:13:42 -------
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)
------- Comment #7 From 2008-10-07 20:05:41 -------
Fixed : http://hg.netbeans.org/main/rev/ec686a6c2726

The issue with mapping processing for HQL execution is now solved.
------- Comment #8 From 2008-10-13 09:56:09 -------
Verified in NetBeans IDE Dev (Build 200810111401) with JDBC and MySQL
databases.