persistence@glassfish.java.net

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

From: Mitesh Meswani <mitesh.meswani_at_Sun.COM>
Date: Mon, 27 Mar 2006 10:55:01 -0800

Markus might be correct. The test shows same NPE while running against
mssql also.

Tom,
Could you please look into this.

Thanks,
Mitesh
Markus Fuchs wrote:
> Hi Michael,
>
> Is the issue that an ANSI join should be generated for JavaDB, whereas
> toplink uses "native" syntax, e.g. (+)= , for Oracle? Than this
> problem might occur for other vendors as well.
>
> Thanks,
>
> -- markus.
>
> Michael Bouschen wrote:
>
>> resend, because of problems with the persistence alias.
>>
>> ===========================
>>
>> 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