After having done wizard step "Setting of connection information" testing the connection succeeds. When pressing "Next" button the following exception shows up:
COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC-Treiber] CLI0611E Ungültiger Spaltenname. SQLSTATE=S0022
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.rsException(SQLExceptionGenerator.java:659)
at COM.ibm.db2.jdbc.app.DB2ResultSet.findColumn(DB2ResultSet.java:2839)
at COM.ibm.db2.jdbc.app.DB2ResultSet.getString(DB2ResultSet.java:2246)
at zigen.plugin.db.core.SchemaSearcher.execute(SchemaSearcher.java:60)
at zigen.plugin.db.ui.contentassist.ContentInfo.getSchemas(ContentInfo.java:118)
at zigen.plugin.db.ui.contentassist.ContentInfo.configure(ContentInfo.java:60)
at zigen.plugin.db.ui.contentassist.ContentInfo.<init>(ContentInfo.java:48)
at zigen.plugin.db.ui.contentassist.processor.SelectProcessor.createProposals(SelectProcessor.java:33)
at zigen.plugin.db.ui.contentassist.SQLContentAssistantProcessor2.computeCompletionProposals(SQLContentAssistantProcessor2.java:283)
at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1836)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:553)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:550)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:485)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:479)
at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:377)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
my environment:
eclipse.buildId=M20080911-1700
java.version=1.5.0_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments: -os win32 -ws win32 -arch x86 -clean
Executing SQL works fine. But the proposed DB Tree (e.g. http://www.ne.jp/asahi/zigen/home/plugin/dbviewer/images/eclipse3.4.gif) of my Database definition does not appear within the DB Tree View. Thus no schema and no table to be seen.
mea culpa. Just forget about the few german words.
The important thing are these international DB2 error codes: CLI0611E and SQLSTATE=S0022.
Here comes the english description of them:
~~~~~~~~~~~~~~~~~~snip
CLI0611E
Invalid column name.
Explanation:
The given column name cannot be found in the ResultSet.
User Response:
Ensure the column name is correct.
~~~~~~~~~~~~~~~~~~snip
So, the question is:
What is the default column used in the sql select statement when pressing "Next" button?
My guess, something similar to this "SELECT ${columnName} FROM ..." (unresolved variable) instead of "SELECT * FROM ...".
reading the list of schemas ("columns") is doing fine this way:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~snip
while (rs.next())
{
schemaName = rs.getString(1);
System.out.println("-> '" + schemaName+"'");
if (schemaName.equalsIgnoreCase("fooBar")) {
System.out.println("!!GOTCHA");
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~snip
but
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~snip
rs.getString("TABLE_SCHEM");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~snip
does not work because of buggy jdk 1.5.
do you plan a bugfix with above mentioned workaround ?
error CLI0611E and SQLSTATE=S0022 shows up when pressing "Test Connection" now :-(
Pressing "Next" in the wizard is fine: I can choose one ore more schemata :-))
Though, selected schemata are not displayed in DB Tree Viewer yet :-(
do not shoot the messenger ;-)
but supportsSchemasInTableDefinitions() returns true.
application dbvisualizer is able to display the entire schema node collection using the fully equal driver (see attached screenshot). so we can finally exclude the driver as the cause of trouble.
i tried a couple of jdk running eclipse: sun1.5, ibm 1.5, sun1.6. the behaviour remains the same :-(
COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC-Treiber] CLI0611E Ungültiger Spaltenname. SQLSTATE=S0022
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.rsException(SQLExceptionGenerator.java:659)
at COM.ibm.db2.jdbc.app.DB2ResultSet.findColumn(DB2ResultSet.java:2839)
at COM.ibm.db2.jdbc.app.DB2ResultSet.getString(DB2ResultSet.java:2246)
at zigen.plugin.db.core.SchemaSearcher.execute(SchemaSearcher.java:60)
at zigen.plugin.db.ui.contentassist.ContentInfo.getSchemas(ContentInfo.java:118)
at zigen.plugin.db.ui.contentassist.ContentInfo.configure(ContentInfo.java:60)
at zigen.plugin.db.ui.contentassist.ContentInfo.<init>(ContentInfo.java:48)
at zigen.plugin.db.ui.contentassist.processor.SelectProcessor.createProposals(SelectProcessor.java:33)
at zigen.plugin.db.ui.contentassist.SQLContentAssistantProcessor2.computeCompletionProposals(SQLContentAssistantProcessor2.java:283)
at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1836)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:553)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:550)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:485)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:479)
at org.eclipse.jface.text.contentassist.ContentAssistant$2.run(ContentAssistant.java:377)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
my environment:
eclipse.buildId=M20080911-1700
java.version=1.5.0_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Command-line arguments: -os win32 -ws win32 -arch x86 -clean
Executing SQL works fine. But the proposed DB Tree (e.g. http://www.ne.jp/asahi/zigen/home/plugin/dbviewer/images/eclipse3.4.gif) of my Database definition does not appear within the DB Tree View. Thus no schema and no table to be seen.