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.
The same problem applies to both wizards. Once I've made a connection to the database, a window appears, where I should select the appropriate database tables. However, this windows is empty. It did work before, so something must have changed, but there is no error message. It does not matter whether I make the database connection via JNDI (Glassfish appserver) or locally. Both local and remote DB connections work in other contexts, but not with these wizards.
I tried to reproduce based on the scarce description, but with no luck. Please: - use the latest daily build. - post steps to reproduce starting from a clean userdir. Something like: 1. Register a database driver and a connection. 2. Create an EJB project. 2. Open the Entity Classes from DB wizard... etc. - start NetBeans by passing -J-Dorg.netbeans.modules.db=0 on the command line - state the name and version of the database server and driver you are using Thanks.
Can you explain what you mean by "clean userdir"? Where do I configure that? I downloaded today's daily build, but the installer didn't work (it never works on my machine, which is why I always download as tar.gz). So, can I get the .tar.gz of the daily build somewhere?
New observations: I was successful in generating entity classes from an old Database Schema file, which I had generated with an earlier version of Netbeans. However, as soon as I select "recapture Schema from Database", the file becomes dysfunctional. Looking at the XML, all the DDL is gone, just a shell remains. I am attaching the file.
Created attachment 33719 [details] Dysfunctional Schema file (DB Driver and Version inside)
You can get a clean userdir by running NetBeans with the option -userdir <some_directory> This will make NetBeans save settings in <some_directory> instead of the default ~/.netbeans/5.5dev. Regarding the daily build, can't you use a zipped archive instead of the installer?
Hm, for some reason there were no ZIP archives or I didn't see them. Anyway, downloaded the newest one now and the following steps reproduce the problem: ./netbeans -userdir /some/empty/directory Runtime tab / Databases / Drivers / New Driver / jConnect Runtime tab / Servers / Add Server / Sun Java System Application Server / Register Remote Domain / Enter connection data for Glassfish Server File / New Project / Enterprise / EJB Module Select EJB Module / New File/Folder / Persistence / Database Schema / Enter data for new Connection to DB ==> The window for selecting tables comes up, but no tables show in the list Select EJB Module / New Entity Classes from Database / Select Datasource on Appserver ==> same result, no tables to select Note: even if I made a mistake while trying to create a db schema, the datasource on the remote server is guaranteed to work correctly, because my enterprise application runs off it. I did develop my enterprise app with the table wizard, so the feature did work before.
Please attach the <userdir>/var/log/message.log file. Before that be sure to run NetBeans with -J-Dorg.netbeans.modules.db=0 -J-Dnetbeans.debug.exceptions=true on the command line. Can you remember which daily build it used to work correctly in? Did it work in 5.5 beta 2? Another thing: please create a Java Application (New Project - Generic), invoke the Entity Classes from DB wizard and select the database connection corresponding to your data source. Can you see any tables? Anyway, looks like a regression in dbschema. It would be nice if you could remember which daily build used to work, because there weren't that many changes and I could track down the one causing this. Thank you for help!
1. delete contents of userdir 2. ./netbeans -userdir /my/userdir/ -J-Dorg.netbeans.modules.db=0 -J-Dnetbeans.debug.exceptions=true 3. Install JDBC driver and AppServer 4. New J2EE Module 5. New Database Schema using IDE's db connection ==> window comes up empty 6. New Entity Classes from Database using Appserver's JDBC resource ==> window comes up empty 7. Exit IDE This is starting from a fresh daily build 0911, I'll attach the userdir/var/log/messages.log file.
Created attachment 33822 [details] messages.log
The same problem appears, when I use the wizards from a generic Java application. The version where it did work was pre 5.5 beta 2, but probably after 5.5 beta 1. I might remember if I had a list of versions and when they appeared.
The message log didn't help unfortunately. I expected some exceptions, but there aren't any. Here is a list of NetBeans 5.5 Q-builds. If you have time, it would be great if you could find the first one which doesn't work for you. If you don't have time to test them all please at least test q-build #3. Alternatively, if there's any chance you could provide a computer to which I could connect and reproduce the issue, it would be very helpful.
Ah sorry, I forgot the list: http://qa.netbeans.org/q-builds/index_55.html
It works with QBuild 2 (20060424), but not with 3 (20060615).
*** Issue 77950 has been marked as a duplicate of this issue. ***
Anything more you need?
No, I just didn't have time to look at this. Thank you for the info in desc14, I hope it will help to track down the cause.
Still not working in 5.5 release. Maybe this problem is related: when I go to the Runtime tab and open "Databases", then I can add connections to our database. If I expand a connection, three folders appear: "Tables", "Views", "Procedures". When I click on any of these three nodes, nothing happens - I was expecting to see all existing tables, views and procedures. I can create a table and then I see it, too - can expand it, view the columns etc. I can also delete it again. It's not a permissions problem, I tried it with many different users. All of them can see all the tables in other tools, just not in Netbeans.
Sorry, still no time to look at this. Thank you for the new info. It is interesting that you see the newly created table, but only that one. Are you connecting to the right schema? In the Connect dialog, after entering your user name and password click Advanced, then press the Get Schemas button and try if selecting a different schema in the Select schema combo box helps. Also please do the following: 1. Connect to the datbase. 2. Right click the connection node, invoke Enable Debug. 3. Create the table -- this will dump the CREATE TABLE statement to the Output window 4. Attach the statement to the issue.
I tried various users with different schemas. BTW, what is a schema in this context? When I click "Get Schemas" I get a list of all our users. Anyway, when I right-click the connection, there is no "enable debug" option. I have "disconnect", "execute command", "refresh" and "properties".
Sorry, that should have been the Databases node. Re. schemas: I'm not exactly familiar with Sybase, but I would try the schema named as the user who owns the tables, or dbo if the former doesn't help. If you can, also try the following: 1. Connect in the usual way (just enter the user name and password, don't use the Advanced tab). 2. Create a table. 3. Invoke View Data from the table's context menu. This should open an SQL editor containing: SELECT * from [something].[table_name] 4. Change table_name to a table of which you are sure it exists in the database. 5. Invoke Run SQL in the SQL editor's toolbar. Does the execution succeed? In the fortunate case it doesn't, try to find out what you should replace [something] with in order to make the statement execute (it should be the table owner). Then try if connecting to the "something" schema shows any tables.
That was the key, thank you very much. With your test I could find a schema, which will load all the tables. The issue can be closed.
Good to hear! I'm still curious why the difference between Q-Build 2 and 3. It would seem that in Q-Build 2 you didn't have to manually select the right schema, but not in Q-Build 3 and later releases you have to. Could you please try to connect in Q-Build 2 without manually selecting a schema and let me know what the schema chosen by NetBeans was, or actually if the schema was different from the one that you found in desc21? Ultimately would also like to know why other tools select the right schema, but NetBeans doesn't. Was the right schema named "dbo" or was it in any way related to the user name which you connected as? Thanks!
The right schema was dbo. The dbo-user himself is called "DBO_DATABASENAME" and there is a schema of the same name that I always used and that didn't work. Only by chance did I try dbo and it worked. The selected schema, if I didn't choose one manually, was always "default". Other tools didn't ask me for a schema, so I guess they were using the default one as well.
Closing per desc22.