开发者社区> 问答> 正文

jfinal的Db.save()报错问题?报错

执行如下代码的时候

Record instrData = new Record();
instrData.set("xiangmu", params[0]).set("pri_by", params[1]).set("pri_by_lj", params[2]);
instrData.set("pri_qntq", params[3]).set("pri_qntq_lj", params[4]);
instrData.set("pri_qntq_zzl", params[5]).set("pri_qntq_lj_zzl", params[6]);
instrData.set("nian",nian).set("yue", yue);

Db.save("TBL_DATA_SYTBDATA", "GUID", instrData);

在Db.save()时,控制台报错:

com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.ArrayIndexOutOfBoundsException: 9

at com.jfinal.plugin.activerecord.DbPro.save(DbPro.java:545)
at com.jfinal.plugin.activerecord.Db.save(Db.java:373)
at com.jxl.data.JxlReadExcel.readExcelIntoDb(JxlReadExcel.java:133)
at com.jxl.data.JxlReadExcel.readFiles(JxlReadExcel.java:80)
at com.jxl.data.JxlReadExcel.initMethod(JxlReadExcel.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


at java.lang.reflect.Method.invoke(Method.java:597)
at com.jfinal.aop.Invocation.invoke(Invocation.java:71)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74)
at com.login.filter.FilterHandler.handle(FilterHandler.java:55)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)


at org.apache.shiro.web.servlet.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.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)


at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)


at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)


at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.ArrayIndexOutOfBoundsException: 9
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)


at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
at com.mchange.v2.c3p0.impl.NewPooledConnection.handleThrowable(NewPooledConnection.java:432)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:172)
at com.jfinal.plugin.activerecord.DbPro.save(DbPro.java:504)
at com.jfinal.plugin.activerecord.DbPro.save(DbPro.java:543)
... 38 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 9


at oracle.jdbc.driver.OracleSql.computeBasicInfo(OracleSql.java:950)
at oracle.jdbc.driver.OracleSql.getSqlKind(OracleSql.java:623)
at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:1212)
at oracle.jdbc.driver.T4CPreparedStatement.<init>(T4CPreparedStatement.java:28)
at oracle.jdbc.driver.T4CDriverExtension.allocatePreparedStatement(T4CDriverExtension.java:68)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3140)


at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3042)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:6022)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:155)


... 40 more

求告知,什么原因导致?谢谢

展开
收起
爱吃鱼的程序员 2020-06-09 10:57:12 539 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

     历史上已经有三个人碰到这个问题了,原因是oracle驱动的bug,升级一下oracle驱动就好了,这里所说的驱动是指用于oracle的那个jar包回复<aclass='referer'target='_blank'>@资深潜水员:jfinal在2011年就用于了企业项目2012年开源分享出来,历经五年时间精心打磨,已然是是极度稳固的了。即便是在开源的头一年里面,也极少有bug原来如此,之前一直用的ojdbc6,换了ojdbc14,确实解决了,非常感谢。。。

    2020-06-09 10:57:27
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Apache Wicket User Guide - Ref 立即下载
OPEN SOURCE IN A DATA-DRIVEN WORLD 立即下载
DATA SECURITY IS NOW MORE IMPO 立即下载