druid-sql报错,求大神帮忙看看,在线等!

问题描述

sql报错,求大神帮忙看看,在线等!

Caused by: java.sql.SQLException: sql injection violation, syntax error: TODO : LITERAL_INT top : select top 20 * from (select row_number() over ( order by name asc ) row_number, * from (select id,name,display_Name,type,instance_Url,state, content, version,create_Time,creator from wf_process where 1=1 and state = ? ) aa ) a where row_number > 0 order by row_number
at com.alibaba.druid.wall.WallFilter.check(WallFilter.java:711)
at com.alibaba.druid.wall.WallFilter.connection_prepareStatement(WallFilter.java:240)
at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:448)
at com.alibaba.druid.filter.FilterAdapter.connection_prepareStatement(FilterAdapter.java:928)
at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:122)
at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:448)
at com.alibaba.druid.filter.FilterAdapter.connection_prepareStatement(FilterAdapter.java:928)
at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:122)
at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:448)
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:342)
at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:318)
at org.springframework.jdbc.core.JdbcTemplate$SimplePreparedStatementCreator.createPreparedStatement(JdbcTemplate.java:1436)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:581)
... 126 more
Caused by: com.alibaba.druid.sql.parser.ParserException: TODO : LITERAL_INT top
at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseStatementList(OracleStatementParser.java:490)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:112)
at com.alibaba.druid.wall.WallProvider.checkInternal(WallProvider.java:619)
at com.alibaba.druid.wall.WallProvider.check(WallProvider.java:574)
at com.alibaba.druid.wall.WallFilter.check(WallFilter.java:699)
... 138 more

解决方案

ORACLE 没有 SELECT TOP 语句,要用行号作为条件进行过滤

    select *
      from (select row_number() over ( order by name asc ) row_number,
                   *
              from (select id,name,display_Name,type,instance_Url,state, content, version,create_Time,creator
                      from wf_process
                     where 1=1
                      and state = ?
                   ) aa
           ) a
     where row_number BETWEEN 1 AND 20
  order by row_number

解决方案二:

试一下,不用TOP就可以,

时间: 2024-09-27 06:47:13

druid-sql报错,求大神帮忙看看,在线等!的相关文章

java 执行 sql 文件报错 求大神帮忙解决 急急急!!!!

问题描述 java 执行 sql 文件报错 求大神帮忙解决 急急急!!!! sql文件里边的内容 /* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50096 Source Host : localhost:3306 Source Database : cemscenter1 Target Server Type : MYSQL Target Server Version :

树形 递归-java 递归报错 求大神帮忙

问题描述 java 递归报错 求大神帮忙 private List<Post> getPostLower(List<Post> PostTops){ List<Post> postAll=new ArrayList<Post>(); // 上级 for(Post post:PostTops){ //查询到下级 List<Post> posts=basService.queryPostByParentId(post.getPostId()); //

myeclipse-Myeclipse 运行web项目是报错 求大神帮忙看看

问题描述 Myeclipse 运行web项目是报错 求大神帮忙看看 2016-4-6 22:55:56 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:

代码-db2报错求大神解决,在线等到明天

问题描述 db2报错求大神解决,在线等到明天 严重: StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemInfoCache' defined in class path resource [config/core.xml]: Invocation of init method failed; nested e

EaseUI3.0集成报错 求大神帮忙看下

问题描述 解决方案 在报错的文件中导入头文件#import "EMClient.h"#import "EMClientDelegate.h"

集成环信SDK报错 求大神帮忙看一下

问题描述 解决方案 如果需要语音功能,将lib文件夹中libEaseMobClientSDKlite.a包删除,使用libEaseMobClientSDK.a,other linker flags使用-ObjC,不要加.a文件地址.解决方案二:other linker那里截图解决方案三:求帮忙看下为什么.......

openstack neutron安装报错 求大神帮忙

问题描述 Loadedplugins:fastestmirror,refresh-packagekit,securityLoadingmirrorspeedsfromcachedhostfileSettingupInstallProcessPackagepython-neutronclient-2.3.4-4.el6.noarchalreadyinstalledandlatestversionResolvingDependencies-->Runningtransactioncheck--->

虚拟机下构架hadoop测试跑wordcount报错,求大神帮帮忙.

问题描述 虚拟机下构架hadoop测试跑wordcount报错,求大神帮帮忙. 用虚拟机虚拟一台namenode,三台datanode,配置完成可以运行起来,也可以在网页中查看状态,但是跑wordcount时出现了task id:attempt_1441184180788_0001 status:failed的错误,也没有抛出,实在没有办法,具体问题截屏如下,望大神们给予帮助 解决方案 http://www.cnblogs.com/madyina/p/3708153.html 解决方案二: 几台

上传数据报错 求大神帮忙解决

问题描述 上传数据报错 求大神帮忙解决 解决方案 有可能是服务器出现了错误,你可以重新试试. 解决方案二: ajax方法在解析数据的时候报错了,有语法错误导致不能正确解析,看提示应该是多了个"<"或者少一个.