Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 148260 - Not able to run HQL query
Not able to run HQL query
Product: javaee
Classification: Unclassified
Component: Hibernate
All Mac OS X
: P2 (vote)
: 6.x
Assigned To: Vadiraj Deshpande
Depends on:
Blocks: 253164
  Show dependency treegraph
Reported: 2008-09-24 16:20 UTC by Jan Horvath
Modified: 2015-06-24 14:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

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

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Horvath 2008-09-24 16:20:13 UTC
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'
org.hibernate.MappingException: Association references unmapped class: pojo.Employee
	at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(
	at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(
	at org.hibernate.cfg.CollectionSecondPass.doSecondPass(
	at org.hibernate.cfg.Configuration.secondPassCompile(
	at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(
	at org.hibernate.cfg.Configuration.buildSessionFactory(
	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(

It is strange because the Employee class is mapped in the cfg.
Comment 1 Jan Horvath 2008-09-24 16:20:58 UTC
Created attachment 70491 [details]
Comment 2 Jan Horvath 2008-09-24 16:21:50 UTC
Created attachment 70492 [details]
Comment 3 Jan Horvath 2008-09-24 16:25:26 UTC
I've reproduced similar behavior with MySQL as well
Comment 4 Jan Horvath 2008-09-25 09:42:46 UTC
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 Jan Horvath 2008-09-25 09:44:01 UTC
Created attachment 70551 [details]
testing project
Comment 6 Kenneth Ganfield 2008-10-02 16:13:42 UTC
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(
	at org.hibernate.cfg.HbmBinder.createClassProperties(
	at org.hibernate.cfg.HbmBinder.createClassProperties(
	at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(
	at org.hibernate.cfg.HbmBinder.bindRootClass(
	at org.hibernate.cfg.HbmBinder.bindRoot(
	at org.hibernate.cfg.Configuration.add(
	at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(
	at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(
	at org.hibernate.cfg.Configuration.buildSessionFactory(
	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(
Comment 7 Vadiraj Deshpande 2008-10-07 20:05:41 UTC
Fixed :

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

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo