Any chance the following is the same bug?
https://glassfish.dev.java.net/issues/show_bug.cgi?id=2392
Guy Pelletier wrote:
> Fix has been submitted for bug 2723 - EJBQL statement with
> InheritanceType.JOINED generates invalid SQL
>
> Tested with Quicklook, entity-persistence-tests and Oracle-internal tests.
>
> Cheers,
> Guy