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.
In an EJB Module project I double-click the sun-ejb-jar.xml file listed under the Config Files node in the Projects window. The Sun Configuration editor UI opens.The 'Sun Configuration' node is selected by default. A NullPointerException is thrown. See attached log file.
Created attachment 37628 [details] Error Log - Messages.log file
should we just return an empty Sheet.Set for a ConfigBeanNode? [basic on line 89 of ConfigUtils.java]
Maybe, I'll have to look closer... Note also this message (from log, just before exception) "Invalid DDBean '/application-client/resource-ref' due to missing 'res-ref-name' field." If this is the cause, then the workaround would be to assign a name to this resource-ref. If it came from an annotation, it should have already had a name and we may be downstream of another bug (and maybe one can manually assign a name via name= attribute of the annotation.)
fyi: i was able to replicate this issue with a j2ee 1.4 ejb-module....
Please post exact steps to reproduce - I just tried to artifically cause this and did not find any issues (this was w/ NB 5.5 though, not NB 6.0)
Thanks Vince. (to reproduce, display IDE Properties panel before opening sun-ejb-jar.xml) The problem is caused by out-of-date beaninfo for the EjbJarRoot DConfigBean. Work around is to close the properties panel before using the Configuration Editor to edit sun-ejb-jar.xml. Trivial to fix (just regenerate BeanInfo for this bean).
Created attachment 39004 [details] Updates to BeanInfo for all config beans.
This diff applies to 5.5.1 only. Changes to beaninfo caused by issue 95054 prevent this diff from being useful in 6.0. I will have to create a separate fix for that. The diff updates all our BeanInfo classes so they expose a minimal property set as readonly. DConfigBeans should only be edited via the customizers shown in the config editor. The property support they provide is incomplete so the Properties Inspector is not a valid avenue for editing. I recommend we patch this for 5.5.1. Alternatively, we could apply only the patch for EjbJarRootBeanInfo.java, which will fix the NPE reported in this bug. But there are other issues associated with the config editor if the properties window is displayed that would remain unfixed. Note that VWP users will probably have the Properties view open.
The diff is pretty large but is from using the NetBeans BeanInfo editor... So, it had better be safe. The diffs all follow the same basic pattern, removing all the properties other than an identity property. I think this is worth fixing correctly in 5.5.1 now. We need to revisit these Beans and their BeanInfo objects in 6.0 anyway
5.5.1_candidate status whiteboard removed
Upgrading to P1 because this is a pervasive NPE (ie difficult to make it go away when it appears) and was customer submitted. I have crafted a super small diff which fixes exactly this one problem rather than the proposed redo of all BeanInfo's. This is far less risky (though the risk was minimal in the first place).
Created attachment 39224 [details] Minimal diff to patch this NPE
the minimal diff is fine. I verified it in my 5.5.1 build.
Fix committed to 5.5.1 branch. http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/configbean/EjbJarRootBeanInfo.java?r1=1.1.16.1.2.1&r2=1.1.16.1.2.1.28.1
Verified