Failure with SQLFeatureNotSupportedException while invoking query to PostgreSQL with CLOB column

Solution Unverified - Updated -

Issue

When invoking insert query to PostgreSQL as source model with CLOB column, SQLFeatureNotSupportedException occurs with the following message and stacktrace.

WARN  [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue20) Connector worker process failed for atomic-request=6bEqd+C+8cga.0.0.3: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11013:TEIID11004 Error executing statement(s): [Prepared Values: ['org.teiid.core.types.ClobImpl@4498f71'] SQL: INSERT INTO xxx.test (NUM, CMNT) VALUES (1, ?)]
    at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:293) [translator-jdbc-8.12.11.6_4-redhat-64-12.jar:8.12.11.6_4-redhat-64-12]
    at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:84) [translator-jdbc-8.12.11.6_4-redhat-64-12.jar:8.12.11.6_4-redhat-64-12]
    at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:399)
    at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:361)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_131]
    at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
    at com.sun.proxy.$Proxy79.execute(Unknown Source)
    at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
    at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
    at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_131]
    at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
    at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284)
    at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
    at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_131]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_131]
    at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_131]
Caused by: java.sql.SQLFeatureNotSupportedException: Method org.postgresql.jdbc4.Jdbc4PreparedStatement.setCharacterStream(int, Reader, long) is not yet implemented.
    at org.postgresql.Driver.notImplemented(Driver.java:638)
    at org.postgresql.jdbc.PgPreparedStatement.setCharacterStream(PgPreparedStatement.java:1553)
    at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.setCharacterStream(WrappedPreparedStatement.java:1447)
    at org.teiid.translator.jdbc.JDBCExecutionFactory.bindValue(JDBCExecutionFactory.java:949) [translator-jdbc-8.12.11.6_4-redhat-64-12.jar:8.12.11.6_4-redhat-64-12]
    at org.teiid.translator.jdbc.JDBCBaseExecution.bind(JDBCBaseExecution.java:107) [translator-jdbc-8.12.11.6_4-redhat-64-12.jar:8.12.11.6_4-redhat-64-12]
    at org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:262) [translator-jdbc-8.12.11.6_4-redhat-64-12.jar:8.12.11.6_4-redhat-64-12]
    ... 20 more

Environment

  • Red Hat JBoss Data Virtualization (DV) 6.4.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In