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 76479

Summary: NPE in JavaEE5 Samples
Product: javaee Reporter: Dan Kolar <dkolar>
Component: App ClientAssignee: Martin Krauskopf <mkrauskopf>
Status: VERIFIED FIXED    
Severity: blocker Keywords: SIMPLEFIX
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: messages.log

Description Dan Kolar 2006-05-17 12:43:24 UTC
build 200605170200 jdk1.5.06fcs

Start with clear userdir and don't import settings from 5.0
1) New -> Samples -> Java EE5 -> EJB3 -> customer CMP
2) Next -> Finish
3) Click on Applicaton Client node

NPE is thrown.
Comment 1 Dan Kolar 2006-05-17 12:51:25 UTC
Created attachment 30438 [details]
messages.log
Comment 2 Martin Krauskopf 2006-05-17 15:11:49 UTC
Yup. Seems to me that there are more places in the project's code base where
Deployment.getDefault().getJ2eePlatform(serverInstance) is not checked for null.
We should centralize the access code. Thanks for the catch.
Comment 3 Martin Krauskopf 2006-05-18 11:15:00 UTC
Can't reproduce. Maybe that examples are different now (Tomasz's one). But will
prevent that NPE at least.
Comment 4 Martin Krauskopf 2006-05-18 11:43:54 UTC
AppClientProject.java; 1.1.4.16 -> 1.1.4.17;
ui/AppClientLogicalViewProvider.java; 1.1.4.6 -> 1.1.4.7;

Actually only AppClientLogicalViewProvider contains fix.
Comment 5 Dan Kolar 2006-05-19 16:31:49 UTC
v. build 200605190200