org.springframework.dao.TransientDataAccessResourceException

PreparedStatementCallback; SQL [WITH RECURSIVE virtual_category_with_children(parent_id, category_id, name, query, order_index) AS (SELECT parent_virtual_category_id, id, name, query, order_index FROM virtual_category WHERE type='tree' AND id = ? UNION ALL SELECT vc.parent_virtual_category_id, vc.id, vc.name, vc.query, vc.order_index FROM virtual_category_with_children t, virtual_category vc WHERE vc.parent_virtual_category_id=t.category_id) SELECT * FROM virtual_category_with_children]; General error; nested exception is java.sql.SQLException: General error

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web408

  • Stack trace

    • org.springframework.dao.TransientDataAccessResourceException: PreparedStatementCallback; SQL [WITH RECURSIVE virtual_category_with_children(parent_id, category_id, name, query, order_index) AS (SELECT parent_virtual_category_id, id, name, query, order_index FROM virtual_category WHERE type='tree' AND id = ? UNION ALL SELECT vc.parent_virtual_category_id, vc.id, vc.name, vc.query, vc.order_index FROM virtual_category_with_children t, virtual_category vc WHERE vc.parent_virtual_category_id=t.category_id) SELECT * FROM virtual_category_with_children]; General error; nested exception is java.sql.SQLException: General error at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:108) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:645) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:680) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:712) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:727) at com.s24.api.entity.internal.jdbc.JdbcVirtualCategoryDao.getCategoryTree(JdbcVirtualCategoryDao.java:56) at com.s24.api.entity.internal.jdbc.JdbcVirtualCategoryDao.getCategoryTree(JdbcVirtualCategoryDao.java:45) at com.s24.api.entity.internal.jdbc.JdbcVirtualCategoryDaoTest.testGetCategoryTree(JdbcVirtualCategoryDaoTest.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) 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.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.mockito.internal.runners.JUnit45AndHigherRunnerImpl.run(JUnit45AndHigherRunnerImpl.java:37) at org.mockito.runners.MockitoJUnitRunner.run(MockitoJUnitRunner.java:62) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) Caused by: java.sql.SQLException: General error at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.JDBCPreparedStatement.executeQuery(Unknown Source) at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:688) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:629) ... 36 more Caused by: org.hsqldb.HsqlException: General error at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.QueryExpression.getResultRecursive(Unknown Source) at org.hsqldb.QueryExpression.getResult(Unknown Source) at org.hsqldb.TableDerived.materialise(Unknown Source) at org.hsqldb.StatementDMQL.materializeSubQueries(Unknown Source) at org.hsqldb.StatementDMQL.execute(Unknown Source) at org.hsqldb.Session.executeCompiledStatement(Unknown Source) at org.hsqldb.Session.execute(Unknown Source)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    WoodenDoorsWoodenDoors
    67 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitor2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    92 more bugmates