apache / shenyu

Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.
https://shenyu.apache.org/
Apache License 2.0
8.44k stars 2.93k forks source link

[BUG] JdbcSQLSyntaxErrorException in logs #2587

Closed tuohai666 closed 2 years ago

tuohai666 commented 2 years ago

Is there an existing issue for this?

Current Behavior

When press the Add button, there's JdbcSQLSyntaxErrorException in logs.

image

The full stack trace:

2021-12-14 18:23:46 [http-nio-0.0.0.0-9095-exec-1] INFO  org.springframework.web.servlet.DispatcherServlet - Completed initialization in 27 ms
2021-12-14 18:23:47 [http-nio-0.0.0.0-9095-exec-2] ERROR org.apache.shenyu.admin.exception.ExceptionHandlers -
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
### The error may exist in class path resource [mappers/shenyu-dict-sqlmap.xml]
### The error may involve org.apache.shenyu.admin.mapper.ShenyuDictMapper.findByTypeBatch
### The error occurred while executing a query
### SQL: select                   id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated               from shenyu_dict where `type` in
### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
; bad SQL grammar []; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
org.springframework.jdbc.BadSqlGrammarException:
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
### The error may exist in class path resource [mappers/shenyu-dict-sqlmap.xml]
### The error may involve org.apache.shenyu.admin.mapper.ShenyuDictMapper.findByTypeBatch
### The error occurred while executing a query
### SQL: select                   id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated               from shenyu_dict where `type` in
### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
; bad SQL grammar []; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:235)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
        at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447)
        at com.sun.proxy.$Proxy117.selectList(Unknown Source)
        at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:231)
        at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:128)
        at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:68)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
        at com.sun.proxy.$Proxy121.findByTypeBatch(Unknown Source)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl.buildPluginHandleVO(PluginHandleServiceImpl.java:129)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl.list(PluginHandleServiceImpl.java:109)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl$$FastClassBySpringCGLIB$$89cf2a62.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:769)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl$$EnhancerBySpringCGLIB$$c6fd7e65.list(<generated>)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl$$FastClassBySpringCGLIB$$89cf2a62.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:685)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl$$EnhancerBySpringCGLIB$$a7cbbc26.list(<generated>)
        at org.apache.shenyu.admin.controller.PluginHandleController.queryAllPluginHandlesByPluginId(PluginHandleController.java:79)
        at org.apache.shenyu.admin.controller.PluginHandleController$$FastClassBySpringCGLIB$$e7b6898c.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:769)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
        at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:120)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)
        at org.apache.shenyu.admin.controller.PluginHandleController$$EnhancerBySpringCGLIB$$b5d6db42.queryAllPluginHandlesByPluginId(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
        at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
        at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
        at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
        at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:450)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:108)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1591)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:453)
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
        at org.h2.message.DbException.getSyntaxError(DbException.java:243)
        at org.h2.command.Parser.getSyntaxError(Parser.java:1053)
        at org.h2.command.Parser.read(Parser.java:4995)
        at org.h2.command.Parser.readInPredicate(Parser.java:3258)
        at org.h2.command.Parser.readCondition(Parser.java:3191)
        at org.h2.command.Parser.readExpressionWithGlobalConditions(Parser.java:3046)
        at org.h2.command.Parser.parseSelect(Parser.java:2962)
        at org.h2.command.Parser.parseQuerySub(Parser.java:2817)
        at org.h2.command.Parser.parseSelectUnion(Parser.java:2649)
        at org.h2.command.Parser.parseQuery(Parser.java:2620)
        at org.h2.command.Parser.parsePrepared(Parser.java:868)
        at org.h2.command.Parser.parse(Parser.java:843)
        at org.h2.command.Parser.parse(Parser.java:819)
        at org.h2.command.Parser.prepareCommand(Parser.java:738)
        at org.h2.engine.Session.prepareLocal(Session.java:657)
        at org.h2.engine.Session.prepareCommand(Session.java:595)
        at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235)
        at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:76)
        at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:352)
        at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:316)
        at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java)
        at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:87)
        at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88)
        at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:59)
        at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:85)
        at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
        at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
        at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
        at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
        at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:143)
        at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
        at com.sun.proxy.$Proxy139.query(Unknown Source)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:434)
        ... 105 common frames omitted
2021-12-14 18:26:41 [http-nio-0.0.0.0-9095-exec-9] ERROR org.apache.shenyu.admin.exception.ExceptionHandlers -
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
### The error may exist in class path resource [mappers/shenyu-dict-sqlmap.xml]
### The error may involve org.apache.shenyu.admin.mapper.ShenyuDictMapper.findByTypeBatch
### The error occurred while executing a query
### SQL: select                   id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated               from shenyu_dict where `type` in
### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
; bad SQL grammar []; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
org.springframework.jdbc.BadSqlGrammarException:
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
### The error may exist in class path resource [mappers/shenyu-dict-sqlmap.xml]
### The error may involve org.apache.shenyu.admin.mapper.ShenyuDictMapper.findByTypeBatch
### The error occurred while executing a query
### SQL: select                   id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated               from shenyu_dict where `type` in
### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
; bad SQL grammar []; nested exception is org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:235)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
        at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447)
        at com.sun.proxy.$Proxy117.selectList(Unknown Source)
        at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:231)
        at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:128)
        at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:68)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
        at com.sun.proxy.$Proxy121.findByTypeBatch(Unknown Source)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl.buildPluginHandleVO(PluginHandleServiceImpl.java:129)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl.list(PluginHandleServiceImpl.java:109)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl$$FastClassBySpringCGLIB$$89cf2a62.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:769)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl$$EnhancerBySpringCGLIB$$c6fd7e65.list(<generated>)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl$$FastClassBySpringCGLIB$$89cf2a62.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:685)
        at org.apache.shenyu.admin.service.impl.PluginHandleServiceImpl$$EnhancerBySpringCGLIB$$a7cbbc26.list(<generated>)
        at org.apache.shenyu.admin.controller.PluginHandleController.queryAllPluginHandlesByPluginId(PluginHandleController.java:79)
        at org.apache.shenyu.admin.controller.PluginHandleController$$FastClassBySpringCGLIB$$e7b6898c.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:769)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
        at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:120)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)
        at org.apache.shenyu.admin.controller.PluginHandleController$$EnhancerBySpringCGLIB$$b5d6db42.queryAllPluginHandlesByPluginId(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
        at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
        at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
        at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
        at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:450)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:108)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1591)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "SELECT

        ID, `TYPE`, DICT_CODE, DICT_NAME, DICT_VALUE, `DESC`, SORT, ENABLED, DATE_CREATED, DATE_UPDATED

        FROM SHENYU_DICT WHERE `TYPE` IN[*]"; expected "("; SQL statement:
select

        id, `type`, dict_code, dict_name, dict_value, `desc`, sort, enabled, date_created, date_updated

        from shenyu_dict where `type` in [42001-200]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:453)
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
        at org.h2.message.DbException.getSyntaxError(DbException.java:243)
        at org.h2.command.Parser.getSyntaxError(Parser.java:1053)
        at org.h2.command.Parser.read(Parser.java:4995)
        at org.h2.command.Parser.readInPredicate(Parser.java:3258)
        at org.h2.command.Parser.readCondition(Parser.java:3191)
        at org.h2.command.Parser.readExpressionWithGlobalConditions(Parser.java:3046)
        at org.h2.command.Parser.parseSelect(Parser.java:2962)
        at org.h2.command.Parser.parseQuerySub(Parser.java:2817)
        at org.h2.command.Parser.parseSelectUnion(Parser.java:2649)
        at org.h2.command.Parser.parseQuery(Parser.java:2620)
        at org.h2.command.Parser.parsePrepared(Parser.java:868)
        at org.h2.command.Parser.parse(Parser.java:843)
        at org.h2.command.Parser.parse(Parser.java:819)
        at org.h2.command.Parser.prepareCommand(Parser.java:738)
        at org.h2.engine.Session.prepareLocal(Session.java:657)
        at org.h2.engine.Session.prepareCommand(Session.java:595)
        at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1235)
        at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:76)
        at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:352)
        at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:316)
        at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java)
        at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:87)
        at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88)
        at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:59)
        at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:85)
        at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
        at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
        at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
        at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
        at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:143)
        at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
        at com.sun.proxy.$Proxy139.query(Unknown Source)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
        at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:434)
        ... 105 common frames omitted

Expected Behavior

No prompts in the logs.

Steps To Reproduce

As above.

Environment

ShenYu version(s): 2.4.2-SNAPSHOT

Debug logs

No response

Anything else?

No response

zhouyadong commented 2 years ago

let me see