Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 131603 - Invalid data source name generated when dragging table from FireBird database
Invalid data source name generated when dragging table from FireBird database
Product: obsolete
Classification: Unclassified
Component: visualweb
All Linux
: P3 (vote)
: 6.x
Assigned To: John Baker
Depends on:
  Show dependency treegraph
Reported: 2008-03-31 11:25 UTC by incubos
Modified: 2008-06-04 08:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

My Simple WebApplication working with Firebird database (17.14 KB, application/x-gzip)
2008-04-01 11:50 UTC, incubos
Backup of the Firebird database used in Simple WebApplication (3.00 KB, application/octet-stream)
2008-04-01 11:51 UTC, incubos

Note You need to log in before you can comment on or make changes to this bug.
Description incubos 2008-03-31 11:25:34 UTC
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:
	at com.sun.sql.rowset.CachedRowSetXImpl5.getConnection(
	at com.sun.sql.rowset.CachedRowSetXImpl5.getMetaData(
	at com.sun.webui.jsf.component.TableDesignInfo.linkBeans(
	at org.netbeans.modules.visualweb.insync.models.FacesModel.linkBeans(
	at org.netbeans.modules.visualweb.designer.jsf.JsfForm.linkDesignBeans(
	at org.netbeans.modules.visualweb.designer.jsf.FacesDndSupport.processLinks(
	at org.netbeans.modules.visualweb.designer.jsf.FacesDndSupport.importBean(
	at org.netbeans.modules.visualweb.designer.jsf.FacesDndSupport.importData(
	at org.netbeans.modules.visualweb.designer.jsf.FacesDndSupport.importData(
	at org.netbeans.modules.visualweb.designer.jsf.DndSupport.importData(
	at org.netbeans.modules.visualweb.designer.jsf.DomProviderImpl.importData(
	at org.netbeans.modules.visualweb.designer.WebForm.importData(
	at org.netbeans.modules.visualweb.designer.DndHandler.importDataExt(
	at org.netbeans.modules.visualweb.designer.DndHandler.importData(
	at org.netbeans.modules.visualweb.designer.DesignerTransferHandler.importData(
	at java.awt.dnd.DropTarget.drop(
	at org.netbeans.modules.visualweb.designer.DesignerPaneDropTarget.drop(
	at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(
	at sun.awt.X11.XDropTargetContextPeer.processDropMessage(
	at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(
	at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(
	at sun.awt.dnd.SunDropTargetEvent.dispatch(
	at java.awt.Component.dispatchEventImpl(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
	at java.awt.LightweightDispatcher.retargetMouseEvent(
	at java.awt.LightweightDispatcher.processDropTargetEvent(
	at java.awt.LightweightDispatcher.dispatchEvent(
	at java.awt.Container.dispatchEventImpl(
	at java.awt.Window.dispatchEventImpl(
	at java.awt.Component.dispatchEvent(
[catch] at java.awt.EventQueue.dispatchEvent(
	at java.awt.EventDispatchThread.pumpOneEventForFilters(
	at java.awt.EventDispatchThread.pumpEventsForFilter(
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(
	at java.awt.EventDispatchThread.pumpEvents(
	at java.awt.EventDispatchThread.pumpEvents(
Comment 1 John Baker 2008-03-31 18:53:25 UTC
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
Comment 2 John Baker 2008-03-31 19:24:31 UTC
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
Comment 3 John Baker 2008-03-31 19:27:59 UTC
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
Comment 4 John Baker 2008-03-31 19:45:53 UTC
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
Comment 5 John Baker 2008-03-31 20:37:26 UTC
JayBird driver 2.1.3 still works for me, using JDK 1.6.0_02 on Windows.


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
Comment 6 John Baker 2008-03-31 21:20:08 UTC
Also, make sure the data source name set in the method, _init() in matches the JNDI name in
sun-resources.xml file in the setup folder of your project.

 private void _init() throws Exception {
        employeeRowSet.setCommand("SELECT * FROM EMPLOYEE");



  <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"/>
Comment 7 incubos 2008-04-01 11:37:09 UTC
I can't connect to Firebird database using jaybird-2.1.3.jar. Only jaybird-full-2.1.3.jar works (using
Comment 8 incubos 2008-04-01 11:50:26 UTC
Created attachment 59471 [details]
My Simple WebApplication working with Firebird database
Comment 9 incubos 2008-04-01 11:51:23 UTC
Created attachment 59472 [details]
Backup of the Firebird database used in Simple WebApplication
Comment 10 incubos 2008-04-01 11:52:51 UTC
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?
Comment 11 incubos 2008-04-01 15:12:14 UTC
Completely the same situation appears in Windows XP. I have tested today.
Comment 12 John Baker 2008-04-03 02:51:23 UTC
Although using my installation of Firebird, the data source name is generated in a valid format

The reason for the binding to fail for your Firebird installation the data source name generated is in an invalid format.

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

Comment 13 incubos 2008-04-03 09:45:53 UTC
The workaround you described works. I will be looking forward to fixing this bug in future versions of NetBeans.

Thank you for your help.
Comment 14 John Baker 2008-04-22 00:36:13 UTC
Comment 15 John Baker 2008-04-23 00:13:36 UTC
QE requested me to verify then mark as verified 
Comment 16 jinb 2008-05-03 15:38:03 UTC
fix backported into release61_fixes branch
changeset: 77532:b6714a468bd9

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo