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.
When I use the entity class from database wizard, all steps works right. However when the IDE try to generate the class, it got the 'nullPointerException' I am using the Oracle XE Here is the log: [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926) *********** Exception occurred ************ at 9:25 PM on Jun 8, 2006 java.lang.NullPointerException at org.netbeans.modules.j2ee.persistence.entitygenerator.DbSchemaEjbGenerator.addJoinTable(DbSchemaEjbGenerator.java:170) at org.netbeans.modules.j2ee.persistence.entitygenerator.DbSchemaEjbGenerator.addAllTables(DbSchemaEjbGenerator.java:133) at org.netbeans.modules.j2ee.persistence.entitygenerator.DbSchemaEjbGenerator.buildCMPSet(DbSchemaEjbGenerator.java:415) at org.netbeans.modules.j2ee.persistence.entitygenerator.DbSchemaEjbGenerator.<init>(DbSchemaEjbGenerator.java:51) at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPHelper.buildBeans(RelatedCMPHelper.java:183) at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard.createBeans(RelatedCMPWizard.java:238) at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard.access$100(RelatedCMPWizard.java:42) at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard$2.run(RelatedCMPWizard.java:191) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Found out that there is one table failed to generate the class. The table is a join table of USER_LAB_SITE and ROLES, which USER_LAB_SITE is the join table. Columns: user_id PK FK---- of USER_LAB_SITE Business_id PK FK--- of USER_LAB_SITE Role_id PK FK --ROLES The join table (USER_LAB_SITE) is not generated, when it try to generate the USER_LAB_SITE_ROLE, it bombs whole process. Solution suggested, catch this nullPointerException, give a warning in the wizard instead of bomb whole process. Temp Workout, I modified the table. However it takes me 2 hours to find out that table causes the problem. Thanks.
I just tried to create these tables on derby given your textual description and was able to generate entity from db without a problem. So, please post more info: - what build of NB 5.5 are you using - sql script or dbschema file from which you are generating
Sorry, but I can't reproduce it either. (Rochelle, thanks for looking at this!) It would help if you could post a short SQL script creating a schema for which you always get the NPE. Thanks!
No further information from the reporter for a long time. Closing, please reopen with the required information. Thanks!
it´s impossible to know wich is the table or the relation that is wrong
Sorry, but I can't fix this issue if I can't reproduce it. Would it be possible to get an SQL script creating the schema with which you get the exception? Is the exception random or always reproducible? Thanks.
Also adding jcampuzano to CC. jcampuzano, please see my last comment.
Guys, any progress on this?
From jcampuzano by private e-mail: I have the same problem all the times i try, i don´t have a sql script its a very big DB and may be a little bit confidential. I´m using Informix 7.2 i´m sure that the hole schema is not fine, but i can´t find the error, i solved one to one relations but the problem is not solved actually i only need that netbeans gives me more information about the error.
I could try to add some logging statements, but they won't make it into 5.5. Informix is not a supported database, so I am downgrading to P3.
Based on the exception stack trace in desc1 this could be a duplicate of issue 89576. Please verify (the Entity Class from DB is currently disabled because of the changes in the Java infrastructure, but should be back in NB 6.0 M6). jcampuzano: if you still feel NetBeans should give you more information during the entity class bean generation process please file a new issue with some details. Thanks. *** This issue has been marked as a duplicate of 89576 ***