druid执⾏SQL出现错误但不影响返回结果的解决⽅法在开发的过程中出现了以下的⼀个错误:
com.alibaba.druid.sql.parr.ParrException: syntax error, expect RPAREN, actual IDENTIFIER )as
at com.alibaba.druid.sql.parr.SQLExprParr.accept(SQLExprParr.java:1817)
at com.alibaba.druid.sql.hodRest(SQLExprParr.java:811)
at com.alibaba.druid.acle.hodRest(OracleExprParr.java:514)
at com.alibaba.druid.sql.parr.SQLExprParr.primaryRest(SQLExprParr.java:761)
at com.alibaba.druid.acle.parr.OracleExprParr.primaryRest(OracleExprParr.java:665)
表记
at com.alibaba.druid.sql.parr.SQLExprParr.parSelectItem(SQLExprParr.java:2124)
at com.alibaba.druid.sql.parr.SQLSelectParr.parSelectList(SQLSelectParr.java:374)
at com.alibaba.druid.acle.parr.OracleSelectParr.query(OracleSelectParr.java:267)
at com.alibaba.druid.acle.parr.OracleSelectParr.lect(OracleSelectParr.java:81)
at com.alibaba.druid.acle.parr.OracleSelectParr.parTableSource(OracleSelectParr.java:645)
at com.alibaba.druid.sql.parr.SQLSelectParr.parFrom(SQLSelectParr.java:393)
at com.alibaba.druid.acle.parr.OracleSelectParr.query(OracleSelectParr.java:272)
at com.alibaba.druid.acle.parr.OracleSelectParr.lect(OracleSelectParr.java:81)
at com.alibaba.druid.acle.parr.OracleSelectParr.parTableSource(OracleSelectParr.java:645)
at com.alibaba.druid.sql.parr.SQLSelectParr.parFrom(SQLSelectParr.java:393)
at com.alibaba.druid.acle.parr.OracleSelectParr.query(OracleSelectParr.java:272)
at com.alibaba.druid.acle.parr.OracleSelectParr.lect(OracleSelectParr.java:81)
at com.alibaba.druid.acle.parr.OracleStatementParr.parStatementList(OracleStatementParr.java:131)
at com.alibaba.druid.sql.parr.SQLStatementParr.parStatementList(SQLStatementParr.java:79)
at com.alibaba.druid.sql.parr.SQLStatementParr.parStatementList(SQLStatementParr.java:74)
at com.alibaba.druid.sql.visitor.ParameterizedOutputVisitorUtils.parameterize(ParameterizedOutputVisitorUtils.java:50)
at com.alibaba.druid.filter.Sql(StatFilter.java:145)
at com.alibaba.druid.filter.ateSqlStat(StatFilter.java:630)
at com.alibaba.druid.filter.stat.StatFilter.statementPrepareAfter(StatFilter.java:305)
at com.alibaba.druid.tion_prepareStatement(FilterEventAdapter.java:124)
at com.alibaba.druid.tion_prepareStatement(FilterChainImpl.java:448)
at com.alibaba.druid.tion_prepareStatement(FilterAdapter.java:928)
at com.alibaba.druid.tion_prepareStatement(FilterEventAdapter.java:122)
at com.alibaba.druid.tion_prepareStatement(FilterChainImpl.java:448)
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:342)
at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:331)
at org.utor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:72)
at org.utor.statement.BaStatementHandler.prepare(BaStatementHandler.java:82)
at org.utor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:54)
at org.utor.SimpleExecutor.prepareStatement(SimpleExecutor.java:70)
at org.utor.SimpleExecutor.doQuery(SimpleExecutor.java:56)
at org.utor.BaExecutor.queryFromDataba(BaExecutor.java:259)
at org.utor.BaExecutor.query(BaExecutor.java:132)
at org.utor.CachingExecutor.query(CachingExecutor.java:105)
at org.utor.CachingExecutor.query(CachingExecutor.java:81)
at org.apache.ibatis.ssion.defaults.DefaultSqlSession.lectList(DefaultSqlSession.java:104)玩具收纳
at org.apache.ibatis.ssion.defaults.DefaultSqlSession.lectList(DefaultSqlSession.java:98)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(Unknown Source)
flect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at flect.Method.invoke(Unknown Source)
batis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:354)
at com.sun.proxy.$Proxy31.lectList(Unknown Source)
batis.spring.SqlSessionTemplate.lectList(SqlSessionTemplate.java:194)
at org.apache.ibatis.uteForMany(MapperMethod.java:114)
at org.apache.ibatis.ute(MapperMethod.java:58)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)
at com.sun.proxy.$Proxy66.lectChangeApplicationByPage(Unknown Source)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(Unknown Source)
flect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at flect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at com.alibaba.druid.support.spring.stat.DruidStatInterceptor.invoke(DruidStatInterceptor.java:72)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
at com.sun.proxy.$Proxy183.lectChangeApplicationByPage(Unknown Source)
at cn.hr.rvice.impl.ChangeApplicationServiceImpl.queryChangeApplicationByPage(ChangeApplicationServiceImpl.java:356)
at cn.hr.rvice.impl.ChangeApplicationServiceImpl$$FastClassBySpringCGLIB$$3fc17c9.invoke(<generated>)
at lib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)好古诗
at cn.hr.interceptor.SystemLogAspect.writeLogInfo(SystemLogAspect.java:57)
flect.NativeMethodAccessorImpl.invoke0(Native Method)蓝田学园
flect.NativeMethodAccessorImpl.invoke(Unknown Source)
flect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at flect.Method.invoke(Unknown Source)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
关于矛盾的名言
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.alibaba.druid.support.spring.stat.DruidStatInterceptor.invoke(DruidStatInterceptor.java:72)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at ansaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at ansaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at ansaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExpoInvocationInterceptor.invoke(ExpoInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvidInterceptor.intercept(CglibAopProxy.java:655)
at cn.hr.rvice.impl.ChangeApplicationServiceImpl$$EnhancerBySpringCGLIB$$e579b5b4.queryChangeApplicationByPage(<generated>)
at ller.ChangeApplicationController.changeApplicationList(ChangeApplicationController.java:412)
at ller.ChangeApplicationController$$FastClassBySpringCGLIB$$eb63b36b.invoke(<generated>)
at lib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
at cn.hr.interceptor.SystemLogAspect.writeLogInfo(SystemLogAspect.java:57)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(Unknown Source)
flect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at flect.Method.invoke(Unknown Source)
电饭锅闷饭at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.alibaba.druid.support.spring.stat.DruidStatInterceptor.invoke(DruidStatInterceptor.java:72)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExpoInvocationInterceptor.invoke(ExpoInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvidInterceptor.intercept(CglibAopProxy.java:655)
at ller.ChangeApplicationController$$EnhancerBySpringCGLIB$$2277ba2e.changeApplicationList(<generated>)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(Unknown Source)
flect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at flect.Method.invoke(Unknown Source)
at org.hod.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222)
at org.hod.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
at org.springframework.web.hod.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
at org.springframework.web.hod.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814) at org.springframework.web.hod.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737)
at org.springframework.web.hod.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.rvlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.rvlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.rvlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
at org.springframework.web.rvlet.FrameworkServlet.doGet(FrameworkServlet.java:860)
at javax.rvlet.http.HttpServlet.rvice(HttpServlet.java:618)
at org.springframework.web.rvlet.FrameworkServlet.rvice(FrameworkServlet.java:845)
at javax.rvlet.http.HttpServlet.rvice(HttpServlet.java:725)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at at.websocket.rver.WsFilter.doFilter(WsFilter.java:52)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at cn.hr.filter.SecurityFilter.doFilter(SecurityFilter.java:56)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at cn.hr.pager.PagerFilter.doFilter(PagerFilter.java:28)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.shiro.web.uteChain(AbstractShiroFilter.java:449)
七年级语文古诗at org.apache.shiro.web.rvlet.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.ute(DelegatingSubject.java:383)
at org.apache.shiro.web.rvlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.rvlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBa.invoke(AuthenticatorBa.java:503)
at org.StandardHostValve.invoke(StandardHostValve.java:136)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at org.StandardEngineValve.invoke(StandardEngineValve.java:88)
清蒸螃蟹怎么做
at org.tor.CoyoteAdapter.rvice(CoyoteAdapter.java:526)
at http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
at http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
at at.util.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
at at.util.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
at urrent.ThreadPoolExecutor.runWorker(Unknown Source)
at urrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at at.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
syntax error, expect RPAREN, actual IDENTIFIER )as
这句错误意思是 语法错误,实际标识符不正确,紧接着后边出现了⼀个 中⽂括弧,由此推定有可能是sql上出现了中⽂括弧,在l⾥找到对应的SQL,果不其然就是因为中⽂括弧的原因,将中⽂括弧改成英⽂括弧后即不报错。
另外就是oracle⾥如果只出现⼀个中⽂括弧是可以编译过去的,但是drui⾥边对这⽅⾯⽐较严谨,所以给了这样的⼀个错误。