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 122568 - Tables do not display in dialog "New Desktop Application" while connected to Microsoft SQL Server
Summary: Tables do not display in dialog "New Desktop Application" while connected to ...
Status: RESOLVED INVALID
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Vancouvering
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-22 08:58 UTC by hapeso
Modified: 2008-01-09 19:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Microsoft SQL Server 2005 JDBC Driver 1.1 used (247.19 KB, application/octet-stream)
2007-11-22 09:01 UTC, hapeso
Details
Here the GUI stucks (61.23 KB, text/plain)
2007-11-27 16:25 UTC, hapeso
Details
Tabels do not appear but the connection there (53.21 KB, text/plain)
2007-11-27 16:27 UTC, hapeso
Details
messages.log - UID replaced by ******** (40.96 KB, text/plain)
2007-11-27 16:30 UTC, hapeso
Details
Connections OK but schemas not visible on both (49.53 KB, text/plain)
2007-11-29 07:09 UTC, hapeso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hapeso 2007-11-22 08:58:26 UTC
The tables do not display in the dialog "New Desktop Application", "Steps - Master Table - Database Connection - 
jdbc:sqlserver://<ServersFQDN>:1433;databaseName=<DBName>" while successfully connected to Microsoft SQL Server.

The driver was downloaded via

http://www.microsoft.com/downloads/details.aspx?familyid=6d483869-816a-44cb-9787-a866235efc7c&displaylang=en

Installed in C:\Program Files\NetBeans 6.0 RC2\ide8\modules\ext>dir sqljdbc.jar  /N

16.08.2006  16:00           253'122 sqljdbc.jar
               1 File(s)        253'122 bytes
               0 Dir(s)  19'595'317'248 bytes free
Comment 1 hapeso 2007-11-22 09:01:33 UTC
Created attachment 53353 [details]
Microsoft SQL Server 2005 JDBC Driver 1.1 used
Comment 2 David Vancouvering 2007-11-26 17:44:02 UTC
Can you see the tables when you explore the connection under the Services tab?

Can you please attach the message log?  It's in your netbeans userdir under /var/log/messages.log.
Comment 3 hapeso 2007-11-27 16:21:12 UTC
I can't see the tables when I explore the connection under the services tab. There server is connected. See also 
screen2.tiff
Comment 4 hapeso 2007-11-27 16:25:49 UTC
Created attachment 53557 [details]
Here the GUI stucks
Comment 5 hapeso 2007-11-27 16:27:36 UTC
Created attachment 53559 [details]
Tabels do not appear but the connection there
Comment 6 hapeso 2007-11-27 16:30:17 UTC
Created attachment 53560 [details]
messages.log - UID replaced by ********
Comment 7 David Vancouvering 2007-11-27 20:05:00 UTC
I'm trying to reproduce (the server is down), but meanwhile, I noticed that the JDBC URLs we use for our MSSQL
connections include the following ";selectMethod=cursor".  Does your connection have this?  If not, try adding it.  I
don't know what it means, but it may be important.

Also, what version of Microsoft SQL Server are you running?

Thanks!
Comment 8 David Vancouvering 2007-11-27 20:09:12 UTC
By the way, according to 

http://wiki.netbeans.info/wiki/view/DatabasesAndDrivers

this driver has not been officially tested, but "should work based on experience."  

I'm actually surprised that we don't officially test any driver against MS SQL Server.  I'll bring this up with QA.
Comment 9 hapeso 2007-11-28 07:59:14 UTC
Connecting to the server is possible, with jTDS and the driver from Microsoft. Including SelectMethod=cursor does not 
change anything, see also below. The "Execute Command..." works fine on both. But it is not possible to retrieve the 
schemas. What command do you use to retrieve them?

SelectMethod=cursor and SelectMethod=direct
http://www.ureader.com/message/240101.aspx and 
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2019317&SiteID=1
Comment 10 David Vancouvering 2007-11-28 19:17:40 UTC
We use DatabaseMetaData APIs to get schema information.  Can you see tables with jTDS?  I couldn't tell from your comment.

What version of SQL Server are you using?

Thanks!

David
Comment 11 hapeso 2007-11-29 07:05:57 UTC
select @@version

Microsoft SQL Server  2000 - 8.00.2039 (Intel X86) 
	May  3 2005 23:18:38 
	Copyright (c) 1988-2003 Microsoft Corporation
	Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

The tables are not visible neither via jTDS nor Microsoft Driver. But it is possible to execute commands, e.g. select 
@@version and they work fine. But it is not possible to retrieve the schemas via the NetBeans GUI. It looks like the 
error is not with the drivers but higher up the stack.
Comment 12 hapeso 2007-11-29 07:09:45 UTC
Created attachment 53646 [details]
Connections OK but schemas not visible on both
Comment 13 David Vancouvering 2007-11-29 21:25:11 UTC
OK, thanks for the information.  It seems pretty clear that our attempts to get metadata from the database using
DatabaseMetaData are failing (silently for some reason).

The version of SQL Server you are using is pretty darn old...  I suspect it doesn't support DatabaseMetaData.

I will try to see if we have such a version in house, but I think we don't test with it and I doubt we support it.  Can
you test with a newer version of SQL Server and see if that helps?

David
Comment 14 Andrei Badea 2007-11-30 10:12:27 UTC
Which schema do you connect to? Please try the following:

1. Open the Services tab.
2. Remove any MS SQL connections.
3. Create your connection again (right-click on the driver, invoke Connect Using). Enter the database URL, user name and
password. Now click on the Advanced tab. Press the Get Schema button and select the "dbo" schema. Press OK.

Do you see the tables now?
Comment 15 hapeso 2007-12-01 15:38:20 UTC
Now I can see them in all their glory, with both drivers. Thank you very much! – Did I miss something or is this to be 
corrected? E.g. change default schema to “dbo”?

Comment 16 David Vancouvering 2008-01-09 19:46:04 UTC
User needed to select the correct schema