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 179025 - NullPointerException at org.netbeans.modules.glassfish.javaee.db.DbUtil.normalizePoolMap
Summary: NullPointerException at org.netbeans.modules.glassfish.javaee.db.DbUtil.norma...
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-24 11:21 UTC by cinhtau
Modified: 2010-03-04 22:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 163683


Attachments
stacktrace (1.50 KB, text/plain)
2009-12-24 11:21 UTC, cinhtau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cinhtau 2009-12-24 11:21:44 UTC
Build: NetBeans IDE 6.8 (Build 200912041610)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Linux, 2.6.31-16-generic, i386

User Comments:
cinhtau: I click "Click Create Persistence Unit" as I read this  http://netbeans.org/kb/docs/javaee/javaee-gettingstarted.html 

I have the current jdk1.6_017 installed and GlassfishV3.

GUEST: The following exception was thrown when invoking the wizard 'create entities from a db'. No screen was even shown.

GUEST: I tried to create new entity class from database



Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.glassfish.javaee.db.DbUtil.normalizePoolMap(DbUtil.java:102)
   at org.netbeans.modules.glassfish.javaee.db.Hk2DatasourceManager$ConnectionPool.normalize(Hk2DatasourceManager.java:290)
   at org.netbeans.modules.glassfish.javaee.db.Hk2DatasourceManager.readDatasources(Hk2DatasourceManager.java:199)
   at org.netbeans.modules.glassfish.javaee.db.Hk2DatasourceManager.getDatasources(Hk2DatasourceManager.java:105)
   at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.getDatasources(ServerInstance.java:693)
   at org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider.getServerDatasources(J2eeModuleProvider.java:196)
Comment 1 cinhtau 2009-12-24 11:21:51 UTC
Created attachment 92909 [details]
stacktrace
Comment 2 cinhtau 2009-12-24 13:22:32 UTC
As I told before in http://statistics.netbeans.org/analytics/exception.do?id=321594:

I add a new datasource in ConnectionPools Glassfish Configuration and pressing the button Create Persistence Unit started to work. The cause is unknown to me.
Comment 3 cinhtau 2009-12-25 02:23:21 UTC
I assume this is an unchecked verification. You are expecting a DataSource. This hasn't exists before. As I created a DataSource for my Postgresql-DB the NullPointerException didn't occur anymore. In general it is ugly not to verify if existing Objects->DataSources exists.
Comment 4 Exceptions Reporter 2010-01-08 11:14:03 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=163683
Comment 5 Quality Engineering 2010-03-04 22:12:23 UTC
Integrated into 'main-golden', will be available in build *201003050200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e458abe53e5b
User: Vince Kraemer <vkraemer@netbeans.org>
Log: #179025: handle an NPE and print out info to help track root cause
Comment 6 Vince Kraemer 2010-03-04 22:24:14 UTC
in the trunk