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.

Bug 93113 - Error in Sun Configuration UI for Modifying sun-ejb-jar.xml
Summary: Error in Sun Configuration UI for Modifying sun-ejb-jar.xml
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: _ pcw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-24 15:23 UTC by myatt83
Modified: 2007-03-15 10:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Error Log - Messages.log file (23.07 KB, text/plain)
2007-01-24 15:26 UTC, myatt83
Details
Updates to BeanInfo for all config beans. (133.64 KB, text/plain)
2007-02-28 23:10 UTC, _ pcw
Details
Minimal diff to patch this NPE (3.33 KB, text/plain)
2007-03-06 20:00 UTC, _ pcw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description myatt83 2007-01-24 15:23:12 UTC
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.
Comment 1 myatt83 2007-01-24 15:26:51 UTC
Created attachment 37628 [details]
Error Log - Messages.log file
Comment 2 Vince Kraemer 2007-01-24 18:32:56 UTC
should we just return an empty Sheet.Set for a ConfigBeanNode? [basic on line 89
of ConfigUtils.java]
Comment 3 _ pcw 2007-01-24 18:45:42 UTC
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.)
Comment 4 Vince Kraemer 2007-01-24 21:07:41 UTC
fyi:  i was able to replicate this issue with a j2ee 1.4 ejb-module....
Comment 5 _ pcw 2007-01-24 22:42:49 UTC
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)
Comment 6 _ pcw 2007-02-28 21:46:51 UTC
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).
Comment 7 _ pcw 2007-02-28 23:10:41 UTC
Created attachment 39004 [details]
Updates to BeanInfo for all config beans.
Comment 8 _ pcw 2007-02-28 23:17:21 UTC
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.
Comment 9 Vince Kraemer 2007-03-01 02:26:59 UTC
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
Comment 10 Martin Schovanek 2007-03-06 15:37:04 UTC
5.5.1_candidate status whiteboard removed
Comment 11 _ pcw 2007-03-06 19:59:02 UTC
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).
Comment 12 _ pcw 2007-03-06 20:00:43 UTC
Created attachment 39224 [details]
Minimal diff to patch this NPE
Comment 13 Vince Kraemer 2007-03-06 23:28:28 UTC
the minimal diff is fine.

I verified it in my 5.5.1 build.
Comment 15 Michal Mocnak 2007-03-15 10:38:26 UTC
Verified