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 174027 - NPE when open some SDK6 samples
Summary: NPE when open some SDK6 samples
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: PC Windows XP x64
: P2 blocker (vote)
Assignee: Nitya Doraisamy
URL:
Keywords:
: 174035 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-07 22:31 UTC by davisn
Modified: 2009-10-28 02:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (46.89 KB, text/plain)
2009-10-07 22:31 UTC, davisn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description davisn 2009-10-07 22:31:11 UTC
java.lang.NullPointerException when open the SDK6 jpa advancedMapping project with NB 6.8

Steps To Reproduce:
1. Install NB 6.8 build 10/07/2009
2. Install SDK6 b67 build from 
http://gf-hudson.sfbay/hudson/view/GFv3%20Trunk/job/gf-trunk-build-nightly/lastSuccessfulBuild/artifact/bundles/
3. From NB IDE, register the SDK6-b67 server
4. Open the jpa advancedMapping project
BUG:
    java.lang.NullPointerException
	at
org.netbeans.modules.glassfish.eecommon.api.config.GlassfishConfiguration.getContextRoot(GlassfishConfiguration.java:585)
	at org.netbeans.modules.glassfish.javaee.ModuleConfigurationImpl.getContextRoot(ModuleConfigurationImpl.java:114)
	at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getWebContextRoot(ConfigSupportImpl.java:249)
	at org.netbeans.modules.web.project.ProjectWebModule.getContextPath(ProjectWebModule.java:175)
	at org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectOpened(WebProject.java:958)
	at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:81)
	at org.netbeans.spi.project.ui.support.UILookupMergerSupport$OpenHookImpl.projectOpened(UILookupMergerSupport.java:193)
	at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:81)
	at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1065)
	at org.netbeans.modules.project.ui.OpenProjectList.doOpenProject(OpenProjectList.java:1116)
	at org.netbeans.modules.project.ui.OpenProjectList.doOpen(OpenProjectList.java:669)
	at org.netbeans.modules.project.ui.OpenProjectList.access$1200(OpenProjectList.java:122)
	at org.netbeans.modules.project.ui.OpenProjectList$3.run(OpenProjectList.java:559)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)
Comment 1 davisn 2009-10-07 22:31:51 UTC
Created attachment 89062 [details]
messages.log
Comment 2 davisn 2009-10-07 23:41:46 UTC
This problem also happens with the jpa criteriaQuery sample
Comment 3 davisn 2009-10-07 23:42:57 UTC
SDK build file install (eg, window)
java_ee_sdk-6-b23-10_07_2009-windows.exe 
Comment 4 Nitya Doraisamy 2009-10-09 01:03:58 UTC
Added null check for context root mapping from "/" to "" for NB.
Samples don't have context root defined and hence the NPE. With null check, the sun-web.xml gets updated with the app
name as the context root when Web App is opened in IDE. 

So IDE deploy will have the same effect as from command line, the webapp will be loaded using webapp name as the context
root.

Have fix, waiting on hg availability ...
Comment 5 davisn 2009-10-09 01:07:45 UTC
Below is the SDK samples share the same problem:
JPA
  advancedMapping
  criteriaQuery
EJB:
   ejb31-war
  
Comment 6 Nitya Doraisamy 2009-10-10 01:31:17 UTC
Fixed
http://hg.netbeans.org/web-main/rev/4a746a68d3a2
Comment 7 Nitya Doraisamy 2009-10-10 01:35:57 UTC
*** Issue 174035 has been marked as a duplicate of this issue. ***
Comment 8 davisn 2009-10-28 02:37:21 UTC
Verified as fixed with NB 6.8 Beta build