dev@glassfish.java.net

Re: Compiling Glassfish in Eclipse

From: Markus KARG <markus.karg_at_gmx.net>
Date: Fri, 13 Oct 2006 21:46:17 +0200

Wayne,

sorry for answering so late, but I didn't find any time for my MaxDB
work in the past week. Please find my answer inlined.
> Just noticed something odd in that first error SQL statement:
> DELETE FROM CMP3_SALARY WHERE EXISTS(SELECT t0.EMP_ID FROM
> CMP3_EMPLOYEE t0, CMP3_SALARY t1 WHERE ((t0.F_NAME = ?) AND (t1.EMP_ID
> = t0.EMP_ID)) AND t1.EMP_ID = CMP3_SALARY.EMP_ID)
>
> Specifically:
> ... FROM CMP3_SALARY t1 WHERE ... t1.EMP_ID = CMP3_SALARY.EMP_ID
> We've declared t1 to be an alias for CMP3_SALARY, so we're saying
> WHERE t1.EMP_ID = t1.EMP_ID, which is unnecessary at best.
>
> Does this SQL run in MaxDB, assuming you're able to get the tables and
> data set up and can run the command directly in MaxDB, but then it
> fails in the testing? Or is the statement just completely invalid SQL
> in MaxDB?
Seems you are a very watchful observer! Actually what you detected is
the cause of the problem. I copied the DELETE command into a short JDBC
sample and let it run against the database (that still contains the
schema BTW, so it seems the tests are not tearing down very well the
schema they constructed in case of failing tests). The SQL ends up with
the same error message. Then just I removed trailing "t1.EMP_ID =
t1.EMP_ID", as it is unnecessary as you said. The SQL then runs without
any problem (at least in my test program)!

Thank you for your tip! I will ask Tom to fix that! :-)

Markus