javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement

Stack Overflow | Alesto | 5 months ago
  1. 0

    org.hsqldb.HsqlException: user lacks privilege or object not found: ACCOUNT

    Stack Overflow | 5 months ago | Alesto
    javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not prepare statement
  2. 0

    HyperSQL Database Engine (HSQLDB) / Bugs / #1407 incompatible data types in combination when using COALESCE in case of DATE type

    sourceforge.net | 1 year ago
    java.sql.SQLSyntaxErrorException: incompatible data types in combination Error Code: -5562 Call: SELECT ID, RELEASE_DOMAIN, RELEASE_DATE, RELEASE_VERSION, MOD_DATE, MOD_USER_ID, REC_DATE, REC_USER_ID, DESCRIPTION, NAME FROM LC_RELEASED_VERSION WHERE ((((RELEASE_DOMAIN = ?) AND (RELEASE_VERSION = COALESCE(?,RELEASE_VERSION ))) AND (NAME = COALESCE(?,NAME ))) AND (RELEASE_DATE = COALESCE(?,RELEASE_DATE ))) bind => Query: ReadAllQuery(name="ReleasedVersion.findByFilter" referenceClass=ReleasedVersion sql="SELECT ID, RELEASE_DOMAIN, RELEASE_DATE, RELEASE_VERSION, MOD_DATE, MOD_USER_ID, REC_DATE, REC_USER_ID, DESCRIPTION, NAME FROM LC_RELEASED_VERSION WHERE ((((RELEASE_DOMAIN = ?) AND (RELEASE_VERSION = COALESCE(?,RELEASE_VERSION ))) AND (NAME = COALESCE(?,NAME ))) AND (RELEASE_DATE = COALESCE(?,RELEASE_DATE )))")
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Object not found when executing query with table in a schema

    Stack Overflow | 6 months ago | aweigold
    javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: user lacks privilege or object not found: DIM_DATE in statement [select datedimens0_.dim_date_id as dim1_0_, datedimens0_.date as date0_, datedimens0_.hour as hour0_, datedimens0_.minute as minute0_ from analytics.dim_date datedimens0_ where datedimens0_.date=? and (? is null or datedimens0_.hour=?) and (? is null or datedimens0_.minute=?) limit ?]
  5. 0

    COALESCE data types with spring-jdbc and Oracle compatibility mode

    hsqldb | 2 years ago | uprradam
    org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [update table_name set val = COALESCE(?, val)]; nested exception is java.sql.SQLSyntaxErrorException: incompatible data types in combination

  1. marcbouvierdav 1 times, last 2 months ago
  2. kjhdofjosvs 2 times, last 7 days ago
  3. andyglick 2 times, last 3 weeks ago
  4. WoodenDoors 67 times, last 8 months ago
87 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. org.hsqldb.HsqlException

    user lacks privilege or object not found: ACCOUNT

    at org.hsqldb.error.Error.error()
  2. HyperSQL Database
    Error.error
    1. org.hsqldb.error.Error.error(Unknown Source)
    2. org.hsqldb.error.Error.error(Unknown Source)
    2 frames
  3. HSQLDB
    JDBCConnection.prepareStatement
    1. org.hsqldb.SchemaManager.getTable(Unknown Source)
    2. org.hsqldb.ParserDQL.readTableName(Unknown Source)
    3. org.hsqldb.ParserDQL.readTableOrSubquery(Unknown Source)
    4. org.hsqldb.ParserDQL.XreadTableReference(Unknown Source)
    5. org.hsqldb.ParserDQL.XreadFromClause(Unknown Source)
    6. org.hsqldb.ParserDQL.XreadTableExpression(Unknown Source)
    7. org.hsqldb.ParserDQL.XreadQuerySpecification(Unknown Source)
    8. org.hsqldb.ParserDQL.XreadSimpleTable(Unknown Source)
    9. org.hsqldb.ParserDQL.XreadQueryPrimary(Unknown Source)
    10. org.hsqldb.ParserDQL.XreadQueryTerm(Unknown Source)
    11. org.hsqldb.ParserDQL.XreadQueryExpressionBody(Unknown Source)
    12. org.hsqldb.ParserDQL.XreadQueryExpression(Unknown Source)
    13. org.hsqldb.ParserDQL.compileCursorSpecification(Unknown Source)
    14. org.hsqldb.ParserCommand.compilePart(Unknown Source)
    15. org.hsqldb.ParserCommand.compileStatement(Unknown Source)
    16. org.hsqldb.Session.compileStatement(Unknown Source)
    17. org.hsqldb.StatementManager.compile(Unknown Source)
    18. org.hsqldb.Session.execute(Unknown Source)
    19. org.hsqldb.jdbc.JDBCPreparedStatement.<init>(Unknown Source)
    20. org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
    20 frames
  4. Commons DBCP
    PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement
    1. org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281)
    2. org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313)
    2 frames
  5. Hibernate
    QueryImpl.list
    1. org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:162)
    2. org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186)
    3. org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:160)
    4. org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1884)
    5. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1861)
    6. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1838)
    7. org.hibernate.loader.Loader.doQuery(Loader.java:909)
    8. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354)
    9. org.hibernate.loader.Loader.doList(Loader.java:2553)
    10. org.hibernate.loader.Loader.doList(Loader.java:2539)
    11. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2369)
    12. org.hibernate.loader.Loader.list(Loader.java:2364)
    13. org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:496)
    14. org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387)
    15. org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:231)
    16. org.hibernate.internal.SessionImpl.list(SessionImpl.java:1264)
    17. org.hibernate.internal.QueryImpl.list(QueryImpl.java:103)
    17 frames
  6. org.hibernate.jpa
    QueryImpl.getResultList
    1. org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:573)
    2. org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:449)
    2 frames
  7. com.cb.yoki
    AccountDaoImpl.getAll
    1. com.cb.yoki.daoimpl.AccountDaoImpl.getAll(AccountDaoImpl.java:29)
    1 frame
  8. 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
  9. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    3 frames
  10. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    3 frames
  11. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    2 frames
  12. com.sun.proxy
    $Proxy60.getAll
    1. com.sun.proxy.$Proxy60.getAll(Unknown Source)
    1 frame
  13. com.cb.yoki
    AccountDaoTest.addAccountTest
    1. com.cb.yoki.dao.AccountDaoTest.addAccountTest(AccountDaoTest.java:37)
    1 frame
  14. 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
  15. JUnit
    RunBefores.evaluate
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    5 frames
  16. Spring TestContext
    SpringRepeat.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
    2. org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
    3. org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
    3 frames
  17. JUnit
    ParentRunner.runLeaf
    1. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    1 frame
  18. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:254)
    2. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)
    2 frames
  19. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    2. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    3. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    4. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    5. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    5 frames
  20. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
    2 frames
  21. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    1 frame
  22. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:193)
    1 frame
  23. JUnit
    JUnitCore.run
    1. org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    1 frame
  24. IntelliJ junit4 module
    JUnit4IdeaTestRunner.startRunnerWithArgs
    1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
    1 frame
  25. IDEA
    JUnitStarter.main
    1. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
    2. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
    2 frames
  26. 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
  27. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
    1 frame