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 #435243] Mon, 19 January 2009 23:12 Go to next message
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
/
Re: NPE when generating entities from Oracle 11g DB [message #435245 is a reply to message #435243] Tue, 20 January 2009 14:20 Go to previous messageGo to next message
Karen Butzke is currently offline Karen ButzkeFriend
Messages: 220
Registered: July 2009
Senior Member
This looks a lot like http://bugs.eclipse.org/231286 which was determined
to be a driver issue in MaxDB, unfortunately it looks like you are now
seeing this on oracle. Does this help you figure out the problem, if not,
could you open a bug?

Thanks,
Karen
Re: NPE when generating entities from Oracle 11g DB [message #435250 is a reply to message #435245] Wed, 21 January 2009 12:40 Go to previous message
Chris Jaun is currently offline Chris JaunFriend
Messages: 17
Registered: July 2009
Junior Member
I ended up opening https://bugs.eclipse.org/bugs/show_bug.cgi?id=261807
after not being able to determine if this was a driver issue or not.

Thanks,
Chris
Re: NPE when generating entities from Oracle 11g DB [message #613786 is a reply to message #435243] Tue, 20 January 2009 14:20 Go to previous message
Karen Butzke is currently offline Karen ButzkeFriend
Messages: 220
Registered: July 2009
Senior Member
This looks a lot like http://bugs.eclipse.org/231286 which was determined
to be a driver issue in MaxDB, unfortunately it looks like you are now
seeing this on oracle. Does this help you figure out the problem, if not,
could you open a bug?

Thanks,
Karen
Re: NPE when generating entities from Oracle 11g DB [message #613789 is a reply to message #435245] Wed, 21 January 2009 12:40 Go to previous message
Chris Jaun is currently offline Chris JaunFriend
Messages: 17
Registered: July 2009
Junior Member
I ended up opening https://bugs.eclipse.org/bugs/show_bug.cgi?id=261807
after not being able to determine if this was a driver issue or not.

Thanks,
Chris
Previous Topic:Dali reports that some fields cannot be resolved
Next Topic:Dali 2.2 and JPA 2.0 tolerance
Goto Forum:
  


Current Time: Thu Apr 25 00:38:01 GMT 2024

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

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

Back to the top