[This topic is migrated from our old forums. The original author name has been removed]
I made the changes of setting defaultFetchSize = 5000 and UseCursorFetch = true to work around the Connector/J caching issue. Upon attempting to connect, I get the following in the log:
------------------------- Product Information ------------------------
Product: DbVisualizer Pro 9.1.2
Build: #2072 (2013/10/28 18:25)
Java VM: Java HotSpot(TM) 64-Bit Server VM
Java Version: 1.7.0_45
Java Vendor: Oracle Corporation
OS Name: Linux
OS Arch: amd64
OS Version: 3.2.0-23-generic
------------------------- Connected Databases ------------------------
--------------------------- Debug Printouts --------------------------
08:56:52 [DEBUG AWT-EventQueue-0 DbVisualizerGUI.initialize] Init time: 5.018
08:56:53 [DEBUG AWT-EventQueue-0 T.Ą] AutoSaver started. Interval: 30 sec
registerDriver: com.mysql.jdbc.Driver@285e6143
08:57:04 [DEBUG ExecutorRunner-pool-1-thread-1 L.ā] Loading class using dynamic ClassLoader: com.mysql.jdbc.Driver
08:57:04 [DEBUG ExecutorRunner-pool-1-thread-1 L.ā] Loading class using dynamic ClassLoader: com.mysql.jdbc.Driver
08:57:04 [DEBUG ExecutorRunner-pool-1-thread-1 G.ĭ] Connecting: prod-new
08:57:04 [DEBUG ExecutorRunner-pool-1-thread-1 L.ā] Loading class using dynamic ClassLoader: com.mysql.jdbc.Driver
08:57:04 [DEBUG ExecutorRunner-pool-1-thread-1 L.ā] Loading class using dynamic ClassLoader: com.mysql.jdbc.Driver
08:57:04 [DEBUG pool-2-thread-1 D.ā] RootConnection: Driver.acceptsURL("jdbc:mysql://10.0.1.202:3306/GHSFeed")
08:57:04 [DEBUG pool-2-thread-1 D.ā] RootConnection: Driver.connect("jdbc:mysql://10.0.1.202:3306/GHSFeed", {autoReconnect=true, user=******, password=*********, interactiveClient=true, useCursorFetch=true, maxReconnects=10, defaultFetchSize=5000, initialTimeout=0})
SQLState(S1000) vendor code(0)
java.sql.SQLException: Operation not allowed after ResultSet closed
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)
at com.mysql.jdbc.ResultSetImpl.checkClosed(ResultSetImpl.java:804)
at com.mysql.jdbc.ResultSetImpl.realClose(ResultSetImpl.java:7331)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1522)
at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:4196)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3582)
at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2348)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2306)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:834)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.onseven.dbvis.g.B.D.ā(Z:1413)
at com.onseven.dbvis.g.B.F$A.call(Z:1474)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
SQLState(S1000) vendor code(0)
java.sql.SQLException: Operation not allowed after ResultSet closed
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:975)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:920)
at com.mysql.jdbc.ResultSetImpl.checkClosed(ResultSetImpl.java:804)
at com.mysql.jdbc.ResultSetImpl.realClose(ResultSetImpl.java:7331)
at com.mysql.jdbc.ResultSetImpl.close(ResultSetImpl.java:923)
at com.mysql.jdbc.StatementImpl.realClose(StatementImpl.java:2585)
at com.mysql.jdbc.StatementImpl.close(StatementImpl.java:577)
at com.mysql.jdbc.ConnectionImpl.loadServerVariables(ConnectionImpl.java:4228)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3582)
at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2348)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2306)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:834)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.onseven.dbvis.g.B.D.ā(Z:1413)
at com.onseven.dbvis.g.B.F$A.call(Z:1474)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
SQLState(S1000) vendor code(0)
08:57:05 [DEBUG pool-2-thread-1 C.ā] RootConnection: JDBC4Connection.setAutoCommit(true)
08:57:05 [DEBUG ExecutorRunner-pool-1-thread-1 G.Ć] Using facade: mysql for prod-new
08:57:05 [DEBUG ExecutorRunner-pool-1-thread-1 AbstractFacade.getColumn] executing "select database()"
08:57:05 [DEBUG pool-2-thread-1 C.ā] RootConnection: JDBC4Connection.createStatement()
08:57:05 [DEBUG pool-2-thread-1 B.ā] RootConnection: StatementImpl.executeQuery("select database()")
This is DbVis 9.1.2 Pro and Java 1.7_45 and the connector bundled with DbVis.
Re: Settings change for cache with mysql causes NPE
Andrew,
In the connection tab there is an option at the bottom for MySQL: 'Buffer All Rows for a Result Set'. Have to unchecked this and still have problem with the driver caching all of the result?
If the check box is disabled, goto the Driver Properties and clickl 'Defaults' and 'Revert Selected'. Apply the changes and now the check box will be enabled. Give it a try.
Modifying the driver properties should be done with care as it may give some unpredicted effects.
Regards
Roger
Roger Bjärevall
said
almost 11 years ago
[This reply is migrated from our old forums.]
Re: Settings change for cache with mysql causes NPE
Andrew,
Was the original problem you tried to solve related to memory issues or did you get the 'java.sql.SQLException: Operation not allowed after ResultSet closed' error even before modifying the driver properties?
Regards
Roger
anonymous