博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
索引中丢失 IN 或 OUT 参数
阅读量:6387 次
发布时间:2019-06-23

本文共 2923 字,大约阅读时间需要 9 分钟。

java.sql.SQLException: 索引中丢失 IN 或 OUT 参数:: 1

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1680)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3279)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3328)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at dao.ShowDAO.CountMaxPage(ShowDAO.java:58)
at struts.action.ShowAction.execute(ShowAction.java:66)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at tool.EncodeFilter.doFilter(EncodeFilter.java:42)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

String sql = "insert into T_W_AD_INFO(AD_CODE,AD_PIC_NUM,URL,AD_PIC," +

"AD_DESC,SHOP_ID,AD_DATE,AVAIL_END_DATE)values" +
"((SELECT MAX(AD_CODE)+1 FROM T_W_AD_INFO),?,?,?,?," +
"?,to_date(?,'YYYY-MM-DD'),to_date(?,'YYYY-MM-DD'))";
最终发现是配置文件和数据库字段类型不一致所导致,那个数字1就表示?表达式的为止应该是AD_CODE字段,结果发现,数据库中字段是integer,配置文件中误写成了varchar2修改后问题解决

转载地址:http://jkdha.baihongyu.com/

你可能感兴趣的文章
Python(五)之迭代器和列表解析
查看>>
Dockerfile 最佳实践
查看>>
Oracle HA 之 Server Pool 实战
查看>>
浏览器端JS导出EXCEL
查看>>
js正则验证手机号码有效性
查看>>
idea解决打开大文件消耗CPU问题
查看>>
第四章(下)
查看>>
oracle ORA-00119和ORA-00132解决方法
查看>>
ARM QT实现多点触摸【转】
查看>>
Weblogic项目部署教程
查看>>
Gradle -- buildScript块与allprojects块及根级别的repositories区别
查看>>
远程SSH连接服务与基本排错
查看>>
Objective-C学习笔记(十九)——对象方法和类方法的相互调用
查看>>
win10 WmiPrvSE.exe WMI Provider 占用CPU过高的问题
查看>>
hdu 4945 2048(DP)
查看>>
论文阅读:CNN-RNN: A Unified Framework for Multi-label Image Classification
查看>>
开篇有益-解析微软微服务架构eShopOnContainers(一)
查看>>
IE新发现
查看>>
quick check
查看>>
游戏人生(一),我的lua之旅:那些坑爹的CCBReaderLoad
查看>>