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 239611 - OutOfMemory-Error when connection to big Oracle DB tables
Summary: OutOfMemory-Error when connection to big Oracle DB tables
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords: PATCH_AVAILABLE
: 240155 242980 246604 249579 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-12-18 12:41 UTC by Teccc
Modified: 2015-02-06 20:22 UTC (History)
4 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 Teccc 2013-12-18 12:41:06 UTC
We have problems using Netbeans-IDE 7.4 to 'select *' from Oracle DB tables.

Everything works fine selecting from small and medium sized DB-tables ( tested up to 500 000 rows), but when we connect to bigger db-tables ( 1 500 000 rows ) the 'select *' never finishes and the memory usage increases steadily until an OutOfMemoryError occures.

Things we noticed:

- we have no problems connecting and selecting from the Oracle DB using Netbeans 7.3

- the problem seems to exist only with Oracle DB's. For example we have no problems selecting 1 600 000 rows from a Pervasive SQL DB)
Comment 1 matthias42 2013-12-18 18:13:29 UTC
Please open the connections properties and uncheck the option "Use scrollable cursors".

Make sure you disconnect and connect again.

This should restore the behaviour of netbeans 7.3. 

Till I read this bug report I was under the assumption, that oracle would offer more features, but according to this:

http://docs.oracle.com/cd/E11882_01/java.112/e16548/resltset.htm#JJDBC28612

Oracle does not support scrollable cursors - and the emulation in the jdbc driver nukes your memory....
Comment 2 Teccc 2013-12-19 12:21:10 UTC
Thanks! That solved my problem.
Comment 3 matthias42 2014-01-18 13:44:58 UTC
*** Bug 240155 has been marked as a duplicate of this bug. ***
Comment 4 Jaroslav Havlin 2014-03-21 13:24:07 UTC
*** Bug 242980 has been marked as a duplicate of this bug. ***
Comment 5 matthias42 2014-10-06 22:03:05 UTC
Disable scrollable cursors per default on oracle:

# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -1377,7 +1377,6 @@
         return drv != null
                 && (drv.startsWith("org.apache.derby") //NOI18N
                 || drv.startsWith("com.mysql") //NOI18N
-                || drv.startsWith("oracle") //NOI18N
                 || drv.startsWith("org.postgresql")); //NOI18N
     }
Comment 6 matthias42 2014-10-06 22:03:47 UTC
Ah - to fast: The relevant file is "DatabaseConnection.java" in db module.
Comment 7 matthias42 2014-12-31 10:40:08 UTC
*** Bug 249579 has been marked as a duplicate of this bug. ***
Comment 8 matthias42 2015-01-30 20:35:29 UTC
I committed the patch, that removes oracle from the list of drivers that enable scrollable cursors by default. This has only impact on newly created connections though.

http://hg.netbeans.org/core-main/rev/0b75c5854b99

In the next few days a nightly build will be available (a message will attached to this bug when that happens), that contains this fix. Please take a look at that and verify, that newly created connections for oracle databases are created without "scrollable cursors". Thank you!
Comment 9 Quality Engineering 2015-02-01 04:05:01 UTC
Integrated into 'main-silver', will be available in build *201502010002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0b75c5854b99
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #239611: Don't enable scrollable cursors on oracle by default (scroll support is emulated client side and tends to blow the heap)
Comment 10 matthias42 2015-02-06 20:22:40 UTC
*** Bug 246604 has been marked as a duplicate of this bug. ***