You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a file-based database that I sometimes connect to using the sqlline tool for diagnostic purposes. In that DB is a table containing CLOB typed columns:
0: jdbc:h2:/tmp/h2-db> !columns service
+-----------+-------------+------------+----------------------------------+-----------+------------------------+-------------+---------------+----------------+----------------+----------+---------+--+
| TABLE_CAT | TABLE_SCHEM | TABLE_NAME | COLUMN_NAME | DATA_TYPE | TYPE_NAME | COLUMN_SIZE | BUFFER_LENGTH | DECIMAL_DIGITS | NUM_PREC_RADIX | NULLABLE | REMARKS | |
+-----------+-------------+------------+----------------------------------+-----------+------------------------+-------------+---------------+----------------+----------------+----------+---------+--+
| H2-DB | PUBLIC | SERVICE | ID | 12 | CHARACTER VARYING | 36 | null | 0 | null | 0 | | |
| H2-DB | PUBLIC | SERVICE | NAME | 12 | CHARACTER VARYING | 63 | null | 0 | null | 0 | | |
...
| H2-DB | PUBLIC | SERVICE | ADDITIONAL_RESOURCES | 2005 | CHARACTER LARGE OBJECT | 2147483647 | null | 0 | null | 1 | | |
| H2-DB | PUBLIC | SERVICE | CONFIG_VALUES | 2005 | CHARACTER LARGE OBJECT | 2147483647 | null | 0 | null | 1 | | |
...
+-----------+-------------+------------+----------------------------------+-----------+------------------------+-------------+---------------+----------------+----------------+----------+---------+--+
When I try to select a result containing these columns, I get a ClassCastException:
0: jdbc:h2:/tmp/h2-db> select * from SERVICE;
java.lang.ClassCastException: class org.h2.value.lob.LobDataFetchOnDemand cannot be cast to class org.h2.value.lob.LobDataDatabase (org.h2.value.lob.LobDataFetchOnDemand and org.h2.value.lob.LobDataDatabase are in unnamed module of loader 'app')
at org.h2.value.ValueClob.getSQL(ValueClob.java:281)
at org.h2.util.HasSQL.getSQL(HasSQL.java:62)
at org.h2.util.HasSQL.getTraceSQL(HasSQL.java:50)
at org.h2.jdbc.JdbcLob.toString(JdbcLob.java:225)
at sqlline.Rows$Row.setFormat(Rows.java:313)
at sqlline.Rows$Row.<init>(Rows.java:282)
at sqlline.BufferedRows.nextList(BufferedRows.java:118)
at sqlline.BufferedRows.<init>(BufferedRows.java:54)
at sqlline.SqlLine.print(SqlLine.java:1770)
at sqlline.Commands.executeSingleQuery(Commands.java:1139)
at sqlline.Commands.execute(Commands.java:1079)
at sqlline.Commands.sql(Commands.java:1033)
at sqlline.SqlLine.dispatch(SqlLine.java:822)
at sqlline.SqlLine.begin(SqlLine.java:596)
at sqlline.SqlLine.start(SqlLine.java:269)
at sqlline.SqlLine.main(SqlLine.java:208)
H2 JDBC driver version is latest (2.1.214)
The text was updated successfully, but these errors were encountered:
I have a file-based database that I sometimes connect to using the sqlline tool for diagnostic purposes. In that DB is a table containing CLOB typed columns:
When I try to select a result containing these columns, I get a ClassCastException:
H2 JDBC driver version is latest (2.1.214)
The text was updated successfully, but these errors were encountered: