For DB2 for the IBM i, schema loading does not always work as specified for tables, views, and procedures. It appears always to work as designated for at least aliases and sequences; I don't know about other SQL object types. It will always work as desired with “Specify Schema loading and caching”, if I select loading for all three types. Otherwise, it may or may not work as requested. See below.
I first discovered this running Squirrel 3.5 or likely earlier, last spring, with IBM i Client Access JDBC driver. I am currently running Squirrel 3.6, with JTOpen JDBC driver 8.3. The issue may relate to the fact that database and schema are often (or usually or always?) the same layer (related to the library name), and not separate as in SQL Server.
• If I specify “Load all Schemas, cache none”, then neither Tables nor Views can be seen, although Procedures and other objects do appear.
• If I “Specify Schema loading and caching”, then I can get a variety of results. If I specify “Load…” for at least one of Tables, Views, or Procedures, then I will see the items specified to be loaded. However, if some be specified not to be loaded, there can be a variety of results; I will still see objects not to be seen, if previously they were loaded and cached.
• If I specify “Load all and cache all Schemas”, whether or not may be seen Tables and Views in any given schema depends upon whether they previously had been selected individually to be loaded and cached. If not before loaded, or if loaded without caching, they will not be seen now.
So, the bottom line is that I can be guaranteed actually to see tables and views only if I specify individual Schema loading, and may see more than I intend.
So,
As far as I can see this is due to the following error:
java.sql.SQLException: [MCH1210] Empfängerwert zu klein, um Ergebnis zu halten.
It occurs when SQuirreL tries to read the connection's schemas.
Attached is a little Java program to reproduce the problem.
See attached Java program for reproduction.
My java skills don't permit me to run the program without more help in setting up stuff in Eclipse.
Squirrel does sometimes return the following error if the cache file has been cleared, when opening the alias, especially immediately after opening SQirreL, with "Load all..." specified. If I change it to load specifically chosen schemas, it loads an empty list the first time, and the second time shows the selected schemas:
Unexpected Error occurred attempting to open an SQL connection.
STACK TRACE:
java.lang.IllegalArgumentException: SessionConnectionKeepAlive: Argument sql cannot be null
at net.sourceforge.squirrel_sql.fw.util.Utilities.checkNull(Utilities.java:464)
at net.sourceforge.squirrel_sql.client.session.SessionConnectionKeepAlive.<init>(SessionConnectionKeepAlive.java:55)
at net.sourceforge.squirrel_sql.client.session.Session.startKeepAliveTaskIfNecessary(Session.java:249)
at net.sourceforge.squirrel_sql.client.session.Session.<init>(Session.java:239)
at net.sourceforge.squirrel_sql.client.session.SessionManager.createSession(SessionManager.java:134)
at net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.createSession(ConnectToAliasCommand.java:366)
at net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.afterExecuteFinished(ConnectToAliasCommand.java:331)
at net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.access$200(ConnectToAliasCommand.java:156)
at net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler$1.openConnectionFinished(ConnectToAliasCommand.java:282)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$3.run(OpenConnectionCommand.java:143)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
at net.sourceforge.squirrel_sql.client.Main$1.dispatchEvent(Main.java:99)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)</init></init>
Last edit: PlexPro 2014-10-24
On the
'java.lang.IllegalArgumentException: SessionConnectionKeepAlive: Argument sql cannot be null'
discussion entry:
This has just been fixed in our Git repository and will be available in future snapshots and versions.
To work around this problem please check your Alias properties --> tab 'Connection' and see if Keep-Alive is enabled but no SQL statement is entered. If so please either enter a statement or uncheck the Keep-Alive check box.
This problem is unlikely to have a connection to this bug's original point.