NullPointerException in FromElement#findIntendedAliasedFromElementBasedOnCrazyJPARequirements with 'hibernate.query.jpaql_strict_compliance' enabled

Description

First off i do not know if this bug belongs to the Hibernate3(core) or Hibernate EntityManger branch, but have entered it against core because that is where the exception occurs (in org.hibernate.hql.ast.tree.FromClause.findIntendedAliasedFromElementBasedOnCrazyJPARequirements).

I have a relativley simple entity setup up to test a proof of concept. Persisting the data to the database is not a problem in the new version 3.2.0.GA, but the problems occurs when trying to perform a query on the persisted data, the very same query works with 3.2.0CR2 but gives a nullPointException in 3.2.0GA.

I have attached the java source for the entities + session bean (in hibernate_testcase.tar.gz/entities file) and the java class (in hibernate_testcase.tar.gz/service file) that is used to persist and query the data, and because this was only meant to be a proof of concept i have also included the .ear archive as apart from the entity definitions and session bean the only other thing it contains is a JBoss .sar archive which calls the static persist and query methods in the session bean (service test.testcase). Please note to use the .ear archive you need a datasource called Postgres_Test

Environment

hibernate 3.2.0GA, PostgreSQL 8.1.4 (using build 407 of the JDBC driver). JDK 1.5.0_06, JBoss 4.0.4GA, Operating system is Fedora Core 5

Activity

Show:
Owen Taylor
June 19, 2007, 8:33 PM

Here's a patch fixing the root cause of the problem.

Albert Briner
August 2, 2007, 10:32 AM

I can confirm that Owen's patch addresses the problem for Hibernate 3.2.0 GA. Thanks, Owen!

Steve Ebersole
October 3, 2007, 5:51 AM

trunk/3.2

GregG
January 2, 2008, 5:05 AM

When's the next 3.2.5 based release coming out?

Its still broken in the latest 3.2.5 GA download.

Can I get a working 3.2.5 GA from anywhere without having to build it myself?

Steve Ebersole
March 21, 2011, 7:08 PM

Bulk closing stale resolved issues

Assignee

Steve Ebersole

Reporter

Andy Dale

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure