This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 78614 - [55cat] Entity Classes from DB: primary keys not retrieved
Summary: [55cat] Entity Classes from DB: primary keys not retrieved
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-20 17:17 UTC by tnelson
Modified: 2006-07-25 17:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Script to create database tables (3.33 KB, text/plain)
2006-06-20 17:18 UTC, tnelson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tnelson 2006-06-20 17:17:43 UTC
I am having trouble generating entity classes for my database tables.  I set up
a data source using the Oracle thin driver, and I can successfully connect and
browse the tables under run runtime tab, but when I try to use the New->Entity
Classes from Database wizard, the dialog box shows me all the system tables as
well as my tables, and none of them are selectable.  I’ve tried using both the
default schema as well as explicitly specifying my schema, and I get the same
results in each case.  The tables show up with “(no primary key)” in the list,
which may explain why they’re not selectable, but the tables do have a primary
key defined (and it is visible when examining the tables under the runtime tab).

Environment: NB 5.5 Beta under Windows XP on an IBM Thinkpad T42, Oracle 10g
(10.0.2) under Solaris 10 (patchlevel current as of 1-Jun) on a dual-processor
P4 with 2.5G memory.
Database user is a non-DBA user with the CONNECT and RESOURCE roles.
Comment 1 tnelson 2006-06-20 17:18:51 UTC
Created attachment 31236 [details]
Script to create database tables
Comment 2 tnelson 2006-06-20 19:17:23 UTC
I'm using the (default?) oracle.jdbc.pool.OracleDataSource data source.
Comment 3 Andrei Badea 2006-06-30 19:38:38 UTC
Re. system tables: I believe this was already fixed. Please try to reproduce in
the latest daily build.

The issue with the missing primary keys is valid -- I've never seen it, but I
did see it mentioned in bug reports and posts in the mailing lists. Which driver
do you use? Is it ojdbc4.jar or something else?

Please run NetBeans (again, the latest daily build) with the 

-J-Dnetbeans.debug.exceptions=true

and attach any messages that are dumped to the console or the message log. Thanks.
Comment 4 Andrei Badea 2006-07-04 16:01:09 UTC
Tried to reproduce it with the schema you attached, but with no luck. Only the
NOTEMAP table is (correctly) marked as not having primary keys.
Comment 5 Andrei Badea 2006-07-07 11:40:33 UTC
See the discussion in issue 77312 and if you can please test the attached
module. Thanks.
Comment 6 Andrei Badea 2006-07-25 17:32:41 UTC
Cf. issue 77312 this was fixed by the fix of issue 56492, thus closing.