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.

Bug 108233 - Need better error checking when if metadata is not available when connecting
Summary: Need better error checking when if metadata is not available when connecting
Status: NEW
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC All
: P2 blocker with 1 vote (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-27 00:13 UTC by John Baker
Modified: 2013-09-04 08:22 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Baker 2007-06-27 00:13:15 UTC
Seems that metadata is retrieved before confirming the connection.
Need to check the connection first and if it fails, then post a warning dialog and avoid attempting to retrieve metadata.

From this Customer reply to my question on nbusers:

---- jwbaker <John.Baker@Sun.COM> wrote: 

=============

Maybe you're trying to connect to a different schema this time in M9 ?
Or, changes were made, such as permissions to view tables by the user you're
logging in as ?
>That could be...good chance of it being a permission thing.
>
>It looks like Netbeans attempts to pull the table information at first.  You see the hour glass for a brief second and
the GUI changes like it is trying to add sub-nodes to Tables, then it goes back to the way it was.
>
>To me, if the authority isn't there, then a warning message should be logged.
Comment 1 Andrei Badea 2007-06-27 09:52:53 UTC
I don't understand from the description what the problem is and what exactly needs to be fixed.
Comment 2 Andrei Badea 2007-06-27 09:54:18 UTC
Even the meaning of "metadata is not available" eludes me. How do you tell that metadata are not available?
Comment 3 John Baker 2007-06-27 19:02:48 UTC
Even though the user is able to make a successful connection to the database, the tables are not visible.
User is suspecting that the underlying database permissions had been changed.

When expanding the connection, there is no visual feedback if no tables are found
Comment 4 John Baker 2007-06-27 19:09:12 UTC
If there's any error from the database server then that might help the user to understand why the tables are not appearing

The user is aware of this issue number and if any more info can be added, then that would be great.



Comment 5 Andrei Badea 2007-06-28 10:35:10 UTC
Isn't the fact that the Tables node has no childen a visual feedback? What do you suggest to do more?
Comment 6 David Vancouvering 2007-06-28 18:39:27 UTC
I agree that no tables showing is a visual cue, but it's a confusing one.  The first impression of users is that they
did something wrong, and they have to go and check to see if they actually created the tabes, yada yada.

If we could pop up a dialog saying there was an error retrieving metadata, or badge the connection to indicate there is
a problem, that would indicate to them it isn't that there are no tables but something else is going on.
Comment 7 David Vancouvering 2007-06-28 18:43:32 UTC
Sorry, my last comment was a bit off.  This bug is not about metadata errors, but problems with the connection itself
(e.g. permissions).

That said, it seems very related to issue 105684, which is about metadata errors (focusing on driver version issues, but
I think it really is more of an umbrella issue for handling and reporting errors with metadata).

I'd like to suggest I take on this issue as well, since I'm working on 105684.  I could then take care of handling both
connection errors and metadata errors in one shot, in a consistent way.

What do you think, John?
Comment 8 Andrei Badea 2007-06-28 20:14:47 UTC
Re. desc7: we do display a warning message when an error occurs while retrieving metadata. E.g. when a SQLException is
thrown a dialog message appears containing the message of the exception. What else do we need to do?

If there are places where exceptions are silently swallowed instead of being reported, then those places should
obviously be fixed (and such issues should be considered defects, not enhancements). But I don't see a concrete report
about such places or steps do reproduce such issues.

Sorry, but despite there's already been a lot of talk in this issue, I still don't understand what exactly needs to be
fixed. If you do and I'm just missing something, please explain it to me.
Comment 9 David Vancouvering 2007-06-28 22:06:41 UTC
Well, I will try to reproduce, but from all the messages I read on nbusers, users don't see anything except an empty
database with no tables and send email to nbusers scratching their heads.  Usually this is because they are using an
older driver; I'm going to try to make this happen with an older Oracle driver (if I can find one).  Does anyone have an
older Oracle driver?
Comment 10 _ jimdavidson 2007-06-28 22:17:09 UTC
Old Oracle drivers:

http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

As Andrei says, we should make sure that when SQLExceptions are thrown we catch them and report intelligently to the user.
That may not be happening here.

The alternative is that the driver is silently returning bogus metadata, which would be really bad.
Comment 11 Andrei Badea 2007-07-17 13:42:34 UTC
I just realized that in FCS builds the Unexpected Exception dialog that is used to report an exception does not show up
automatically, instead just a red icon appears flashing in the main window's right bottom corner. That may be why it
seems to users that e.g. "tables are not visible".

We probably need to create our own way to report SQLException's.
Comment 12 Jiri Rechtacek 2009-10-16 14:04:50 UTC
Reassigned to new owner.