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 227756 - java.sql.SQLException: Invalid Fetch Size
Summary: java.sql.SQLException: Invalid Fetch Size
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: NETFIX
Depends on:
Blocks:
 
Reported: 2013-03-21 08:03 UTC by imamasyari
Modified: 2013-03-25 09:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 194901


Attachments
stacktrace (818 bytes, text/plain)
2013-03-21 08:03 UTC, imamasyari
Details
proposed patch v1 (1.68 KB, patch)
2013-03-24 17:04 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description imamasyari 2013-03-21 08:03:53 UTC
Build: NetBeans IDE 7.3 (Build 201302132200)
VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows 7

User Comments:
GUEST: Performing a simple query that is pulling in no records.

select * from lawext.WS_SN_NOTIFY

GUEST: SQL Command

sql query to a Microsoft SQL DB using jdbc/odbc

GUEST: SQL Command




Stacktrace: 
java.sql.SQLException: Invalid Fetch Size
   at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(JdbcOdbcStatement.java:825)
   at org.netbeans.modules.db.dataview.output.SQLExecutionHelper.prepareSQLStatement(SQLExecutionHelper.java:671)
   at org.netbeans.modules.db.dataview.output.SQLExecutionHelper.access$300(SQLExecutionHelper.java:81)
   at org.netbeans.modules.db.dataview.output.SQLExecutionHelper$1Loader.run(SQLExecutionHelper.java:143)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
Comment 1 imamasyari 2013-03-21 08:03:57 UTC
Created attachment 132888 [details]
stacktrace
Comment 2 matthias42 2013-03-24 17:04:56 UTC
Created attachment 133000 [details]
proposed patch v1

The attached patch adds a guarded version of setFetchSize to SQLExecutionHelper.basicly it lowers the log level to INFO (which does not trigger the warning dialog) and also tries to reset to default (0).
Comment 3 Jaroslav Havlin 2013-03-25 09:47:28 UTC
Patch integrated as http://hg.netbeans.org/core-main/rev/2eafedf5babd
Thank you, Matthias.