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 191522 - [69cat] NullPointerException at org.netbeans.modules.j2ee.persistence.entitygenerator.DbSchemaEjbGenerator.getTablesReferencesOtherTablesWithPrimaryKeyMatch
Summary: [69cat] NullPointerException at org.netbeans.modules.j2ee.persistence.entityg...
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal with 1 vote (vote)
Assignee: Sergey Petrov
URL:
Keywords:
: 191641 192311 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-01 15:05 UTC by msandoz
Modified: 2010-11-23 09:32 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 173184


Attachments
stacktrace (1.86 KB, text/plain)
2010-11-01 15:05 UTC, msandoz
Details
SQL script that generates a schema in Java DB that can be used to reproduce the issue (4.33 MB, text/x-sql)
2010-11-01 23:38 UTC, dheffelfinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description msandoz 2010-11-01 15:05:21 UTC
Build: NetBeans IDE 7.0 M2 (Build 201010151251)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows XP

User Comments:
dheffelfinger: Attempting to generate JPA entities from an existing schema.

GUEST: creating entities from an existing database

dheffelfinger: Attempting to generate JPA Entities from an existing schema.

dheffelfinger: Trying to generate JPA entities from an existing schema.

msandoz: creating new peresistent reverse engineered from db/2 database

dheffelfinger: attempting to generate a JPA entity from an existing schema.

dheffelfinger: Attempting to generate JPA entities from an existing database schema

dheffelfinger: Attempting to generate JPA Entities from an existing schema.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.j2ee.persistence.entitygenerator.DbSchemaEjbGenerator.getTablesReferencesOtherTablesWithPrimaryKeyMatch(DbSchemaEjbGenerator.java:149)
   at org.netbeans.modules.j2ee.persistence.entitygenerator.DbSchemaEjbGenerator.<init>(DbSchemaEjbGenerator.java:112)
   at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPHelper.buildBeans(RelatedCMPHelper.java:366)
   at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard.createBeans(RelatedCMPWizard.java:382)
   at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard.access$000(RelatedCMPWizard.java:87)
   at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard$1.run(RelatedCMPWizard.java:294)
Comment 1 msandoz 2010-11-01 15:05:26 UTC
Created attachment 102749 [details]
stacktrace
Comment 2 dheffelfinger 2010-11-01 23:38:04 UTC
Created attachment 102751 [details]
SQL script that generates a schema in Java DB that can be used to reproduce the issue

First of all, apologies for the huge attachment.

The attached SQL script can be used to generate a database schema on JavaDB that can be used to reproduce the issue. Once the schema has been created, simply attempt to generate JPA entities from it.
Comment 3 Sergey Petrov 2010-11-04 15:02:01 UTC
will try to evaluate in a week
Comment 4 Sergey Petrov 2010-11-04 16:51:31 UTC
*** Bug 191641 has been marked as a duplicate of this bug. ***
Comment 5 Sergey Petrov 2010-11-11 13:31:47 UTC
>P2 it's regression, and it's already have several reports, may affect most cases with join table usage
Comment 6 Sergey Petrov 2010-11-11 13:35:23 UTC
http://hg.netbeans.org/web-main/rev/3669047c30dd fixed, should be in release but likely not in beta
Comment 7 Sergey Petrov 2010-11-11 13:36:38 UTC
also will be available in some daily builds after a few days.
Comment 8 dheffelfinger 2010-11-12 12:14:11 UTC
Great, thanks for taking care of this. I can't wait to try it out when the fix hits the nightly builds.
Comment 9 dheffelfinger 2010-11-13 14:44:13 UTC
Verified fix in NetBeans nightly build 201011130001
Comment 10 Sergey Petrov 2010-11-23 09:32:47 UTC
*** Bug 192311 has been marked as a duplicate of this bug. ***