Odd exception when connecting via the console

26 views
Skip to first unread message

Todd Stout

unread,
Sep 24, 2009, 1:21:52 PM9/24/09
to H2 Database
When connecting the H2 console to a local instance running as a tcp
server, I get the following odd exception instead of a list of tables
on the left pane. Here's my connection string:

jdbc:h2:tcp://127.0.0.1/~/dnservices


Column TYPE_NAME not found; SQL statement:
SELECT TABLE_CATALOG TABLE_CAT, TABLE_SCHEMA TABLE_SCHEM, TABLE_NAME,
TABLE_TYPE, REMARKS, TYPE_NAME TYPE_CAT, TYPE_NAME TYPE_SCHEM,
TYPE_NAME, TYPE_NAME SELF_REFERENCING_COL_NAME, TYPE_NAME
REF_GENERATION, SQL FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_CATALOG
LIKE ? ESCAPE '\' AND TABLE_SCHEMA LIKE ? ESCAPE '\' AND TABLE_NAME
LIKE ? ESCAPE '\' AND (TABLE_TYPE IN(?, ?, ?, ?, ?, ?)) ORDER BY
TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME [42122-118] 42S22/42122
org.h2.jdbc.JdbcSQLException: Column TYPE_NAME not found; SQL
statement:
SELECT TABLE_CATALOG TABLE_CAT, TABLE_SCHEMA TABLE_SCHEM, TABLE_NAME,
TABLE_TYPE, REMARKS, TYPE_NAME TYPE_CAT, TYPE_NAME TYPE_SCHEM,
TYPE_NAME, TYPE_NAME SELF_REFERENCING_COL_NAME, TYPE_NAME
REF_GENERATION, SQL FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_CATALOG
LIKE ? ESCAPE '\' AND TABLE_SCHEMA LIKE ? ESCAPE '\' AND TABLE_NAME
LIKE ? ESCAPE '\' AND (TABLE_TYPE IN(?, ?, ?, ?, ?, ?)) ORDER BY
TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME [42122-110]
at org.h2.message.Message.getSQLException(Message.java:107)
at org.h2.message.Message.getSQLException(Message.java:118)
at org.h2.message.Message.getSQLException(Message.java:77)
at org.h2.expression.ExpressionColumn.optimize
(ExpressionColumn.java:130)
at org.h2.expression.Alias.optimize(Alias.java:49)
at org.h2.command.dml.Select.prepare(Select.java:723)
at org.h2.command.Parser.prepareCommand(Parser.java:234)
at org.h2.engine.Session.prepareLocal(Session.java:409)
at org.h2.server.TcpServerThread.process(TcpServerThread.java:221)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:136)
at java.lang.Thread.run(Thread.java:839)
at java.lang.Thread.threadProc(Thread.java:2288)
at java.lang.Thread$1.Invoke(Thread.java:797)
at cli.System.Threading.ThreadHelper.ThreadStart_Context(Unknown
Source)
at cli.System.Threading.ExecutionContext.Run(Unknown Source)
at cli.System.Threading.ThreadHelper.ThreadStart(Unknown Source)

at org.h2.engine.SessionRemote.done(SessionRemote.java:520)
at org.h2.command.CommandRemote.prepare(CommandRemote.java:70)
at org.h2.command.CommandRemote.<init>(CommandRemote.java:48)
at org.h2.engine.SessionRemote.prepareCommand(SessionRemote.java:
416)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:
1049)
at org.h2.jdbc.JdbcPreparedStatement.<init>
(JdbcPreparedStatement.java:73)
at org.h2.jdbc.JdbcConnection.prepareAutoCloseStatement
(JdbcConnection.java:254)
at org.h2.jdbc.JdbcDatabaseMetaData.getTables
(JdbcDatabaseMetaData.java:145)
at org.h2.server.web.DbSchema.readTables(DbSchema.java:84)
at org.h2.server.web.DbContents.readContents(DbContents.java:131)
at org.h2.server.web.WebThread.tables(WebThread.java:856)
at org.h2.server.web.WebThread.process(WebThread.java:432)
at org.h2.server.web.WebThread.processRequest(WebThread.java:183)
at org.h2.server.web.WebThread.process(WebThread.java:236)
at org.h2.server.web.WebThread.run(WebThread.java:193)

Thomas Mueller

unread,
Sep 27, 2009, 9:37:05 AM9/27/09
to h2-da...@googlegroups.com
Hi,

It looks like you are using H2 Server version 1.1.110 and a H2 client
version 1.1.118. The problem seems to be that I added support for Java
6 JDBC DatabaseMetaData calls in version 1.1.117, and unfortunately I
added that in a way that is incompatible with 1.1.110 server.

The workaround is to use the same version of H2 for both client and server.

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages