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.
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)
Created attachment 92909 [details] stacktrace
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.
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.
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=163683
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
in the trunk