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 151425 - NPE when opening visual web
Summary: NPE when opening visual web
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 6.x
Hardware: Other Windows XP
: P3 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-27 09:38 UTC by tpielhau
Modified: 2009-02-19 23:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tpielhau 2008-10-27 09:38:05 UTC
When opening a visual web project (JSF1.1 with backwards compatibility plugin installed) a NullPointerException is
thrown and the project is not opened.

The project uses GlassFish, but during installation of 6.5 RC1 only tomcat was selected.

NPE:
java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:394)
	at java.util.Properties.setProperty(Properties.java:143)
	at org.netbeans.modules.j2ee.sun.ide.dm.SunDeploymentManager.storeAntDeploymentProperties(SunDeploymentManager.java:1478)
	at
org.netbeans.modules.j2ee.sun.ide.j2ee.AntDeploymentProviderImpl.getDeploymentPropertiesFile(AntDeploymentProviderImpl.java:84)
	at
org.netbeans.modules.j2ee.deployment.devmodules.api.AntDeploymentHelper.getDeploymentPropertiesFile(AntDeploymentHelper.java:152)
	at
org.netbeans.modules.web.project.ui.customizer.WebProjectProperties.setNewServerInstanceValue(WebProjectProperties.java:936)
	at org.netbeans.modules.web.project.ui.customizer.WebProjectProperties.access$500(WebProjectProperties.java:118)
	at org.netbeans.modules.web.project.ui.customizer.WebProjectProperties$5.run(WebProjectProperties.java:823)
	at org.openide.util.Mutex.postRequest(Mutex.java:1251)
	at org.openide.util.Mutex.postWriteRequest(Mutex.java:582)
	at org.netbeans.modules.web.project.ui.customizer.WebProjectProperties.setServerInstance(WebProjectProperties.java:817)
	at org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectOpened(WebProject.java:865)
	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:1003)
	at org.netbeans.modules.project.ui.OpenProjectList.doOpenProject(OpenProjectList.java:1051)
	at org.netbeans.modules.project.ui.OpenProjectList.doOpen(OpenProjectList.java:615)
	at org.netbeans.modules.project.ui.OpenProjectList.access$1200(OpenProjectList.java:124)
	at org.netbeans.modules.project.ui.OpenProjectList$3.run(OpenProjectList.java:505)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Comment 1 tpielhau 2008-10-27 10:29:46 UTC
Opening of project works when glassfish is known to netbeans installation.
Comment 2 Vince Kraemer 2008-10-27 23:41:59 UTC
I am using RC2 and cannot reproduce this...

Here is what I did:

1. started nb 6.1 and created a visual java server face app that targets v2ur2.
2. closed the 6.1
3. started 6.5
4. removed the v2ur2 that was registered in the IDE
5. closed 6.5
6. moved the v2ur2 install to a new location (removed the old install)
7. started 6.5
8. opened the project that I created in step 1, in the ide started in step 7...
   the ide doesn't have any glassfish install associated with it.

Please let me know what steps you took that were different from what i have outlined above...
Comment 3 Vince Kraemer 2008-10-28 15:48:20 UTC
from an e-mail with the filer...

this is the sequence of actions that did not work on my machine:

1.) installed 6.5, unchecked both glassfish servers, checked tomcat
2.) installed backwards compatibility plugin
3.) restarted netbeans (as requested by plugin)
4.) checked out JSF1.1 VWP from our subversion repository
5.) let netbeans check for projects and tried to open the VWP

This is when the NPE is thrown and the project is not opened.

Filer: please try to keep correspondence about an issue in the issue, by adding additional comments to the issue.
Comment 4 Vince Kraemer 2008-10-28 22:54:53 UTC
I haven't been able to reproduce this, but there is an obvious 'fix' for line 1478 (and 1479).

http://hg.netbeans.org/main/rev/1d3c233f6da7

Please get a recent trunk build created after the update from 'qa' about the push into main-golden and try it out.

Reopen if there is still a problem (and include any 'new' info that is available)...
Comment 5 Quality Engineering 2008-10-29 05:01:11 UTC
Integrated into 'main-golden', will be available in build *200810290201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/1d3c233f6da7
User: Vince Kraemer <vkraemer@netbeans.org>
Log: #151425 : NPE when opening a project that targets GF and GF is not registered