Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in NetBeans 6.0.1 when dragging table from JayBird database connection onto Table component in Page Design Editor (Web Application) [JDBC115] #155

Closed
firebird-automations opened this issue Mar 31, 2008 · 10 comments

Comments

@firebird-automations
Copy link

Submitted by: Vadim Tses'ko (incubos)

Relate to JDBC152

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)

Commits: 8191f5f

@firebird-automations
Copy link
Author

Modified by: Vadim Tses'ko (incubos)

security: Developers [ 10012 ] =>

@firebird-automations
Copy link
Author

Modified by: Roman Rokytskyy (rrokytskyy)

Fix Version: Jaybird 2.2 [ 10053 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

assignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Was able to reproduce the error message in Netbeans 6.0.1. I was able to retrieve the Netbeans source from http://olex.openlogic.com/content/openlogic/netbeans/6.0.1/openlogic-netbeans-6.0.1-all-src-1.zip

The offending line (4111) in CachedRowSetXImpl5 however executes getConnection on a DataSource it attempts to retrieve from a JNDI context.

The reason is that Netbeans generates an invalid datasource name based on the database version and productname reported by the Firebird DatabaseMetaData. This JNDI name is not resolvable (the Netbeans generated datasourceName on my machine is 'Firebird2.5-WI-V2.5.0.26074Firebird2.5_tcp(Ramona)/P10'. I guess that JNDI doesn't like the parentheses or the slash in the datasource name. This could mean that this might be fixed when including the patch of JDBC152.

Editing the sourcefiles to replace the generated datasource name with a simpler name solves the problem:
1) Under Server Resources, in sun-resources.xml change the datasourcename
2) In the appropriate sessionbean replace the datasource name with the new name.

It seems to be a bug in Netbeans, so I will try to reproduce this in the latest Netbeans 7.0.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Link: This issue relate to JDBC152 [ JDBC152 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Confirmed the cause is the '/' in the generated datasourcename. Unable to reproduce in Netbeans 7.0, as the Visual Web Pack was discontinued and removed. I will check if JDBC152 will fix the issue for Netbeans 6.0.1

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Fixed by change of JDBC152, marking as Duplicate

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: In Progress [ 3 ] => Resolved [ 5 ]

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants