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.
Created attachment 141291 [details] In the LocalDB scheme is not selected by default, in Ecocad the selected schema stroytec_ecocad That no press, the scheme does not show. Created a connection to the specified database schema default was showing.
Could you please provide more information: 1. What DBMS are the databases LocalDB and Ecocad using (For Ecocad it looks like MySQL (-> the listed databases lead to that conclusion))? 2. Is there actually a database/tables/schemas in LocalDB? 3. Please provide the message log: http://wiki.netbeans.org/FaqLogMessagesFile Please ropen this issue if you can add that information.
I hope correctly translate your questions: 1. com.mysql.jdbc.Driver in both connections 2. Yes, these connections to the same server 3. In Attachments
Created attachment 141294 [details] Message.log
Created attachment 141295 [details] With property connections
Thank you! The screenshot of the connection properties was very helpful! I could reproduce it with an DB Url in the form: "jdbc:mysql://<host>:<port>" The problem arises, when the default catalog (a synonym for database) can't be determined. In the ecocad connection you specified the catalog to connect to, while the LocalDB connection missed a database to connect to. I didn't even try such an url, I always specified the mysql database as the default catalog, if I did not know which database I needed. This is also my suggested work around for now. I'm not sure when I can take a deeper look at this, but as a lead for the netbeans developers: I tracked it down into the Lookup.Provider implementation org.netbeans.api.db.explorer.node.NodeProvider. In the getNodes method lines (114-122) - if the NodeProvider is marked as proxying another node, the children of the current node are iterated and their child nodes are returned as the children of the current node. This was only implemented for nodes extending BaseNode. In the last iteration a new concept ("important catalog" and "important schema") was introduced, that uses nodes not extending BaseNode, but AbstractNode. I just gave this a quick test: --- Base (BASE) +++ Locally Modified (Based On LOCAL) @@ -118,8 +118,12 @@ for (Node n : list) { nodes.add(n); } + } else { + for(Node n: child.getChildren().getNodes()) { + nodes.add(n); } } + } return Collections.unmodifiableCollection(nodes); This showed all catalogs as expected.
I have a lot of different schemes on the same server under different projects, and I do not choose the database by default, so you do not accidentally execute sql on the wrong scheme. Thank you figured out, I hope this will be fixed in the 7.4.1 update in the near and not 7.5.
*** Bug 238022 has been marked as a duplicate of this bug. ***
Created attachment 142202 [details] Build of netbeans 7.4 sources for db explorer with proposed patch The attached jar is a drop-in replacement for the database explorer module in 7.4. You have to replace the module contained in 7.4 with the attached version. You can find it in the $netbeansHome/ide/modules directory. I checked the mysql part and it seems to work ok, I would like to ask you to check it also.
*** Bug 238848 has been marked as a duplicate of this bug. ***
i tried the patch jar and seems to solve the problems i was having.
Raising priority to P2: usability Prevents users from completing work without significant or inefficient legwork Users have to change their configuration (for example you'd need to find a schema that exists). If no other SQL editor is present the user needs to find the necessary statements to enumerate schemas/catalogs or needs to install a db specific tool. Apart from that its a regression to the behaviour in 7.3.
Patch applied: http://hg.netbeans.org/core-main/rev/ef094f654b27 Thank you very much Matthias.