sql是这么写的
select id ,connect_by_root(id) from DJGL_DJGLJ start with PARENT_ID = ? connect by prior id = d.PARENT_ID
错误是:
ERROR 2018/01/26 10:56:54:277 com.jfinal.core.ActionHandler.handle(ActionHandler.java:135) /dzqt/statistics/getCurrentOrgYearReportCount com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: sql injection violation, syntax error: TODO : RPAREN id :
select id,connect_by_root( id) from DJGL_DJGLJ start with PARENT_ID = ? connect by prior id = PARENT_ID
at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:345)
at com.jfinal.plugin.activerecord.Db.find(Db.java:232)
at com.wlgj.xtjc.biz.dzqt.statistics.DzqtStatisticsService.queryYearReportCountList(DzqtStatisticsService.java:39)
at com.wlgj.xtjc.biz.dzqt.statistics.DzqtStatisticsService$$EnhancerByCGLIB$$75e49dca.CGLIB$queryYearReportCountList$2(<generated>)
at com.wlgj.xtjc.biz.dzqt.statistics.DzqtStatisticsService$$EnhancerByCGLIB$$75e49dca$$FastClassByCGLIB$$436a2584.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at com.jfinal.aop.Invocation.invoke(Invocation.java:82)
at com.jfinal.aop.Callback.intercept(Callback.java:96)
at com.wlgj.xtjc.biz.dzqt.statistics.DzqtStatisticsService$$EnhancerByCGLIB$$75e49dca.queryYearReportCountList(<generated>)
at com.wlgj.xtjc.biz.dzqt.statistics.DzqtStatisticsService.getJsonStr(DzqtStatisticsService.java:58)
at com.wlgj.xtjc.biz.dzqt.statistics.DzqtStatisticsService$$EnhancerByCGLIB$$75e49dca.CGLIB$getJsonStr$0(<generated>)
at com.wlgj.xtjc.biz.dzqt.statistics.DzqtStatisticsService$$EnhancerByCGLIB$$75e49dca$$FastClassByCGLIB$$436a2584.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at com.jfinal.aop.Invocation.invoke(Invocation.java:82)
at com.jfinal.aop.Callback.intercept(Callback.java:96)
at com.wlgj.xtjc.biz.dzqt.statistics.DzqtStatisticsService$$EnhancerByCGLIB$$75e49dca.getJsonStr(<generated>)
at com.wlgj.xtjc.biz.dzqt.statistics.DzqtStatisticsController.getCurrentOrgYearReportCount(DzqtStatisticsController.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
这个问题怎么解决的。
如果确实配置了,那么是 sql 语法错误,老老实实将 sql 改正确即可