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.
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.
I don't understand from the description what the problem is and what exactly needs to be fixed.
Even the meaning of "metadata is not available" eludes me. How do you tell that metadata are not available?
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
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.
Isn't the fact that the Tables node has no childen a visual feedback? What do you suggest to do more?
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.
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?
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.
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?
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.
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.
Reassigned to new owner.