java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got BLOB

Hibernate JIRA | Martin Šimka | 9 months ago
  1. 0

    FooBarTest.testLimit FooBarTest.testPersistCollections ParameterTest.testNonPrimitiveArrayParameterBinding ParameterTest.testPrimitiveArrayParameterBinding PredicateTest.testByteArray ImplicitJoinTest.testImplicitJoinFromExplicitCollectionJoin These tests fail on Oracle12c with Oracle12cDialect because Hibernate tries to compare blob with {{blob1=blob2}} but Oracle requires function {{dbms_lob.compare}} f.ex. {code:sql} where dbms_lob.compare(data,:var2) = 0}} {code} Failing sql: {code:sql} create table ENT_W_MANY_COLS ( id number(19,0) not null, someBytes blob, someWrappedBytes blob, primary key (id) ) select multityped0_.id as id1_0_, multityped0_.someBytes as someBytes2_0_, multityped0_.someWrappedBytes as someWrappedBytes3_0_ from ENT_W_MANY_COLS multityped0_ where multityped0_.someBytes=? {code} fails with {noformat} java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got BLOB at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:53) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:774) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:4845) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1501) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70) at org.hibernate.loader.Loader.getResultSet(Loader.java:2116) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1899) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1875) at org.hibernate.loader.Loader.doQuery(Loader.java:919) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336) at org.hibernate.loader.Loader.doList(Loader.java:2611) at org.hibernate.loader.Loader.doList(Loader.java:2594) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2423) at org.hibernate.loader.Loader.list(Loader.java:2418) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371) at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1326) at org.hibernate.internal.QueryImpl.list(QueryImpl.java:87) at org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606) at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:483) at org.hibernate.jpa.criteria.compile.CriteriaQueryTypeQueryAdapter.getResultList(CriteriaQueryTypeQueryAdapter.java:50) at org.hibernate.jpa.test.criteria.ParameterTest.testPrimitiveArrayParameterBinding(ParameterTest.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) {noformat}

    Hibernate JIRA | 9 months ago | Martin Šimka
    java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got BLOB
  2. 0

    FooBarTest.testLimit FooBarTest.testPersistCollections ParameterTest.testNonPrimitiveArrayParameterBinding ParameterTest.testPrimitiveArrayParameterBinding PredicateTest.testByteArray ImplicitJoinTest.testImplicitJoinFromExplicitCollectionJoin These tests fail on Oracle12c with Oracle12cDialect because Hibernate tries to compare blob with {{blob1=blob2}} but Oracle requires function {{dbms_lob.compare}} f.ex. {code:sql} where dbms_lob.compare(data,:var2) = 0}} {code} Failing sql: {code:sql} create table ENT_W_MANY_COLS ( id number(19,0) not null, someBytes blob, someWrappedBytes blob, primary key (id) ) select multityped0_.id as id1_0_, multityped0_.someBytes as someBytes2_0_, multityped0_.someWrappedBytes as someWrappedBytes3_0_ from ENT_W_MANY_COLS multityped0_ where multityped0_.someBytes=? {code} fails with {noformat} java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got BLOB at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:53) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:774) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:4845) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1501) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70) at org.hibernate.loader.Loader.getResultSet(Loader.java:2116) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1899) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1875) at org.hibernate.loader.Loader.doQuery(Loader.java:919) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336) at org.hibernate.loader.Loader.doList(Loader.java:2611) at org.hibernate.loader.Loader.doList(Loader.java:2594) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2423) at org.hibernate.loader.Loader.list(Loader.java:2418) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371) at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1326) at org.hibernate.internal.QueryImpl.list(QueryImpl.java:87) at org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606) at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:483) at org.hibernate.jpa.criteria.compile.CriteriaQueryTypeQueryAdapter.getResultList(CriteriaQueryTypeQueryAdapter.java:50) at org.hibernate.jpa.test.criteria.ParameterTest.testPrimitiveArrayParameterBinding(ParameterTest.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) {noformat}

    Hibernate JIRA | 9 months ago | Martin Šimka
    java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got BLOB
  3. 0

    Sachin's Tech Place: ORA-00932: inconsistent datatypes: expected - got BLOB

    blogspot.com | 7 months ago
    java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got BLOB
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring Boot with Spring Data JPA gives invalid character issue for findOne(…) on Oracle database

    Stack Overflow | 2 years ago | Rohit
    org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
  6. 0

    ERROR: ORA-02289: sequence does not exist - org.hibernate.exception.SQLGrammarException: could not extract ResultSet

    Stack Overflow | 2 years ago | user2682305
    org.hibernate.exception.SQLGrammarException: could not extract ResultSet

  1. rafafviola 1 times, last 1 month ago
  2. wendellpereira 128 times, last 2 months ago
  3. balintn 4 times, last 2 months ago
  4. balintn 3 times, last 3 months ago
  5. pnaranja 2 times, last 4 months ago
1 more registered users
30 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLSyntaxErrorException

    ORA-00932: inconsistent datatypes: expected - got BLOB

    at oracle.jdbc.driver.T4CTTIoer.processError()
  2. Oracle jdbc
    OraclePreparedStatementWrapper.executeQuery
    1. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
    2. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
    3. oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
    4. oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
    5. oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
    6. oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
    7. oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:225)
    8. oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:53)
    9. oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:774)
    10. oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925)
    11. oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111)
    12. oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4798)
    13. oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:4845)
    14. oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1501)
    14 frames
  3. Hibernate
    QueryImpl.list
    1. org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70)
    2. org.hibernate.loader.Loader.getResultSet(Loader.java:2116)
    3. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1899)
    4. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1875)
    5. org.hibernate.loader.Loader.doQuery(Loader.java:919)
    6. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336)
    7. org.hibernate.loader.Loader.doList(Loader.java:2611)
    8. org.hibernate.loader.Loader.doList(Loader.java:2594)
    9. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2423)
    10. org.hibernate.loader.Loader.list(Loader.java:2418)
    11. org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501)
    12. org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)
    13. org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)
    14. org.hibernate.internal.SessionImpl.list(SessionImpl.java:1326)
    15. org.hibernate.internal.QueryImpl.list(QueryImpl.java:87)
    15 frames
  4. org.hibernate.jpa
    ParameterTest.testPrimitiveArrayParameterBinding
    1. org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606)
    2. org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:483)
    3. org.hibernate.jpa.criteria.compile.CriteriaQueryTypeQueryAdapter.getResultList(CriteriaQueryTypeQueryAdapter.java:50)
    4. org.hibernate.jpa.test.criteria.ParameterTest.testPrimitiveArrayParameterBinding(ParameterTest.java:43)
    4 frames
  5. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  6. JUnit
    FrameworkMethod.invokeExplosively
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    3 frames
  7. A Hibernate O/RM Module
    ExtendedFrameworkMethod.invokeExplosively
    1. org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45)
    1 frame
  8. JUnit
    FailOnTimeout$StatementThread.run
    1. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    2. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    3. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    4. org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
    4 frames