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.
Build: NetBeans IDE 6.5 (Build 200811100001) VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02 OS: Windows XP, 5.1, x86 User Comments: GUEST: I was trying to generate the entitty classes from a databse, using SQLServer 2000 mark_r_wood: Was adding a database entity bean by right clicking on the package. It is a mysql database. Below is the table create statement for table adding. DROP TABLE IF EXISTS `eztravels`.`gift`; CREATE TABLE `eztravels`.`gift` ( `clientNo` int(10) unsigned NOT NULL, `when` date NOT NULL, `what` varchar(200) NOT NULL, PRIMARY KEY (`clientNo`,`when`) USING BTREE, CONSTRAINT `FK_gift_client` FOREIGN KEY (`clientNo`) REFERENCES `client` (`clientNo`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Here is for client table. DROP TABLE IF EXISTS `eztravels`.`client`; CREATE TABLE `eztravels`.`client` ( `clientNo` int(10) unsigned NOT NULL AUTO_INCREMENT, `FirstName` varchar(100) NOT NULL, `MiddleName` varchar(100) DEFAULT NULL, `LastName` varchar(100) NOT NULL, `phone1` varchar(20) DEFAULT '', `phone2` varchar(20) DEFAULT '', `phone3` varchar(20) DEFAULT '', `Address1` varchar(100) DEFAULT '', `Address2` varchar(100) DEFAULT '', `state` char(2) DEFAULT '', Stacktrace: java.lang.NullPointerException at org.netbeans.modules.j2ee.persistence.entitygenerator.DbSchemaEjbGenerator.addJoinTable(DbSchemaEjbGenerator.java:251) at org.netbeans.modules.j2ee.persistence.entitygenerator.DbSchemaEjbGenerator.addAllTables(DbSchemaEjbGenerator.java:206) at org.netbeans.modules.j2ee.persistence.entitygenerator.DbSchemaEjbGenerator.buildCMPSet(DbSchemaEjbGenerator.java:478) at org.netbeans.modules.j2ee.persistence.entitygenerator.DbSchemaEjbGenerator.<init>(DbSchemaEjbGenerator.java:86) at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPHelper.buildBeans(RelatedCMPHelper.java:310) at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard.createBeans(RelatedCMPWizard.java:360)
Created attachment 77383 [details] stacktrace
tried a bit modified for derby CREATE TABLE client ( "clientNo" int NOT NULL, "FirstName" varchar(100) NOT NULL, "MiddleName" varchar(100) DEFAULT NULL, "LastName" varchar(100) NOT NULL, "phone1" varchar(20) DEFAULT '', "phone2" varchar(20) DEFAULT '', "phone3" varchar(20) DEFAULT '', "Address1" varchar(100) DEFAULT '', "Address2" varchar(100) DEFAULT '', "state" char(2) DEFAULT '', PRIMARY KEY ("clientNo") ); CREATE TABLE gift ( "clientNo" int NOT NULL, "when" date NOT NULL, "what" varchar(200) NOT NULL, PRIMARY KEY ("clientNo","when"), CONSTRAINT "FK_gift_client" FOREIGN KEY ("clientNo") REFERENCES client ("clientNo") ON DELETE CASCADE ); all beans was generated succesfully, also theere is no reoprts for 6.8 dev builds yet.
can't reproduce in 6.7 with mysql with tables above (except difference in charset/engine). is it always reproducible for some tables or random issue?