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.
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)
Created attachment 89062 [details] messages.log
This problem also happens with the jpa criteriaQuery sample
SDK build file install (eg, window) java_ee_sdk-6-b23-10_07_2009-windows.exe
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 ...
Below is the SDK samples share the same problem: JPA advancedMapping criteriaQuery EJB: ejb31-war
Fixed http://hg.netbeans.org/web-main/rev/4a746a68d3a2
*** Issue 174035 has been marked as a duplicate of this issue. ***
Verified as fixed with NB 6.8 Beta build