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 224905 - New Entity Classes from Database doesn't see tables in Virtual Machine DB
Summary: New Entity Classes from Database doesn't see tables in Virtual Machine DB
Status: RESOLVED INCOMPLETE
Alias: None
Product: db
Classification: Unclassified
Component: DB schema (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-15 12:48 UTC by vbeffa
Modified: 2014-08-12 18:16 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vbeffa 2013-01-15 12:48:14 UTC
I have a VMWare machine running Ubuntu, on which I have a DB2 database installed. Using the NetBeans Services window, I can create a connection to this database, browse its schemas, view data in tables, run sql commands on it, etc. However, when I try to generate JPA entity classes using this database, the Available Tables list on the left appears empty (after I select the database connection from the drop-down at the top). When I select the connection, a dialog window pops up for an instant (the one that fetches the tables from the schema), but closes before I can see what it says.

Not sure if this can be readily reproduced, but it would be useful if it could be fixed somehow. I can provide more details if needed.
Comment 1 Jaroslav Havlin 2013-01-15 13:05:35 UTC
This issue might be related to bug 224355.
Reassigning to Java Persistence support. Please evaluate it, thanks.
Comment 2 Sergey Petrov 2013-01-15 13:39:17 UTC
Are you able to create db schema with persistence|DB schema?
Comment 3 vbeffa 2013-01-15 13:42:45 UTC
(In reply to comment #2)
> Are you able to create db schema with persistence|DB schema?

How do I access persistence|DB schema?
Comment 4 Sergey Petrov 2013-01-15 13:49:31 UTC
It's in new file wizard,
in Persistence category,
there is Database Schema item.
Comment 5 vbeffa 2013-01-15 14:09:17 UTC
(In reply to comment #4)
> It's in new file wizard,
> in Persistence category,
> there is Database Schema item.

No. When I get to Step 4 (Tables and Views), the Available Tables and Views box is empty.
Comment 6 Sergey Petrov 2013-01-15 14:12:56 UTC
ok, 
Jaroslav, 
looks like db|schema issue
Comment 7 Jaroslav Havlin 2013-01-16 08:23:45 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > It's in new file wizard,
> > in Persistence category,
> > there is Database Schema item.
> No. When I get to Step 4 (Tables and Views), the Available Tables and Views box
> is empty.
Please, could you reproduce it once more and attach your IDE Log? Thank you.
Comment 8 vbeffa 2013-01-16 10:58:26 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > It's in new file wizard,
> > > in Persistence category,
> > > there is Database Schema item.
> > No. When I get to Step 4 (Tables and Views), the Available Tables and Views box
> > is empty.
> Please, could you reproduce it once more and attach your IDE Log? Thank you.

Nothing is written to the log. Connecting to another DB2 database (a Linux VM, but not running on the same PC as NetBeans), I did get the following output:

[ibm][db2][jcc][t4][2030][11211] A communication error has been detected. Communication protocol being used: TCP/IP.
Communication API being used: SOCKETS.  Location where the error was detected: T4Agent.sendRequest().
Communication function detecting the error: OutputStream.flush().  Protocol specific error codes Connection reset by peer: socket write error, *, 0.  Message: Connection reset by peer: socket write error

This was due to a stale connection. However after reconnecting I tried to generate Entity Classes from Database (not for my local DB, but for the remote one), and got the following exception. Unfortunately I don't think it's related to my original problem, that of seeing no tables for the DB2 schema on my local Ubuntu VM. The remote DB is also DB2 and I am able to connect to it, see its tables, generate Entity Classes, and generate a Database Schema for it (i.e. I see tables in the New File dialog when I get to the step).

Exception occurred during event dispatching:
java.lang.ArrayIndexOutOfBoundsException: 0
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.DBSchemaTableProvider.buildTables(DBSchemaTableProvider.java:116)
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.DBSchemaTableProvider.<init>(DBSchemaTableProvider.java:95)
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.DatabaseTablesPanel.updateSourceSchema(DatabaseTablesPanel.java:571)
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.DatabaseTablesPanel.datasourceComboBoxActionPerformed(DatabaseTablesPanel.java:964)
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.DatabaseTablesPanel.access$1000(DatabaseTablesPanel.java:104)
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.DatabaseTablesPanel$5.actionPerformed(DatabaseTablesPanel.java:694)
        at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1240)
        at javax.swing.JComboBox.setSelectedItem(JComboBox.java:567)
        at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:603)
        at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:818)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
        at java.awt.Component.processMouseEvent(Component.java:6297)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
        at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:482)
        at java.awt.Component.processEvent(Component.java:6062)
        at java.awt.Container.processEvent(Container.java:2039)
        at java.awt.Component.dispatchEventImpl(Component.java:4660)
        at java.awt.Container.dispatchEventImpl(Container.java:2097)
        at java.awt.Component.dispatchEvent(Component.java:4488)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
        at java.awt.Container.dispatchEventImpl(Container.java:2083)
        at java.awt.Window.dispatchEventImpl(Window.java:2489)
        at java.awt.Component.dispatchEvent(Component.java:4488)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:668)
        at java.awt.EventQueue.access$400(EventQueue.java:81)
        at java.awt.EventQueue$2.run(EventQueue.java:627)
        at java.awt.EventQueue$2.run(EventQueue.java:625)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
        at java.awt.EventQueue$3.run(EventQueue.java:641)
        at java.awt.EventQueue$3.run(EventQueue.java:639)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:638)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
        at java.awt.Dialog$1.run(Dialog.java:1044)
        at java.awt.Dialog$3.run(Dialog.java:1096)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Dialog.show(Dialog.java:1094)
        at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:1074)
        at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1114)
        at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1096)
        at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:126)
        at org.openide.util.Mutex.doEventAccess(Mutex.java:1363)
        at org.openide.util.Mutex.readAccess(Mutex.java:273)
        at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1081)
        at java.awt.Component.show(Component.java:1591)
        at java.awt.Component.setVisible(Component.java:1543)
        at java.awt.Window.setVisible(Window.java:843)
        at java.awt.Dialog.setVisible(Dialog.java:984)
        at org.netbeans.core.windows.services.DialogDisplayerImpl$1AWTQuery.showDialog(DialogDisplayerImpl.java:260)
        at org.netbeans.core.windows.services.DialogDisplayerImpl$1AWTQuery.run(DialogDisplayerImpl.java:186)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:666)
        at java.awt.EventQueue.access$400(EventQueue.java:81)
        at java.awt.EventQueue$2.run(EventQueue.java:627)
        at java.awt.EventQueue$2.run(EventQueue.java:625)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:636)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Comment 9 Sergey Petrov 2013-01-16 12:05:19 UTC
last one exception may be persistence issue and may need to be filed separately, please provide db/jdbc driver version,schema(sql script to create tables) is possible and what tables was selected.

regarding initial one, persistence use schema functionality so if schema can't be build, persistence is blocked by this issue.
Comment 10 Jaroslav Havlin 2013-03-08 14:57:41 UTC
This problem can be related to bug 75595, which is already fixed.
Please, try connecting to your database with the latest development build of NetBeans.
Comment 11 matthias42 2014-08-12 18:16:58 UTC
No reaction after about a year - closing as INCOMPLETE