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 91743 - Error when generating entities
Summary: Error when generating entities
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker with 2 votes (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-03 12:06 UTC by bennyv
Modified: 2007-01-16 21:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample schema which returns error when generating an entity for table AG (4.68 KB, text/plain)
2007-01-03 12:08 UTC, bennyv
Details
Error messages (1.92 KB, text/plain)
2007-01-03 12:11 UTC, bennyv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bennyv 2007-01-03 12:06:31 UTC
When generating entities for (part of) my database schema I receive the 
following error:

"Unexpected error while generating the <problemTable> entity class"

I will attach the database schema and the logfile.
Comment 1 bennyv 2007-01-03 12:08:42 UTC
Created attachment 37004 [details]
Sample schema which returns error when generating an entity for table AG
Comment 2 bennyv 2007-01-03 12:11:21 UTC
Created attachment 37005 [details]
Error messages
Comment 3 bennyv 2007-01-03 12:16:47 UTC
I forgot to mention that the attached database schema was from an Oracle 10g 
database.
Comment 4 Andrei Badea 2007-01-03 15:13:56 UTC
Nice report. Please also specify:

- the version of the Oracle JDBC driver you are using
- which table(s) you generate entity classes for 
- whether the error is always reproducible

Taking over.
Comment 5 bennyv 2007-01-03 16:51:03 UTC
The last time I tried was with Oracle JDBC Driver version 10.2.0.1.0XE against 
an Oracle XE database (I also had the same problem with Oracle 10g R1 with 
Oracle JDBC 10.2.0.1.0).

I was generating the AG table; when selecting that one from the Wizard it 
automatically picks A and B as well (dependent objects).

I have tried this in total for about 5 or 6 times against several database 
instances (with the same test schema). The steps are always the same:
- Create a new web project
- Add the Oracle Driver to the projects class path
- Run the "Create entities from database" wizard
- In the table selection step, pick the AG table (with the dependency check 
box checked it automatically selects A and B as well)
- After finishing the wizard, Netbeans starts generating the classes and 
returns with the error. The generated files are A.java (which seems fine), 
Ag.java (only contains a constructor) and AgPK.java (only a constructor as 
well).
Comment 6 crued 2007-01-15 20:40:05 UTC
Could this be this be related to issue 92031?

   http://www.netbeans.org/issues/show_bug.cgi?id=92031

I don't see the NullPointerException in the stack trace of this issue that is in
the stack trace for the other issue, but it seems like it could be related.
Comment 7 bennyv 2007-01-16 19:17:17 UTC
Triggered by the comment on a possibly related issue that has been resolved by 
Netbeans 5.5.1 I downloaded it and tested in it. The entities that could not 
be generated in Netbeans 5.5, could be generated in Netbeans 5.5.1.
Besides the test case, I also generated the complete schema without any error 
message. So with Netbeans 5.5.1 the issue is solved.
Comment 8 Andrei Badea 2007-01-16 21:17:42 UTC
Great to hear, so marking this as fixed, since everything in 5.5.1 is also in
trunk (6.0).