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 195632 - NPE from eecommon.api.Utils.getInstanceReleaseID
Summary: NPE from eecommon.api.Utils.getInstanceReleaseID
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-17 23:53 UTC by Jesse Glick
Modified: 2011-02-21 21:16 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 Jesse Glick 2011-02-17 23:53:34 UTC
110217-b2dd30faea0c. After creating web sample projects with a GFv3 server configured, I see in console:

INFO [org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl]
java.lang.NullPointerException
	at org.netbeans.modules.glassfish.eecommon.api.Utils.getInstanceReleaseID(Utils.java:231)
	at org.netbeans.modules.glassfish.eecommon.api.config.GlassfishConfiguration.getTargetAppServerVersion(GlassfishConfiguration.java:335)
	at org.netbeans.modules.glassfish.eecommon.api.config.GlassfishConfiguration.computeMaxASVersion(GlassfishConfiguration.java:241)
	at org.netbeans.modules.glassfish.eecommon.api.config.GlassfishConfiguration.<init>(GlassfishConfiguration.java:163)
Caused: org.netbeans.modules.j2ee.deployment.common.api.ConfigurationException: /tmp/ServletExamples/web/WEB-INF/sun-web.xml
	at org.netbeans.modules.glassfish.eecommon.api.config.GlassfishConfiguration.<init>(GlassfishConfiguration.java:202)
	at org.netbeans.modules.glassfish.eecommon.api.config.GlassfishConfiguration.<init>(GlassfishConfiguration.java:117)
	at org.netbeans.modules.glassfish.javaee.Hk2Configuration.<init>(Hk2Configuration.java:76)
	at org.netbeans.modules.glassfish.javaee.Hk2ModuleConfigFactory.create(Hk2ModuleConfigFactory.java:65)
[catch] at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl$1.run(ConfigSupportImpl.java:790)
	at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl$1.run(ConfigSupportImpl.java:769)
	at org.openide.util.Mutex.readAccess(Mutex.java:288)
	at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getModuleConfiguration(ConfigSupportImpl.java:769)
	at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getDatasources(ConfigSupportImpl.java:394)
	at org.netbeans.modules.j2ee.common.ui.BrokenDatasourceSupport.getBrokenDatasources(BrokenDatasourceSupport.java:156)
	at org.netbeans.modules.j2ee.common.project.ui.AbstractLogicalViewProvider.hasBrokenDataSource(AbstractLogicalViewProvider.java:829)
	at org.netbeans.modules.j2ee.common.project.ui.AbstractLogicalViewProvider.access$1200(AbstractLogicalViewProvider.java:118)
	at org.netbeans.modules.j2ee.common.project.ui.AbstractLogicalViewProvider$4.run(AbstractLogicalViewProvider.java:339)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 1 Vince Kraemer 2011-02-18 19:42:01 UTC
Can I get a bit more detail about how I can reproduce this?

Is that the only exception in the log related to eecommon.api.Utils.getInstanceReleaseID()
Comment 2 Quality Engineering 2011-02-19 10:34:38 UTC
Integrated into 'main-golden', will be available in build *201102190501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/7b3abd7eac5c
User: Vince Kraemer <vkraemer@netbeans.org>
Log: #195632 : protect against a half set project... it looks like setServerInstance can loop around and call getServerInstance.  Strange, but it should not be quite so deadly.
Comment 3 Vince Kraemer 2011-02-21 21:16:42 UTC
I was getting a similar exception and have resolved it.

Please reopen and include additional details on how to reproduce this issue if you still run into it...