[
https://issues.jboss.org/browse/TEIID-2056?page=com.atlassian.jira.plugin...
]
bunty lava commented on TEIID-2056:
-----------------------------------
I built and installed Teiid into jboss and tested the fix, it works. This has helped a lot
, Thank you
Class cast exception when inserting blob.
(java.lang.ClassCastException: org.teiid.core.types.BlobType cannot be cast to
oracle.sql.BLOB). When using JPA(Hibernate implementation) in association with Teiid.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: TEIID-2056
URL:
https://issues.jboss.org/browse/TEIID-2056
Project: Teiid
Issue Type: Bug
Components: JDBC Connector
Affects Versions: 7.0
Environment: JBOSS AS 5.1
Reporter: bunty lava
Assignee: Steven Hawkins
Labels: JPA, blob, hibernate, issues, teiid
Fix For: 7.7.1, 8.1
Using JPA which references teiid data source and vdb is defined with the translator as
oracle.
java.lang.ClassCastException: org.teiid.core.types.BlobType cannot be cast to
oracle.sql.BLOB
at
oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:8752)
at
oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8286)
at
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:8868)
at
oracle.jdbc.driver.OraclePreparedStatementWrapper.setObject(OraclePreparedStatementWrapper.java:240)
at
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setObject(WrappedPreparedStatement.java:703)
at
org.teiid.translator.jdbc.JDBCExecutionFactory.bindValue(JDBCExecutionFactory.java:853)
at
org.teiid.translator.jdbc.oracle.OracleExecutionFactory.bindValue(OracleExecutionFactory.java:436)
at
org.teiid.translator.jdbc.JDBCBaseExecution.bindPreparedStatementValues(JDBCBaseExecution.java:91)
at
org.teiid.translator.jdbc.JDBCUpdateExecution.executePreparedBatch(JDBCUpdateExecution.java:238)
at
org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:223)
at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:74)
at
org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:252)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:272)
at
org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:344)
at
org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:222)
at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:271)
at
org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:279)
at
org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:176)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:139)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:105)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:147)
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:374)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:287)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:215)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:232)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:118)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:288)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
19:37:06,302 WARN [CONNECTOR] Connector worker process failed for
atomic-request=NGLw6aBKqfxV.39.0.159
[JDBCExecutionException] 0: Error Code:0 Message:'Error; - nested throwable:
(java.lang.ClassCastException: org.teiid.core.types.BlobType cannot be cast to
oracle.sql.BLOB)' error executing statement(s): [Prepared Values: [1223454343,
3213232333, {ts '2012-05-21 19:37:03.333'}, NULL,
'org.teiid.core.types.BlobImpl@22acff']
1 [NestedSQLException]Error; - nested throwable: (java.lang.ClassCastException:
org.teiid.core.types.BlobType cannot be cast to oracle.sql.BLOB)
2 [ClassCastException]org.teiid.core.types.BlobType cannot be cast to oracle.sql.BLOB
at
org.teiid.translator.jdbc.JDBCUpdateExecution.executeTranslatedCommand(JDBCUpdateExecution.java:228)
at org.teiid.translator.jdbc.JDBCUpdateExecution.execute(JDBCUpdateExecution.java:74)
at
org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:252)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:272)
at
org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:344)
at
org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:222)
at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:271)
at
org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:279)
at
org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:176)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:139)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:105)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:147)
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:374)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:287)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:215)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:232)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:118)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:288)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira