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 56193 - Table node expanding freezes
Summary: Table node expanding freezes
Status: RESOLVED WONTFIX
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Radko Najman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-10 18:01 UTC by Martin Schovanek
Modified: 2005-03-30 00:15 UTC (History)
0 users

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 Martin Schovanek 2005-03-10 18:01:23 UTC
[#200503061900, jdk1.4.2, Oracle 8.1.7]

to reproduce:
-------------
1) connect to xtest-db
2) expand 'Tables > UNITTESTCASE' table

ERROR:
- Please Wait node appers and blocks all DB actions.
- Cannot disconnect such session.

The connection hungs in the Oracle Driver, It can be caused by a problem in this
table or by error in the DB module. But there should be possibility to kill
session like this.
Comment 1 Petr Jiricka 2005-03-10 18:49:53 UTC
I don't understand the steps to reproduce. How do I connect to xtest-db? What is
the URL/driver/username/password?
Comment 2 Pavel Flaska 2005-03-23 14:20:51 UTC
If I understood it correctly, the database is extensively used by another
clients. Can we analyse other sessions for database? We need to investigate all
the locks in database. Seems to me, that another session locked a table and
never released the lock. Our thread is waiting, but as the table is forever
locked, it does not have any chance to finish its query.
(As a solution, we can try to timeout waiting thread, but IMO it is very
difficult to setup the timeout and there is impact to UI. I'm not sure, if we
can do this for 4.1.)

Bear in mind, that this is only my guess, we have to analyse it more precisely.
Comment 3 Pavel Flaska 2005-03-23 14:22:31 UTC
Q: Did you try to restart Oracle server?
Comment 4 Martin Schovanek 2005-03-23 14:53:58 UTC
You can connect to the DB using DBA Studio and expand table tree there, so it
does not look loked. A notes about DBA Studio on xtest-db you can find here:
http://beetle.czech/twiki/bin/view/Main/XTestDB

The server was restarted several times since I saw it first, but I did not try
it immediately after restart.
Comment 5 Pavel Flaska 2005-03-23 15:40:16 UTC
I remeber that you saw it works from DBA Studio. But I'm not sure that thin JDBC
driver works in the same way as a native client (i.e. DBA Studio, which uses
Oracle native protocol).

There is simple code which reproduces the problem. It is obvious that it hangs
in driver and never ends:

    public static void main(String[] args) {
        Connection c = null;
        try {
            Class.forName("oracle.jdbc.OracleDriver");
            c =
DriverManager.getConnection("jdbc:oracle:thin:@xtest-db.czech:1521:xtest",
"xtest", "xtest");
            c.getMetaData().getIndexInfo(null, "XTEST", "UNITTESTCASE", false,
true);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (c != null) c.close();
            } catch (Exception e) {
            }
        }
    }
Comment 6 Pavel Flaska 2005-03-24 09:39:56 UTC
The IDE is not frozen, as we both (Radko and me) tried. It has finished after
serveral hours. My guess that table is locked was wrong. This seems we aren't
able to fix this problem in db explorer. Seems like big problem with Oracle JDBC
driver (type 4). We should try it with Type 2, which should work correctly as
native client tools work correctly. (as Martin described.)
Comment 7 Radko Najman 2005-03-24 09:41:35 UTC
I spent some time investigating this issue. As it was told above, the
problematic method is getIndexInfo(). This method consumes plenty of time for
huge tables on Oracle database. In case of mentionened UNITTESTCASE table, which
contains nearly 9 million rows, it takes about 3 hours.
Originally I thought it was Oracle driver issue but I was able to reproduce it
using a driver by independent vendor too. So the problem is probably somewhere
between Java driver and Oracle database.
I don't see any reasonable way how to fix it. Once we call getIndexInfo() method
there is no way how to stop its execution. Maybe we could kill the thread in
which it is running if we don't get the result in acceptable time but the
problem is how to specify that time because it can depend on several circumstances.

Closing as WONTFIX.