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.
This is odd, but here's how I made this happen: - Show data on Sakila actor table - Type in "PENE" in matchbox - page forward, page back, page forward (keep trying this). Then I get this exception. I also notice a lot of dialogs quickly flashing up and going away. I almost suspect that the DataView is reconnecting to the database each time I paginate
Copying Ahi, because I think DataView is involved in this bug.
Here's the stack trace: java.lang.NullPointerException at org.netbeans.modules.db.explorer.node.ForeignKeyNode.initialize(ForeignKeyNode.java:90) at org.netbeans.api.db.explorer.node.BaseNode.setup(BaseNode.java:149) at org.netbeans.modules.db.explorer.node.ForeignKeyNode.create(ForeignKeyNode.java:70) at org.netbeans.modules.db.explorer.node.ForeignKeyNodeProvider.initialize(ForeignKeyNodeProvider.java:127) at org.netbeans.api.db.explorer.node.NodeProvider.getNodes(NodeProvider.java:103) at org.netbeans.modules.db.explorer.node.NodeRegistry.getNodes(NodeRegistry.java:149) at org.netbeans.api.db.explorer.node.ChildNodeFactory.createKeys(ChildNodeFactory.java:104) at org.openide.nodes.AsynchChildren.run(AsynchChildren.java:158) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)
Correction: you don't need to filter for this to happen. Just paginate with no matchbox, and you'll get the same behavior - page forward/back about three times and BANG.
Changing ownership and title, because after restarting NB the NPE went away, but I'm still getting the *very* annoying flashing dialogs every time I paginate. I noticed if I pay careful attention that it is saying "Connecting". I think DataView is invoking the API to connect to the database *twice* every time I paginate. I think this constant reconnecting is uncovering a bug in the new Database Explorer infrastructure, perhaps a timing bug. This happens every time you paginate and it's very annoying. Making it a P1 because we really can't release with something like this... I consider it a blocker.
Wow. I can see what's wrong just by looking at the code. Fix is on the way.
Just to clarify, I see what's wrong in the ForeignKeyNode. I'll fix that. I don't know about the connection issue you're referring to.
I made a fix in fdb69bf5227a. I'm not able to reproduce the NPE in the ForeignKeyNode now. Can you check using the same environment you used. I won't mark as fixed until you verify. Thanks.
Thanks for fixing this, Rob. I don't think I can verify since I couldn't reproduce it after the first time. I'll have to trust you :) I guess there are two issues. I'm going to be a bit sloppy here and re-open this one with a new title for Ahi, since the description of the bug is already in this issue. I wouldn't do this during maintenance phase, but I think it's OK right now. Ahi, the problem I'm seeing is described in the comments below: every time you paginate in the data view, you get two flashing dialogs saying "Connecting... something something". It's very annoying and it's obviously a bug - you shouldn't have to reconnect to the database (*twice*) for a new page when you're already connected. See my justification for P1 below.
http://hg.netbeans.org/main/rev/d7ba03697249
Verified with build 081218. By pagination dialog doesn't appear. After disconnection it appears only one time and never after this by pagination.
Integrated into 'main-golden', will be available in build *200812221122* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/fdb69bf5227a User: Rob Englander <mindstream@netbeans.org> Log: #155725 DB Explorer nodes should always grab the handle from their lookup during construction.