java 枚举 sql,Oracle枚举类型不完善,导致基本SQL执行报错!!!

com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleIntervalType 类中枚举类型不完善,导致基础SQL执行直接报错,具体执行SQL如下:

SELECT to_char(sysdate-interval '1' hour,'hh24:mi:ss') as num FROM DUAL;

报错信息如下:

Caused by: java.sql.SQLException: sql injection violation, syntax error: No enum constant com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleIntervalType.hour : SELECT to_char(sysdate-interval '1' hour,'hh24:mi:ss') as num FROM DUAL

at com.alibaba.druid.wall.WallFilter.check(WallFilter.java:724)

at com.alibaba.druid.wall.WallFilter.statement_executeQuery(WallFilter.java:509)

at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2360)

at com.alibaba.druid.filter.FilterAdapter.statement_executeQuery(FilterAdapter.java:2481)

at com.alibaba.druid.filter.FilterEventAdapter.statement_executeQuery(FilterEventAdapter.java:302)

at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2360)

at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.executeQuery(StatementProxyImpl.java:211)

at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:138)

at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:458)

at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:408)

... 71 common frames omitted

Caused by: java.lang.IllegalArgumentException: No enum constant com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleIntervalType.hour

at java.lang.Enum.valueOf(Enum.java:238)

at com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleIntervalType.valueOf(OracleIntervalType.java:18)

at com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser.parseInterval(OracleExprParser.java:934)

at com.alibaba.druid.sql.parser.SQLExprParser.primary(SQLExprParser.java:572)

at com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser.primary(OracleExprParser.java:484)

at com.alibaba.druid.sql.parser.SQLExprParser.bitXor(SQLExprParser.java:152)

at com.alibaba.druid.sql.parser.SQLExprParser.multiplicative(SQLExprParser.java:189)

at com.alibaba.druid.sql.parser.SQLExprParser.additiveRest(SQLExprParser.java:1282)

at com.alibaba.druid.sql.parser.SQLExprParser.exprRest(SQLExprParser.java:138)

at com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser.exprRest(OracleExprParser.java:1129)

at com.alibaba.druid.sql.parser.SQLExprParser.expr(SQLExprParser.java:132)

at com.alibaba.druid.sql.parser.SQLExprParser.exprList(SQLExprParser.java:915)

at com.alibaba.druid.sql.parser.SQLExprParser.methodRest(SQLExprParser.java:808)

at com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser.methodRest(OracleExprParser.java:529)

at com.alibaba.druid.sql.parser.SQLExprParser.primaryRest(SQLExprParser.java:776)

at com.alibaba.druid.sql.dialect.oracle.parser.OracleExprParser.primaryRest(OracleExprParser.java:691)

at com.alibaba.druid.sql.parser.SQLExprParser.parseSelectItem(SQLExprParser.java:1949)

at com.alibaba.druid.sql.parser.SQLSelectParser.parseSelectList(SQLSelectParser.java:359)

at com.alibaba.druid.sql.dialect.oracle.parser.OracleSelectParser.query(OracleSelectParser.java:264)

at com.alibaba.druid.sql.dialect.oracle.parser.OracleSelectParser.select(OracleSelectParser.java:85)

at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseStatementList(OracleStatementParser.java:155)

at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:147)

at com.alibaba.druid.wall.WallProvider.checkInternal(WallProvider.java:620)

at com.alibaba.druid.wall.WallProvider.check(WallProvider.java:574)

at com.alibaba.druid.wall.WallFilter.check(WallFilter.java:711)

... 80 common frames omitted

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值