persistence@glassfish.java.net

Issue 477: NPE in query runtime with JOINED inheritance on derby

From: Michael Bouschen <mbo.tech_at_spree.de>
Date: Mon, 27 Mar 2006 20:06:18 +0200

Hi Tom, hi Markus, hi Mitesh,

I looked into issue 477 today:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=477

This is about a NPE thrown in method additionalExpressionCriteriaMap
from class internal.expressions.ObjectExpression. I started with the
classes attached to the issue and was able to reproduce the problem with
an simplified test case. The user runs into the exception when running
an JPQL query, but I see the same problem when running a TopLink query.
It only happens when using the JOINED inheritance strategy and only when
running on derby; I do not see the exception on Oracle. I do not know
what is causing the exception, but it has to do with a different
handling of the JOINED strategy. The code throwing the NPE is not called
when running on Oracle.

Attached you find a simple test case reproducing the problem. Please
have a look at the directory src/META-INF and update
persistence.xml.javadb and persistence.xml.oracle according to your
environment. Calling ant javadb will prepare a javadb run, do ant oracle
for Oracle. The test uses automatic table generation, so you can simply
run the test by calling ant main.

Thanks!

Regards Michael
-- 
Michael Bouschen		Tech_at_Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin