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.
Steps to repeat the situation: 1. Connect to Firebird database using JayBird JDBC driver (JayBird 2.1.3 for JDK 1.6) 2. Create Web Application using Visual Web JavaServer Faces (NetBeans IDE 6.0.1 full installation bundled with Glassfish v2ur1, JDK 1.6.0u4) 3. Put Table component onto the page in Design Editor 4. Drag table from the database connected onto Table component The same problem exists on Windows XP. Has this problem been solved? The stack trace: java.lang.NullPointerException at com.sun.sql.rowset.CachedRowSetXImpl5.getConnection(CachedRowSetXImpl5.java:4111) at com.sun.sql.rowset.CachedRowSetXImpl5.getMetaData(CachedRowSetXImpl5.java:2255) at com.sun.data.provider.impl.CachedRowSetDataProvider.getMetaData(CachedRowSetDataProvider.java:1436) at com.sun.data.provider.impl.CachedRowSetDataProvider.getFieldKeys(CachedRowSetDataProvider.java:551) at com.sun.webui.jsf.component.TableDesignInfo.linkBeans(TableDesignInfo.java:176) at org.netbeans.modules.visualweb.insync.models.FacesModel.linkBeans(FacesModel.java:1204) at org.netbeans.modules.visualweb.designer.jsf.JsfForm.linkDesignBeans(JsfForm.java:2872) at org.netbeans.modules.visualweb.designer.jsf.FacesDndSupport.processLinks(FacesDndSupport.java:1090) at org.netbeans.modules.visualweb.designer.jsf.FacesDndSupport.importBean(FacesDndSupport.java:650) at org.netbeans.modules.visualweb.designer.jsf.FacesDndSupport.importData(FacesDndSupport.java:416) at org.netbeans.modules.visualweb.designer.jsf.FacesDndSupport.importData(FacesDndSupport.java:3699) at org.netbeans.modules.visualweb.designer.jsf.DndSupport.importData(DndSupport.java:586) at org.netbeans.modules.visualweb.designer.jsf.DomProviderImpl.importData(DomProviderImpl.java:1169) at org.netbeans.modules.visualweb.designer.WebForm.importData(WebForm.java:2207) at org.netbeans.modules.visualweb.designer.DndHandler.importDataExt(DndHandler.java:490) at org.netbeans.modules.visualweb.designer.DndHandler.importData(DndHandler.java:348) at org.netbeans.modules.visualweb.designer.DesignerTransferHandler.importData(DesignerTransferHandler.java:92) at org.netbeans.modules.visualweb.designer.DesignerPaneDropTarget$DefaultTransferHandlerDropTargetListener.drop(DesignerPaneDropTarget.java:235) at java.awt.dnd.DropTarget.drop(DropTarget.java:430) at org.netbeans.modules.visualweb.designer.DesignerPaneDropTarget.drop(DesignerPaneDropTarget.java:153) at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:500) at sun.awt.X11.XDropTargetContextPeer.processDropMessage(XDropTargetContextPeer.java:165) at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:812) at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:736) at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:30) at java.awt.Component.dispatchEventImpl(Component.java:4270) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4243) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4057) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3911) at java.awt.Container.dispatchEventImpl(Container.java:2102) at java.awt.Window.dispatchEventImpl(Window.java:2440) at java.awt.Component.dispatchEvent(Component.java:4243) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Binding Firebird tables to Visual Web has worked previously using JDK 1.5 on Windows. The NullPointerException is caused by a data source name change in the SessionBean or server config file. I'll have to evaluate using JDK 1.6 Could you attach your project to make sure there's nothing wrong with your project
Now, in 6.1, instead of a NullPointerException, a NameNotFoundException will occur and the name of the data source that wasn't found will be listed
Here is the configuration I have confirmed that is working Driver: JayBird 2.1.1 for JDK 1.5 Connection URL: jdbc:firebirdsql://localhost/C:\\Program Files\\Firebird\\Firebird_2_0\\examples\\empbuild\\EMPLOYEE.FDB Username: SYSDBA Password: masterkey
I see this information on the Firebird site about JayBird driver 2.1.3: "Jaybird 2.1.3 released. This release fixes only one bug, JDBC-106, which is related to the situation when developers use DatabaseMetaData class with identifiers/patterns with case different to the one in the database." I wonder if this fix introduced a new bug. It might be worth trying 2.1.2 for JDK 1.6
JayBird driver 2.1.3 still works for me, using JDK 1.6.0_02 on Windows. Configuration: Driver: JayBird 2.1.3 for JDK 1.6 (I used jaybird-2.1.3.jar) Connection URL: jdbc:firebirdsql://localhost/C:\\Program Files\\Firebird\\Firebird_2_0\\examples\\empbuild\\EMPLOYEE.FDB Username: SYSDBA Password: masterkey 1) Create new Visual Web application 2) Drag and drop a JSF Table component to the Page design 3) Drag and drop the EMPLOYEE table and bind to the JSF table
Also, make sure the data source name set in the method, _init() in SessionBean1.java matches the JNDI name in sun-resources.xml file in the setup folder of your project. SessionBean1.java: private void _init() throws Exception { employeeRowSet.setDataSourceName("java:comp/env/jdbc/EMPLOYEE_Firebird2.0"); employeeRowSet.setCommand("SELECT * FROM EMPLOYEE"); employeeRowSet.setTableName("EMPLOYEE"); } ------ sun-resources.xml: <resources> <jdbc-resource enabled="true" jndi-name="jdbc/EMPLOYEE_Firebird2.0" object-type="user" pool-name="jdbc_firebirdsql_localhost_C___Program Files__Firebird__Firebird_2_0__examples__empbuild__EMPLOYEE.FDBPool"/>
I can't connect to Firebird database using jaybird-2.1.3.jar. Only jaybird-full-2.1.3.jar works (using org.firebirdsql.jdbc.FBDriver).
Created attachment 59471 [details] My Simple WebApplication working with Firebird database
Created attachment 59472 [details] Backup of the Firebird database used in Simple WebApplication
I've posted web project and database backup for testing. Data source name seems to be correct. Should I copy jaybird .jar files into Sun Application Server directory?
Completely the same situation appears in Windows XP. I have tested today.
Although using my installation of Firebird, the data source name is generated in a valid format (jdbc/PERSON_Firebird2.0) The reason for the binding to fail for your Firebird installation the data source name generated is in an invalid format. (jdbc/Firebird2.04LI-V2.0.3.12981Firebird2.0_tcp(krypton.local)/P10) There is a workaround, however. Open the Options dialog from the main menu, Tools->Options Then choose Miscellaneous->Visual Web Next, enable Prompt for Data Sources Retry drag and drop a database table. A dialog will open allowing the user to enter a name (do not prefex with jdbc/) Then check the Server Resources node and open sun-resources.xml to verify the name entered. Despite this workaround, this limitation could be fixed, but not for 6.1
The workaround you described works. I will be looking forward to fixing this bug in future versions of NetBeans. Thank you for your help.
http://hg.netbeans.org/main/rev/d082e9deb3c7
QE requested me to verify then mark as verified
fix backported into release61_fixes branch changeset: 77532:b6714a468bd9