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 Dev (Build 201111010600) VM: Java HotSpot(TM) Client VM, 21.1-b02, Java(TM) SE Runtime Environment, 1.7.0_01-b08 OS: Windows XP User Comments: jskrivanek: To reproduce: - create EJB project with WebLogic server - open new file wizard - choose "Enterprise JavaBeans - CMP Entity Beans from Database" - Specify some data source. For example jdbc/sample - Select some of available tables - lets say Customer - click Finish Stacktrace: java.lang.NullPointerException at org.netbeans.modules.j2ee.ejbcore._RetoucheUtil.resolveFileObjectForClass(_RetoucheUtil.java:309) at org.netbeans.modules.j2ee.ejbcore.action.CmFieldGenerator.addFieldToClass(CmFieldGenerator.java:140) at org.netbeans.modules.j2ee.ejbcore.action.CmFieldGenerator.addCmpField(CmFieldGenerator.java:105) at org.netbeans.modules.j2ee.ejbcore.ejb.wizard.cmp.CmpFromDbGenerator.addCmpFields(CmpFromDbGenerator.java:347) at org.netbeans.modules.j2ee.ejbcore.ejb.wizard.cmp.CmpFromDbGenerator.generateBeans(CmpFromDbGenerator.java:170) at org.netbeans.modules.j2ee.ejbcore.ejb.wizard.cmp.CmpGenerator.generateBeans(CmpGenerator.java:97)
Created attachment 112714 [details] stacktrace
Looks like issue similar to bug #202495, but I don't understand why did you not get additional debug/logging information. Definitely valid issue, I will investigate what could happen there.
What do you mean by additional debug/logging information? This bug was reported by the exception reporter, so I expect you have as much data as possible.
Since http://hg.netbeans.org/web-main/rev/1b9c5ba7b4f9 I would expect more information about the fileObject for javaSource creation, but probably the problem wasn't directly there.
You were right, I forgot that the rest of needed information will be in the log. So the cause of these troubles is non-valid fileobject - the javaSource is not returned then. Problem will be probably in codes which calls this method.
CmFieldGenerator should got javaSource for the same class twice and failed (returned null) only in the second creation. Means that it can cause code between those two calls. This code makes changes in the ejbClass and rewrite its source Tree. I'm not aware that it should make any troubles but for assurance there will be the modificationTask on the ejbClass source called at the end of the method. web-main #5f1df1b8e16a
Integrated into 'main-golden', will be available in build *201111050600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/5f1df1b8e16a User: Martin Fousek <marfous@netbeans.org> Log: #204564 - NullPointerException at org.netbeans.modules.j2ee.ejbcore._RetoucheUtil.resolveFileObjectForClass