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.
I saw this in last week's build (Wed or Thurs), but see it again today with slightly different line numbers. It happens when choosing 2 tables out of a bunch in the dbschema to do cmp entity bean gen: java.lang.NullPointerException at org.netbeans.modules.j2ee.ejbjarproject.ejb.wizard.cmp.RelatedCMPWizard.propagateCreateMethod(RelatedCMPWizard.java:315) at org.netbeans.modules.j2ee.ejbjarproject.ejb.wizard.cmp.RelatedCMPWizard.createBeans(RelatedCMPWizard.java:391) at org.netbeans.modules.j2ee.ejbjarproject.ejb.wizard.cmp.RelatedCMPWizard.access$000(RelatedCMPWizard.java:68) at org.netbeans.modules.j2ee.ejbjarproject.ejb.wizard.cmp.RelatedCMPWizard$1.run(RelatedCMPWizard.java:169) at org.openide.util.Task.run(Task.java:189) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:721)
Raising priority - it now seems to happen every time for my dbschema and I can no longer create CMP beans from the schema.
I get this exeception every time: java.lang.NullPointerException at org.netbeans.modules.j2ee.ejbjarproject.ejb.wizard.cmp.RelatedCMPWizard.addFieldsToComponentInterface(RelatedCMPWizard.java:288) at org.netbeans.modules.j2ee.ejbjarproject.ejb.wizard.cmp.RelatedCMPWizard.createBeans(RelatedCMPWizard.java:392) at org.netbeans.modules.j2ee.ejbjarproject.ejb.wizard.cmp.RelatedCMPWizard.access$000(RelatedCMPWizard.java:68) at org.netbeans.modules.j2ee.ejbjarproject.ejb.wizard.cmp.RelatedCMPWizard$1.run(RelatedCMPWizard.java:169) at org.openide.util.Task.run(Task.java:189) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:721)
I've see a fix to check for the npe in: RCS file: /cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ejb/wizard/cmp/RelatedCMPWizard.java,v retrieving revision 1.17 retrieving revision 1.18 diff -r1.17 -r1.18 46a47 > import org.netbeans.modules.db.explorer.infos.ConnectionNodeInfo; 403c404,407 < e.setDescription(helper.getConnectionNodeInfo().getName()); --- > ConnectionNodeInfo connectionNodeInfo = helper.getConnectionNodeInfo(); > if(connectionNodeInfo != null) { > e.setDescription(connectionNodeInfo.getName()); > } This shoudl be in builds after 1/20/2005. Can QE verify is this is enough? Chris, can you comment?
The code ludo is referring to was a fix for a change to allow zero configuration deployment for cmp beans (adding the connection string if possible). The NPE in this bug is caused by code which basically is doing the following: create file generate code get java model do a bit more generation The NPE is occuring at the third step as the java model cannot be retrieved. There are several ways to fix this issue: * change the generation to not rely on the java model * rely on the java model resolution changing the generation is relatively straightforward.
Tomas Hurka from java team made some review of this bug and it looks similar to 51558. After fix for 51558, this one will be evaluated by java team.
*** Issue 51558 has been marked as a duplicate of this issue. ***
The source of this (and related) problems is that FileObject.lastModified().getTime() has only 1 second granularity. Therefor javacore cannot distinguish two changes, which happen in one second timeframe. Fixed in trunk. Checking in RepositoryUpdater.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/RepositoryUpdater.java,v <-- RepositoryUpdater.java new revision: 1.32; previous revision: 1.31 done
*** Issue 54060 has been marked as a duplicate of this issue. ***
Marking as verified. Obsolete since retouche intergration. --- NetBeans IDE Dev (Build 070214) 1.6.0; Java HotSpot(TM) Server VM 1.6.0-b105 Linux version 2.6.12-1.1390_FC4smp running on i386 en_US (nb); UTF-8
Reorganization of java component