Tom Arnold created TEIID-3785:
---------------------------------
Summary: PostgreSQL - Large Objects may not be used in auto-commit mode.
Key: TEIID-3785
URL:
https://issues.jboss.org/browse/TEIID-3785
Project: Teiid
Issue Type: Bug
Components: JDBC Connector
Affects Versions: 8.11.3
Reporter: Tom Arnold
Assignee: Steven Hawkins
Using Teiid 8.11.3 with PostgreSQL 9.1 and PostGIS. Doing a simple query with a spatial
filter causes this stacktrace in the log and 0 results to be returned.
{code}
select item_id from items where st_interesects(footprint, st_geomfromtext('point(0
0)',4326));
{code}
{code}
16:42:10,222 WARN [org.teiid.CONNECTOR] (Worker19_QueryProcessorQueue487) 8I60feXXYm5f
Connector worker process failed for atomic-request=8I60feXXYm5f.166.0.82:
org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing
statement(s): [Prepared Values: ['javax.sql.rowset.serial.SerialBlob@4fe24349']
SQL: SELECT g_0."item_id" AS c_0 FROM "foo"."items" AS g_0
WHERE st_intersects(g_0."footprint", st_geomfromwkb(?, 4326)) = TRUE LIMIT
3001]
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
[translator-jdbc-8.11.3.jar:8.11.3]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:341)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source) [:1.7.0_85]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_85]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_85]
at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
at com.sun.proxy.$Proxy87.execute(Unknown Source)
at
org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298)
at
org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110)
at
org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107)
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_85]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
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:1145)
[rt.jar:1.7.0_85]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_85]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_85]
Caused by: org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit
mode.
at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:301)
at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:288)
at org.postgresql.jdbc2.AbstractJdbc2Statement.setBlob(AbstractJdbc2Statement.java:3051)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1832)
at
org.postgresql.jdbc3.AbstractJdbc3Statement.setObject(AbstractJdbc3Statement.java:1481)
at
org.postgresql.jdbc3g.AbstractJdbc3gStatement.setObject(AbstractJdbc3gStatement.java:46)
at org.postgresql.jdbc4.AbstractJdbc4Statement.setObject(AbstractJdbc4Statement.java:70)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1864)
at
org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.setObject(WrappedPreparedStatement.java:957)
at
org.teiid.translator.jdbc.JDBCExecutionFactory.bindValue(JDBCExecutionFactory.java:936)
[translator-jdbc-8.11.3.jar:8.11.3]
at org.teiid.translator.jdbc.JDBCBaseExecution.bind(JDBCBaseExecution.java:107)
[translator-jdbc-8.11.3.jar:8.11.3]
at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:122)
[translator-jdbc-8.11.3.jar:8.11.3]
... 17 more
{code}
It looks like the issue is binding the WKB blob. Overriding the PostgreSQL translator and
setting {{useStreamsForLobs()}} to {{true}} seems to fix the issue.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)