当前使用版本(必填,否则不予处理)

<dependency>
    <groupId>com.baomidou</groupId>
    <artifactId>mybatis-plus-boot-starter</artifactId>
    <version>3.4.3.4</version>
</dependency>

对应jsqlparser版本

<dependency>
      <groupId>com.github.jsqlparser</groupId>
      <artifactId>jsqlparser</artifactId>
      <version>4.4</version>
      <scope>compile</scope>
</dependency>

该问题是如何引起的?(确定最新版也有问题再提!!!)

oracle数据库执行自定义sql,数据权限插件解析SQL的时候报错 sql如下

    <select id="getDirResourceSize" resultType="com.jxj.data.center.module.data.controller.admin.datacenter.vo.DirResourceVO">
        select tt.root_dir dirId,
               count(distinct tt.resource_id) resourceCount,
               sum(tt.RESOURCE_SIZE)          resourceSize
        from (select
                  CONNECT_BY_ROOT(dir.ID) root_dir,
                  item.ID                  resource_id,
                  item.RESOURCE_SIZE
              from DATA_RESOURCE_DIRECTORY dir
                       left join DATA_RESOURCE_ITEM item on dir.ID = item.DIRECTORY_ID and item.DELETED = 0
              where dir.DELETED = 0
              start with dir.ID in
                  <foreach collection="dirIdList" item="id" open="(" separator="," close=")">
                      #{id}
                  </foreach>
              connect by prior dir.ID = dir.PARENT_ID
             ) tt
        group by tt.root_dir
    </select>

**涉及到oracle特殊语法 start with connect by ** 使用最新版本,问题依然存在

  <dependency>
      <groupId>com.baomidou</groupId>
      <artifactId>mybatis-plus-boot-starter</artifactId>
      <version>3.5.3.1</version>
  </dependency>

重现步骤(如果有就写完整)

oracle数据库自定义sql使用oracle特殊语法 start with connect by; 调用查询方法 报错 再次调用正常 从现象看,第一次会报错

报错信息

2023-06-16 10:05:33.043  INFO 42315 --- [http-nio-48086-exec-4] [1a5a82d6-d204-4c32-b5ba-f3cb1e27f922] c.j.d.c.f.a.c.filter.ApiAccessLogFilter  : receive request, uri: /admin-api/data/asset/dept-page, method:GET queryString:{pageNo=1, pageSize=10} requestBody:null
2023-06-16 10:05:33.128 DEBUG 42315 --- [http-nio-48086-exec-4] [1a5a82d6-d204-4c32-b5ba-f3cb1e27f922] c.j.d.c.m.s.d.m.u.A.selectById           : ==>  Preparing: SELECT id,username,password,uuid,nickname,remark,dept_id,post_ids,email,mobile,sex,avatar,status,login_ip,login_date,sso_user_id,room,tenant_id,create_time,update_time,creator,updater,deleted FROM system_users WHERE id=? AND deleted=0
2023-06-16 10:05:33.128 DEBUG 42315 --- [http-nio-48086-exec-4] [1a5a82d6-d204-4c32-b5ba-f3cb1e27f922] c.j.d.c.m.s.d.m.u.A.selectById           : ==> Parameters: 9219(Long)
2023-06-16 10:05:33.140 DEBUG 42315 --- [http-nio-48086-exec-4] [1a5a82d6-d204-4c32-b5ba-f3cb1e27f922] c.j.d.c.m.s.d.m.u.A.selectById           : <==      Total: 1
2023-06-16 10:05:33.152 DEBUG 42315 --- [http-nio-48086-exec-4] [1a5a82d6-d204-4c32-b5ba-f3cb1e27f922] c.j.d.c.m.s.d.m.u.A.selectById           : ==>  Preparing: SELECT id, username, password, uuid, nickname, remark, dept_id, post_ids, email, mobile, sex, avatar, status, login_ip, login_date, sso_user_id, room, tenant_id, create_time, update_time, creator, updater, deleted FROM system_users WHERE id = ? AND deleted = 0
2023-06-16 10:05:33.152 DEBUG 42315 --- [http-nio-48086-exec-4] [1a5a82d6-d204-4c32-b5ba-f3cb1e27f922] c.j.d.c.m.s.d.m.u.A.selectById           : ==> Parameters: 9219(Long)
2023-06-16 10:05:33.165 DEBUG 42315 --- [http-nio-48086-exec-4] [1a5a82d6-d204-4c32-b5ba-f3cb1e27f922] c.j.d.c.m.s.d.m.u.A.selectById           : <==      Total: 1
2023-06-16 10:05:33.337 ERROR 42315 --- [http-nio-48086-exec-4] [1a5a82d6-d204-4c32-b5ba-f3cb1e27f922] c.j.d.c.f.w.c.h.GlobalExceptionHandler   : [defaultExceptionHandler]

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: select tt.root_dir dirId,
               count(distinct tt.resource_id) resourceCount,
               sum(tt.RESOURCE_SIZE)          resourceSize
        from (select
                  CONNECT_BY_ROOT(dir.ID) root_dir,
                  item.ID                  resource_id,
                  item.RESOURCE_SIZE
              from DATA_RESOURCE_DIRECTORY dir
                       left join DATA_RESOURCE_ITEM item on dir.ID = item.DIRECTORY_ID and item.DELETED = 0
              where dir.DELETED = 0
              start with dir.ID in
                   (  
                      ?
                   , 
                      ?
                   , 
                      ?
                   ) 
              connect by prior dir.ID = dir.PARENT_ID
             ) tt
        group by tt.root_dir
### Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: select tt.root_dir dirId,
               count(distinct tt.resource_id) resourceCount,
               sum(tt.RESOURCE_SIZE)          resourceSize
        from (select
                  CONNECT_BY_ROOT(dir.ID) root_dir,
                  item.ID                  resource_id,
                  item.RESOURCE_SIZE
              from DATA_RESOURCE_DIRECTORY dir
                       left join DATA_RESOURCE_ITEM item on dir.ID = item.DIRECTORY_ID and item.DELETED = 0
              where dir.DELETED = 0
              start with dir.ID in
                   (  
                      ?
                   , 
                      ?
                   , 
                      ?
                   ) 
              connect by prior dir.ID = dir.PARENT_ID
             ) tt
        group by tt.root_dir
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:96)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
    at com.sun.proxy.$Proxy148.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224)
    at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForMany(MybatisMapperMethod.java:166)
    at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:77)
    at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
    at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
    at com.sun.proxy.$Proxy280.getDirResourceSize(Unknown Source)
    at com.jxj.data.center.module.data.service.resource.ResourceItemServiceImpl.getDirResourceSize(ResourceItemServiceImpl.java:308)
    at com.jxj.data.center.module.data.service.resource.ResourceItemServiceImpl$$FastClassBySpringCGLIB$$de573623.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
    at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:123)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
    at com.jxj.data.center.module.data.service.resource.ResourceItemServiceImpl$$EnhancerBySpringCGLIB$$4cd3c17d.getDirResourceSize(<generated>)
    at com.jxj.data.center.module.data.biz.impl.DataCenterResourceBizServiceImpl.getDirResourceSize(DataCenterResourceBizServiceImpl.java:304)
    at com.jxj.data.center.module.data.biz.impl.DataCenterResourceBizServiceImpl$$FastClassBySpringCGLIB$$42b81a4c.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)
    at com.jxj.data.center.module.data.biz.impl.DataCenterResourceBizServiceImpl$$EnhancerBySpringCGLIB$$d1dffed1.getDirResourceSize(<generated>)
    at com.jxj.data.center.module.data.service.asset.DataAssetServiceImpl.getAssetPageForPc(DataAssetServiceImpl.java:205)
    at com.jxj.data.center.module.data.service.asset.DataAssetServiceImpl$$FastClassBySpringCGLIB$$2c2c417c.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
    at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:123)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
    at com.jxj.data.center.module.data.service.asset.DataAssetServiceImpl$$EnhancerBySpringCGLIB$$75b67261.getAssetPageForPc(<generated>)
    at com.jxj.data.center.module.data.controller.admin.asset.DataAssetController.getAssetDeptPage(DataAssetController.java:154)
    at com.jxj.data.center.module.data.controller.admin.asset.DataAssetController$$FastClassBySpringCGLIB$$39c6c469.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
    at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:123)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
    at com.jxj.data.center.framework.operatelog.core.aop.OperateLogAspect.around0(OperateLogAspect.java:101)
    at com.jxj.data.center.framework.operatelog.core.aop.OperateLogAspect.around(OperateLogAspect.java:82)
    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:498)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
    at com.jxj.data.center.module.data.controller.admin.asset.DataAssetController$$EnhancerBySpringCGLIB$$3fbba548.getAssetDeptPage(<generated>)
    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:498)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
    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:655)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at de.codecentric.boot.admin.server.ui.web.servlet.HomepageForwardingFilter.doFilter(HomepageForwardingFilter.java:78)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:327)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:121)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at com.jxj.data.center.framework.security.core.filter.TokenAuthenticationFilter.doFilterInternal(TokenAuthenticationFilter.java:67)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:102)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at com.jxj.data.center.framework.apilog.core.filter.ApiAccessLogFilter.doFilterInternal(ApiAccessLogFilter.java:68)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:102)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:96)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at com.jxj.data.center.framework.tracer.core.filter.TraceFilter.doFilterInternal(TraceFilter.java:30)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:750)
Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: select tt.root_dir dirId,
               count(distinct tt.resource_id) resourceCount,
               sum(tt.RESOURCE_SIZE)          resourceSize
        from (select
                  CONNECT_BY_ROOT(dir.ID) root_dir,
                  item.ID                  resource_id,
                  item.RESOURCE_SIZE
              from DATA_RESOURCE_DIRECTORY dir
                       left join DATA_RESOURCE_ITEM item on dir.ID = item.DIRECTORY_ID and item.DELETED = 0
              where dir.DELETED = 0
              start with dir.ID in
                   (  
                      ?
                   , 
                      ?
                   , 
                      ?
                   ) 
              connect by prior dir.ID = dir.PARENT_ID
             ) tt
        group by tt.root_dir
### Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: select tt.root_dir dirId,
               count(distinct tt.resource_id) resourceCount,
               sum(tt.RESOURCE_SIZE)          resourceSize
        from (select
                  CONNECT_BY_ROOT(dir.ID) root_dir,
                  item.ID                  resource_id,
                  item.RESOURCE_SIZE
              from DATA_RESOURCE_DIRECTORY dir
                       left join DATA_RESOURCE_ITEM item on dir.ID = item.DIRECTORY_ID and item.DELETED = 0
              where dir.DELETED = 0
              start with dir.ID in
                   (  
                      ?
                   , 
                      ?
                   , 
                      ?
                   ) 
              connect by prior dir.ID = dir.PARENT_ID
             ) tt
        group by tt.root_dir
    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:153)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
    at sun.reflect.GeneratedMethodAccessor201.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
    ... 182 common frames omitted
Caused by: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Failed to process, Error SQL: select tt.root_dir dirId,
               count(distinct tt.resource_id) resourceCount,
               sum(tt.RESOURCE_SIZE)          resourceSize
        from (select
                  CONNECT_BY_ROOT(dir.ID) root_dir,
                  item.ID                  resource_id,
                  item.RESOURCE_SIZE
              from DATA_RESOURCE_DIRECTORY dir
                       left join DATA_RESOURCE_ITEM item on dir.ID = item.DIRECTORY_ID and item.DELETED = 0
              where dir.DELETED = 0
              start with dir.ID in
                   (  
                      ?
                   , 
                      ?
                   , 
                      ?
                   ) 
              connect by prior dir.ID = dir.PARENT_ID
             ) tt
        group by tt.root_dir
    at com.baomidou.mybatisplus.core.toolkit.ExceptionUtils.mpe(ExceptionUtils.java:39)
    at com.baomidou.mybatisplus.extension.parser.JsqlParserSupport.parserSingle(JsqlParserSupport.java:52)
    at com.jxj.data.center.framework.datapermission.core.db.DataPermissionDatabaseInterceptor.beforeQuery(DataPermissionDatabaseInterceptor.java:69)
    at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:78)
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
    at com.sun.proxy.$Proxy167.query(Unknown Source)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
    ... 188 common frames omitted
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "CONNECT_BY_ROOT" "CONNECT_BY_ROOT"
    at line 5, column 19.

Was expecting one of:

    "!"
    "("
    "*"
    "NOT"
    "STRAIGHT_JOIN"

    at net.sf.jsqlparser.parser.CCJSqlParser.generateParseException(CCJSqlParser.java:31468)
    at net.sf.jsqlparser.parser.CCJSqlParser.jj_consume_token(CCJSqlParser.java:31301)
    at net.sf.jsqlparser.parser.CCJSqlParser.AndExpression(CCJSqlParser.java:9756)
    at net.sf.jsqlparser.parser.CCJSqlParser.OrExpression(CCJSqlParser.java:9696)
    at net.sf.jsqlparser.parser.CCJSqlParser.XorExpression(CCJSqlParser.java:9678)
    at net.sf.jsqlparser.parser.CCJSqlParser.Expression(CCJSqlParser.java:9649)
    at net.sf.jsqlparser.parser.CCJSqlParser.SelectExpressionItem(CCJSqlParser.java:6317)
    at net.sf.jsqlparser.parser.CCJSqlParser.SelectItem(CCJSqlParser.java:6468)
    at net.sf.jsqlparser.parser.CCJSqlParser.SelectItemsList(CCJSqlParser.java:6298)
    at net.sf.jsqlparser.parser.CCJSqlParser.PlainSelect(CCJSqlParser.java:5638)
    at net.sf.jsqlparser.parser.CCJSqlParser.SetOperationList(CCJSqlParser.java:5867)
    at net.sf.jsqlparser.parser.CCJSqlParser.SelectBody(CCJSqlParser.java:5516)
    at net.sf.jsqlparser.parser.CCJSqlParser.SubSelect(CCJSqlParser.java:13976)
    at net.sf.jsqlparser.parser.CCJSqlParser.FromItem(CCJSqlParser.java:7976)
    at net.sf.jsqlparser.parser.CCJSqlParser.PlainSelect(CCJSqlParser.java:5651)
    at net.sf.jsqlparser.parser.CCJSqlParser.SetOperationList(CCJSqlParser.java:5867)
    at net.sf.jsqlparser.parser.CCJSqlParser.SelectBody(CCJSqlParser.java:5516)
    at net.sf.jsqlparser.parser.CCJSqlParser.Select(CCJSqlParser.java:5511)
    at net.sf.jsqlparser.parser.CCJSqlParser.SingleStatement(CCJSqlParser.java:232)
    at net.sf.jsqlparser.parser.CCJSqlParser.Statement(CCJSqlParser.java:153)
    at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatement(CCJSqlParserUtil.java:188)
    at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:63)
    at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:38)
    at com.baomidou.mybatisplus.extension.parser.JsqlParserSupport.parserSingle(JsqlParserSupport.java:49)
    ... 193 common frames omitted

2023-06-16 10:05:33.350  INFO 42315 --- [http-nio-48086-exec-4] [1a5a82d6-d204-4c32-b5ba-f3cb1e27f922] c.j.d.c.f.a.c.filter.ApiAccessLogFilter  : complete request, cost_time: 307, response: {"code":500,"data":null,"msg":"系统异常"}

Comment From: miemieYaho

jsqlparser解析不了,找我们没用