Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » NPE when generating entities from Oracle 11g DB
NPE when generating entities from Oracle 11g DB [message #613785] Mon, 19 January 2009 23:12
Chris Jaun is currently offline Chris JaunFriend
Messages: 17
Registered: July 2009
Junior Member
Hello,

I've been seeing the following exception thrown when generating entities
from an Oracle 11g DB. This is using Dali 2.0.

Any hints of what might be causing this? I assume it has something to do
with the relationships in the DB. I was trying to debug this a bit myself,
but so far no luck. I'm wondering if something is going wrong because it
seems to be "configuring" a manyToMany relationship, when there isn't one
in the DB.

!MESSAGE An internal error occurred during: "Generating Entities".
!STACK 0
java.lang.NullPointerException
at
org.eclipse.jpt.db.internal.DTPForeignKeyWrapper.getReferenc edTable(Unknown
Source)
at
org.eclipse.jpt.db.internal.DTPForeignKeyWrapper.getReferenc edTable(Unknown
Source)
at org.eclipse.jpt.gen.internal.GenTable.addReferencedTablesTo( Unknown
Source)
at org.eclipse.jpt.gen.internal.GenScope.buildReferencedTables( Unknown
Source)
at
org.eclipse.jpt.gen.internal.GenScope.configureManyToManyRel ations(Unknown
Source)
at org.eclipse.jpt.gen.internal.GenScope.initialize(Unknown Source)
at org.eclipse.jpt.gen.internal.GenScope.<init>(Unknown Source)
at org.eclipse.jpt.gen.internal.PackageGenerator.<init>(Unknown Source)
at org.eclipse.jpt.gen.internal.PackageGenerator.generateEntiti es(Unknown
Source)
at
org.eclipse.jpt.ui.internal.platform.base.EntitiesGenerator$ GenerateEntitiesRunnable.runInWorkspace(Unknown
Source)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run (Unknown
Source)
at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)

The DDL used to generate the tables looked something like this...

CREATE TABLE NOTES
(NOTE_ID NUMBER(15,0) NOT NULL
,ORG_ID NUMBER(15) NOT NULL
,CREATE_DT DATE
,CREATED_BY VARCHAR2(30)
,NOTE VARCHAR2(4000) NOT NULL
)
/

CREATE TABLE ORGANIZATIONS
(ORG_ID NUMBER(15) NOT NULL
,NAME VARCHAR2(70) NOT NULL
,STREET VARCHAR2(100)
,CITY VARCHAR2(20)
,PHONE_WK VARCHAR2(10)
,PHONE_WK_EXT VARCHAR2(10)
,EMAIL VARCHAR2(35)
,CREATE_DT DATE
,CREATED_BY VARCHAR2(30)
,COMMENTS VARCHAR2(70)
,PRIVATE_YN VARCHAR2(1) DEFAULT 'N' NOT NULL
,MEMBER_OF_ORG_ID NUMBER(15)
)
/

CREATE INDEX NOTES_ORG_FK_I ON NOTES
(ORG_ID)
-- TABLESPACE I_IX
/

CREATE INDEX ORG_ORG_FK_I ON ORGANIZATIONS
(MEMBER_OF_ORG_ID)
-- TABLESPACE I_IX
/


ALTER TABLE NOTES
ADD (CONSTRAINT NOTE_PK PRIMARY KEY
(NOTE_ID)
USING INDEX)
-- TABLESPACE I_IX)
/

ALTER TABLE ORGANIZATIONS
ADD (CONSTRAINT ORG_PK PRIMARY KEY
(ORG_ID)
USING INDEX)
-- TABLESPACE I_IX)
/


ALTER TABLE NOTES ADD (CONSTRAINT
NOTES_ORG_FK FOREIGN KEY
(ORG_ID) REFERENCES ORGANIZATIONS
(ORG_ID) ON DELETE CASCADE)
/


ALTER TABLE ORGANIZATIONS ADD (CONSTRAINT
ORG_ORG_FK FOREIGN KEY
(MEMBER_OF_ORG_ID) REFERENCES ORGANIZATIONS
(ORG_ID))
-- (ORG_ID) ON DELETE RESTRICT)
/


CREATE SEQUENCE ORG_SEQ
NOMAXVALUE
NOMINVALUE
NOCYCLE
/

CREATE SEQUENCE NOTES_SEQ
NOMAXVALUE
NOMINVALUE
NOCYCLE
/

CREATE PUBLIC SYNONYM NOTES FOR NOTES
/

CREATE PUBLIC SYNONYM ORGANIZATIONS FOR ORGANIZATIONS
/

CREATE PUBLIC SYNONYM NOTES_SEQ FOR NOTES_SEQ
/

CREATE PUBLIC SYNONYM ORG_SEQ FOR ORG_SEQ
/
Previous Topic:Dali reports that some fields cannot be resolved
Next Topic:Dali 2.2 and JPA 2.0 tolerance
Goto Forum:
  


Current Time: Sun Nov 18 22:31:51 GMT 2018

Powered by FUDForum. Page generated in 0.01513 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top