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.
jdk6u2 Build:200708161200 Steps to reproduce: 1. Import Creator project that uses a data source in NB6 with fresh userdir. 2. Expand project node. 3. Once Updating data sources is finished open page. NPE will be thrown and design view does not come up: java.lang.NullPointerException at org.netbeans.modules.visualweb.project.jsf.services.DesignTimeDataSourceServiceImpl.updateResourceReference(DesignTimeDataSourceServiceImpl.java:144) at org.netbeans.modules.visualweb.dataconnectivity.sql.DesignTimeDataSourceHelper.updateDataSource(DesignTimeDataSourceHelper.java:547) at org.netbeans.modules.visualweb.dataconnectivity.naming.DesignTimeContext.updateBindings(DesignTimeContext.java:284) at org.netbeans.modules.visualweb.dataconnectivity.naming.DesignTimeContext.lookup(DesignTimeContext.java:134) Seems like the exception is coming from line 547 in DesignTimeDataSourceHelper.java. From Fisheye it seems that there was a addition/change made to DesignTimeDataSourceHelper.java to fix issue 112367 (Resource reference is added to the wrong file) on Aug 15. This apparently has caused a regression. Workaroud: Workaround is to close the page and open it again. Then the page will come up fine. Attaching messages.log
Created attachment 46802 [details] Ide log
Works for me. Can you attach a project
Note, if you have not registered Glassfish then an error will occur. I filed a bug against serverplugins
see also 106591
Created attachment 46809 [details] Creator project that uses mysql connection on jbrave-pc1
Still no NPE occurs using the attached project.
Is the design View coming up fine for the page?
I can reproduce this consistently on builds 200708161200 and 200708171200. Also the NPE will occur on the design view when the page is opened.
Krys can also reproduce the issue on her machine: WinXP, jdk5u12
I installed clean 817 Web J2EE build (nightly) and downloaded the project again and unzipped then started with a clean userdir. Then opened the project and expanded. No page opens and no NPE occurred.
I'm on Win XP and JDK 1.5.0_12
While opening the page an NPE occurs (different stack trace)
OK, I think the problem is that you don't have Creator userdir with that datasource defined in it. You are probably getting: java.lang.NullPointerException at com.sun.sql.rowset.CachedRowSetXImpl.getConnection(CachedRowSetXImpl.java:4239) at com.sun.sql.rowset.CachedRowSetXImpl.getMetaData(CachedRowSetXImpl.java:2384) at com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDataProvider.java:1388) at com.sun.data.provider.impl.CachedRowSetDataProvider.getFieldKeys(CachedRowSetDataProvider.java:507) Try this scenario: 1. Create a new project in Creator and create a new db connection to jdbc:mysql://jbrave-pc1.sfbay.sun.com:3306/travel 2. Bind a component to databse table, build and close page and project. 3. Open Creator Project in NB6 with fresh userdir and expand project node. 4. Once Updating data sources process is completed open Page. You will see the exception in the design view.
the attached project must have been invalid I can reproduce the NPE by creating a new Creator 2 project. Expand the project then open the page. However, the page opens and binding is successful, just that an NPE occurs
removing INCOMPLETE
Has this been resolved and fixed ?
I am reopening this issue assuming that you have marked it as resolved and fixed by mistake when removing INCOMPLETE keyword.
Fixed. No need to update the Resource References when opening a project Checking in visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/sql/DesignTimeDataSourceHelper.java; /cvs/visualweb/dataconnectivity/src/org/netbeans/modules/visualweb/dataconnectivity/sql/DesignTimeDataSourceHelper.java,v <-- DesignTimeDataSourceHe lper.java new revision: 1.16; previous revision: 1.15 done
This bug is still reproduced on: Product Version: NetBeans IDE Dev (Build 200708200000) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 System: Windows XP version 5.1 running on x86 Let's discuss, please: if you open the attached project "DBTestMySqL" without the appropriate MySQL-connection, no NPE will appear, but: - no warnings about UNRESOLVED data sources will appear too - root project tree node won't be red in the window "Projects" - there will be no project popup menu item for resolving of required data sources. Should this bug be reopened or should I file new REGRESSION-bug?
The latest comments are not related to this issue. Marking as fix verified
Answers to latest comments. A separate issue can be filed if you open the attached project "DBTestMySqL" without the appropriate MySQL-connection, no NPE will appear, but: - no warnings about UNRESOLVED data sources will appear too - root project tree node won't be red in the window "Projects" - there will be no project popup menu item for resolving of required data sources. Expanding the project will add a MySQL connection if the connection exists from a Creator 2/ or NetBeans 5.5/5.5.1 project Otherwise, if no required connection is available then the project node will be badged and turn red. The limitation is detection of missing connections cannot be determined until the project data sources are determined. At this time there are no connection changes being made so the project node badging won't occur. No project popup menu will be available also
Verified on: Product Version: NetBeans IDE Dev (Build 200708200000) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 System: Windows XP version 5.1 running on x86
Agreed this is a Regression