Closed woshi1472058179 closed 3 weeks ago
The issue involves other third-party dependencies, but our focus is solely on ShardingSphere itself. Since ShardingSphere implements the JDBC interface, standard applications should be functional. We wish to allocate more effort towards enhancing the current version, and therefore will no longer handle such issues. Please read the documentation or provide more effective information when submitting an issue.
version 5.2.0 database postgresql
org.springframework.jdbc.BadSqlGrammarException:
Error querying database. Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "FLW_TASK" not found (this database is empty); SQL statement:
SELECT id,instance_id,parent_task_id,task_name,task_key,task_type,perform_type,action_url,variable,assignor_id,assignor,expire_time,remind_time,remind_repeat,viewed,tenant_id,create_id,create_by,create_time FROM flw_task WHERE (expire_time <= ? OR remind_time <= ?) [42104-214]
The error may exist in com/aizuda/bpm/mybatisplus/mapper/FlwTaskMapper.java (best guess)
The error may involve com.aizuda.bpm.mybatisplus.mapper.FlwTaskMapper.selectList
The error occurred while executing a query
SQL: SELECT id,instance_id,parent_task_id,task_name,task_key,task_type,perform_type,action_url,variable,assignor_id,assignor,expire_time,remind_time,remind_repeat,viewed,tenant_id,create_id,create_by,create_time FROM flw_task WHERE (expire_time <= ? OR remind_time <= ?)
Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "FLW_TASK" not found (this database is empty); SQL statement:
SELECT id,instance_id,parent_task_id,task_name,task_key,task_type,perform_type,action_url,variable,assignor_id,assignor,expire_time,remind_time,remind_repeat,viewed,tenant_id,create_id,create_by,create_time FROM flw_task WHERE (expire_time <= ? OR remind_time <= ?) [42104-214] ; bad SQL grammar [] at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:101) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79) at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439) at jdk.proxy2/jdk.proxy2.$Proxy127.selectList(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224) at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForMany(MybatisMapperMethod.java:164) at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:77) at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:152) at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89) at jdk.proxy2/jdk.proxy2.$Proxy154.selectList(Unknown Source) at com.aizuda.bpm.mybatisplus.impl.FlwTaskDaoImpl.selectListTimeoutOrRemindTasks(FlwTaskDaoImpl.java:96) at com.aizuda.bpm.engine.impl.TaskServiceImpl.getTimeoutOrRemindTasks(TaskServiceImpl.java:792) at com.aizuda.bpm.engine.FlowLongScheduler.remind(FlowLongScheduler.java:59) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:96) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:317) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "FLW_TASK" not found (this database is empty); SQL statement: SELECT id,instance_id,parent_task_id,task_name,task_key,task_type,perform_type,action_url,variable,assignor_id,assignor,expire_time,remind_time,remind_repeat,viewed,tenant_id,create_id,create_by,create_time FROM flw_task WHERE (expire_time <= ? OR remind_time <= ?) [42104-214] at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) at org.h2.message.DbException.get(DbException.java:223) at org.h2.message.DbException.get(DbException.java:199) at org.h2.command.Parser.getTableOrViewNotFoundDbException(Parser.java:8385) at org.h2.command.Parser.getTableOrViewNotFoundDbException(Parser.java:8369) at org.h2.command.Parser.readTableOrView(Parser.java:8358) at org.h2.command.Parser.readTablePrimary(Parser.java:1863) at org.h2.command.Parser.readTableReference(Parser.java:2334) at org.h2.command.Parser.parseSelectFromPart(Parser.java:2772) at org.h2.command.Parser.parseSelect(Parser.java:2878) at org.h2.command.Parser.parseQueryPrimary(Parser.java:2762) at org.h2.command.Parser.parseQueryTerm(Parser.java:2633) at org.h2.command.Parser.parseQueryExpressionBody(Parser.java:2612) at org.h2.command.Parser.parseQueryExpressionBodyAndEndOfQuery(Parser.java:2605) at org.h2.command.Parser.parseQueryExpression(Parser.java:2598) at org.h2.command.Parser.parseQuery(Parser.java:2567) at org.h2.command.Parser.parsePrepared(Parser.java:724) at org.h2.command.Parser.parse(Parser.java:689) at org.h2.command.Parser.parse(Parser.java:661) at org.h2.command.Parser.prepareCommand(Parser.java:569) at org.h2.engine.SessionLocal.prepareLocal(SessionLocal.java:631) at org.h2.engine.SessionLocal.prepareCommand(SessionLocal.java:554) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116) at org.h2.jdbc.JdbcPreparedStatement.(JdbcPreparedStatement.java:92)
at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288)
at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:327)
at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:88)
at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:90)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:60)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:61)
at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
at jdk.proxy2/jdk.proxy2.$Proxy207.prepare(Unknown Source)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:90)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:64)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:336)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:158)
at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
at jdk.proxy2/jdk.proxy2.$Proxy204.query(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:154)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:142)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425)
... 19 common frames omitted
myconfig spring: shardingsphere: datasource: names: master,slave master: type: com.alibaba.druid.pool.DruidDataSource driverClassName: org.postgresql.Driver url: jdbc:postgresql://xxx:xxx/dev_flowlong?currentSchema=public username: xxx password: xxx slave: type: com.alibaba.druid.pool.DruidDataSource driverClassName: org.postgresql.Driver url: jdbc:postgresql://xxx:xxx/dev_flowlong?currentSchema=public username: xxx password: xxx rules: readwrite-splitting: data-sources: rr: static-strategy: write-data-source-name: master read-data-source-names: