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.

Bug 243018

Summary: Exception when using HQL query editor in Maven web app
Product: javaee Reporter: Kenneth Ganfield <kganfield>
Component: HibernateAssignee: Sergey Petrov <sj-nb>
Severity: normal CC: pjiricka, ser_berto
Priority: P2    
Version: 8.0   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

Description Kenneth Ganfield 2014-03-18 17:35:32 UTC
Product Version: NetBeans IDE 8.0 (Build 201403052200)
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Mac OS X version 10.8.5 running on x86_64; UTF-8; en_US (nb)

The HQL Query editor throw exception when trying to run a query.

Possibly it is related to the translator factory (see #241729).
I tried with two different versions of the translator factory 

When using the default org.hibernate.hql.classic.ClassicQueryTranslatorFactory, I see the following exception in the editor:

java.lang.ClassCastException: dvdrental.Language_$$_javassist_12 cannot be cast to javassist.util.proxy.ProxyObject
	at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(
	at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.getProxy(
	at org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(

If I try using org.hibernate.hql.internal.ClassicQueryTranslatorFactory as mentioned in issue #241729, the following exception is displayed in the editor:

org.hibernate.HibernateException: could not instantiate QueryTranslatorFactory: org.hibernate.hql.internal.ClassicQueryTranslatorFactory
	at org.hibernate.cfg.SettingsFactory.createQueryTranslatorFactory(
	at org.hibernate.cfg.SettingsFactory.buildSettings(
Comment 1 Sergey Petrov 2014-03-21 15:23:01 UTC
p2, seems important, and need to reevaluate, but simple queries on fresh works fine, priority isn't final.
Comment 2 Sergey Petrov 2014-07-03 16:03:57 UTC
interesting discussion,  I don't knwo why it works in some cases and may not work in another.
I can reproduce with tutorial steps.
I may need to rollback to older hibernate or somehow combine with another javassist version.
Comment 3 Sergey Petrov 2014-07-03 16:11:43 UTC
forget to add link
Comment 4 Sergey Petrov 2014-07-07 15:56:23 UTC
seems fixed with
Comment 5 Quality Engineering 2014-07-08 02:27:42 UTC
Integrated into 'main-silver', will be available in build *201407080001* on (upload may still be in progress)

User: Sergey B. Petrov <>
Log: #243018 change javassist classes loading way
Comment 6 Sergey Petrov 2014-09-18 08:55:16 UTC
*** Bug 246910 has been marked as a duplicate of this bug. ***