First, sorry for the top post.
While Kristian confirmed that you hit a defect, it really doesnt help
you.
I did a quick look at your query that blew up.
Just a comment
In your SQL you have the following:
from POC_CNTNT as pocCntnt1,
PLN_STAT as plnStat,
PLN as pln,
PLN_ORDR as pln_PLN_ORDR,
POC as poc1,
POC_CNTNT as pocCntntB,
POC_CNTNT as pocCntnt12,
CMPNT_HDR_CNTNT as cmpntHdrCntntB,
POC as poc12,
PLN_ORDR_HDR_CNTNT as plnOrdrHdrCntnt,
CMPNT_HDR_CNTNT as cmpntHdrCntnt1,
CMPNT_HDR_CNTNT as cmpntHdrCntnt12,
POC as pocB,
POC_STRUCT as pocStruct1_12,
CMPNT_HDR_CNTNT as cmpntHdrCntnt2,
POC_CNTNT as pocCntnt2,
POC as poc2, CMPNT_HDR_CNTNT as cmpntHdrCntntA,
POC_CNTNT as pocCntntA,
POC as pocA, POC_CNTNT as pocCntnt11,
CMPNT_HDR_CNTNT as cmpntHdrCntnt11,
POC as poc11,
CMPNT_HDR_CNTNT as cmpntHdrCntnt121,
POC_STRUCT as pocStruct12_121,
POC_CNTNT as pocCntnt121,
POC as poc121
I count 25 tables in the join.
Ok, its really less tables although you have them joining against
themselves.
Sure you may have a reproducible bug, however, your query is shit. Sorry, I
dont know of a better way of explaining it.
Look, heres what Im talking about
from
POC as poc1,
POC as poc12,
POC as poc2,
POC as poc11,
POC as pocA,
POC as poc121,
POC as pocB,
POC_CNTNT as pocCntnt1,
POC_CNTNT as pocCntntB,
POC_CNTNT as pocCntnt2,
POC_CNTNT as pocCntntA,
POC_CNTNT as pocCntnt121,
POC_CNTNT as pocCntnt12,
POC_CNTNT as pocCntnt11,
PLN_STAT as plnStat,
PLN as pln,
PLN_ORDR as pln_PLN_ORDR,
PLN_ORDR_HDR_CNTNT as plnOrdrHdrCntnt,
CMPNT_HDR_CNTNT as cmpntHdrCntntB,
CMPNT_HDR_CNTNT as cmpntHdrCntnt11,
CMPNT_HDR_CNTNT as cmpntHdrCntnt121,
CMPNT_HDR_CNTNT as cmpntHdrCntnt1,
CMPNT_HDR_CNTNT as cmpntHdrCntnt12,
CMPNT_HDR_CNTNT as cmpntHdrCntnt2,
CMPNT_HDR_CNTNT as cmpntHdrCntntA,
POC_STRUCT as pocStruct1_12,
POC_STRUCT as pocStruct12_121,
Im sorry but what you have working in Oracle isnt a good idea in the
first place.
Perhaps you may want to think about what you are trying to do and rewrite
this ugly poorly written query in the first place?
Also Id rethink your table design and your constraints.
In your table ACFT_TYPE you check the model type. Thats a hard coded
constraint check. Unless this is a class exercise, Aircraft models are not
static and every year theres a new aircraft model, youll have to upgrade
your constraint check. Not a good design.
I strongly suggest that you look at your query, the business problem you are
trying to solve and consider rewriting the query in to a simpler design.
There are things like temp tables, Unions, inner selects, etc that can make
life a whole lot simpler and easier to run.
You said you tried to run the query on an empty table. How well do you think
it will run when you have 1,000 rows of data? 10,000 rows of data?
Sorry to be a kill joy! It must be the coffee.
-Mike
_____
From: Schueller, Henriette [mailto:[email protected]]
Sent: Wednesday, May 20, 2009 8:38 AM
To: [email protected]
Subject: FEHLER XJ001: Java-Ausnahme: ': java.lang.NullPointerException'.
Hello,
I want to report a bug.
I connect to an empty database; The database has the schema: see attached
file jc3iedm-create.sql.
C:\SyLT>C:\apache\javadb\bin\ij
IJ Version 10.5
ij> connect 'jdbc:derby:C:\SyLT\db\jc3iedm\current\empty';
ij> run 'C:\SyLT\test.sql';
see attached file test.sql
The result is:
FEHLER XJ001: Java-Ausnahme: ': java.lang.NullPointerException'.
This is very strange. The select runs I an oracle database without any
problem.
Hope you can help me
Henriette Schüller
*************************************************
Henriette Schüller
Forschungsgesellschaft für
Angewandte Naturwissenschaften e. V. (FGAN)
Neuenahrer Str. 20, 53343 Wachtberg, Germany
Tel.: 0049 (0)228 9435-522
Fax: 0049 (0)228 9435-685
E-Mail: [email protected]
Web: www.fgan.de
************************************************
Sitz der Gesellschaft: Bonn
Registergericht: Amtsgericht Bonn VR 2530
Vorstand: Dr. rer. nat. Ralf Dornhaus (Vors.), Prof. Dr. Joachim Ender
(Stellv.)(Stellv.)