|
楼主 |
发表于 2018-6-28 19:46:47
|
显示全部楼层
老师您好,请问主键怎么插入?我是直接插入到数据库中,提示主键不能重复java.lang.reflect.InvocationTargetException
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:592)
at com.justep.system.action.Engine.invokeActions(Native Method)
at com.justep.system.action.Engine.invokeActions(Unknown Source)
at com.justep.business.server.BusinessServer.doAction(Unknown Source)
at com.justep.business.server.BusinessServer.doExcute(Unknown Source)
at com.justep.business.server.BusinessServer.excute(Unknown Source)
at com.justep.business.server.BusinessServerServlet.execService(Unknown Source)
at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.reflect.InvocationTargetException
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:592)
at com.justep.system.action.Engine.invokeAction(Native Method)
at com.justep.system.action.Engine.invokeAction(Unknown Source)
at com.justep.model.impl.UtilImplementInstance.invokeAction(Unknown Source)
at com.justep.model.impl.UtilImplementInstance.invokeAction(Unknown Source)
at com.justep.system.action.ActionUtils.invokeAction(Unknown Source)
at com.justep.excel.ImportGenerator.generate(ImportGenerator.java:146)
at Excel.importExcel(Excel.java:88)
... 26 more
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: INSERT INTO TZHongXICTXMQD TZHongXICTXMQD(TZHongXICTXMQD, TZHongXICTXMQD.version, TZHongXICTXMQD.tfXiangMLY, TZHongXICTXMQD.tfXuH1, TZHongXICTXMQD.tfXuH2, TZHongXICTXMQD.tfXuH3, TZHongXICTXMQD.tfXiangMND, TZHongXICTXMQD.tfQianYZT, TZHongXICTXMQD.tfXiangMBH, TZHongXICTXMQD.tfYeWHTBH, TZHongXICTXMQD.tfLiuSH, TZHongXICTXMQD.tfERPBH, TZHongXICTXMQD.tfXiangMMC, TZHongXICTXMQD.tfKeHMC, TZHongXICTXMQD.tfYingXQY, TZHongXICTXMQD.tfHeTQYKHJL, TZHongXICTXMQD.tfSHouRHTEYHTXT, TZHongXICTXMQD.tfSHouRHTJJY, TZHongXICTXMQD.tfHeTTJSJ, TZHongXICTXMQD.tfHeTWCSPSJ, TZHongXICTXMQD.tfHeTGZSJ, TZHongXICTXMQD.tfHeTZT, TZHongXICTXMQD.tfHeTGZQRSJ, TZHongXICTXMQD.tfBenNQRSR, TZHongXICTXMQD.tfQiZFWSR, TZHongXICTXMQD.tfLeiJQRSR20132018, TZHongXICTXMQD.tfSHouRQRJD, TZHongXICTXMQD.tfBenNQRCB, TZHongXICTXMQD.tfQqZFWCB, TZHongXICTXMQD.tfLeiJQRCB, TZHongXICTXMQD.tfLeiJHK, TZHongXICTXMQD.tfHuiKBL, TZHongXICTXMQD.tfDangNHK, TZHongXICTXMQD.tfYingSZK, TZHongXICTXMQD.tfYingSZK3NN, TZHongXICTXMQD.tfDaoQYS, TZHongXICTXMQD.tfYiJTHZ, TZHongXICTXMQD.tfYuSZK, TZHongXICTXMQD.tfYingFZK, TZHongXICTXMQD.tfZHiZHTSFGD, TZHongXICTXMQD.tfZHiCJL, TZHongXICTXMQD.tfZHongBSJ, TZHongXICTXMQD.tfXiangMJL, TZHongXICTXMQD.tfZHiZJSWTXDSJ, TZHongXICTXMQD.tfJiHYSSJ, TZHongXICTXMQD.tfYanSSJ, TZHongXICTXMQD.tfCaiGJL, TZHongXICTXMQD.tfDianZCGXQXDSJ, TZHongXICTXMQD.tfCaiGZBWCSJ, TZHongXICTXMQD.tfCHengBHTWCQYSJ, TZHongXICTXMQD.tfYeWZCB, TZHongXICTXMQD.tfJianWB, TZHongXICTXMQD.tfCaiGB, TZHongXICTXMQD.tfYunYB, TZHongXICTXMQD.tfYiQCBHTJE, TZHongXICTXMQD.tfYiQCBHTJJ, TZHongXICTXMQD.tfCHengBZSBHS, TZHongXICTXMQD.tfYuJML, TZHongXICTXMQD.tfQianYML, TZHongXICTXMQD.tfLeiJQRML, TZHongXICTXMQD.tf2018NQRML, TZHongXICTXMQD.tf2018NFWML, TZHongXICTXMQD.tfSHiF4YSRJHXM, TZHongXICTXMQD.tf5Y7RHYXLS, TZHongXICTXMQD.tfWuSM, TZHongXICTXMQD.tfSHiFXYSLDZBQ, TZHongXICTXMQD.tfBuQNR, TZHongXICTXMQD.tfZHongDSRJHXM, TZHongXICTXMQD.tfXiangMZTSRD, TZHongXICTXMQD.tfITFWSR, TZHongXICTXMQD.tfITDSF, TZHongXICTXMQD.tfCT) VALUES (:TZHongXICTXMQD, :version, :tfXiangMLY, :tfXuH1, :tfXuH2, :tfXuH3, :tfXiangMND, :tfQianYZT, :tfXiangMBH, :tfYeWHTBH, :tfLiuSH, :tfERPBH, :tfXiangMMC, :tfKeHMC, :tfYingXQY, :tfHeTQYKHJL, :tfSHouRHTEYHTXT, :tfSHouRHTJJY, :tfHeTTJSJ, :tfHeTWCSPSJ, :tfHeTGZSJ, :tfHeTZT, :tfHeTGZQRSJ, :tfBenNQRSR, :tfQiZFWSR, :tfLeiJQRSR20132018, :tfSHouRQRJD, :tfBenNQRCB, :tfQqZFWCB, :tfLeiJQRCB, :tfLeiJHK, :tfHuiKBL, :tfDangNHK, :tfYingSZK, :tfYingSZK3NN, :tfDaoQYS, :tfYiJTHZ, :tfYuSZK, :tfYingFZK, :tfZHiZHTSFGD, :tfZHiCJL, :tfZHongBSJ, :tfXiangMJL, :tfZHiZJSWTXDSJ, :tfJiHYSSJ, :tfYanSSJ, :tfCaiGJL, :tfDianZCGXQXDSJ, :tfCaiGZBWCSJ, :tfCHengBHTWCQYSJ, :tfYeWZCB, :tfJianWB, :tfCaiGB, :tfYunYB, :tfYiQCBHTJE, :tfYiQCBHTJJ, :tfCHengBZSBHS, :tfYuJML, :tfQianYML, :tfLeiJQRML, :tf2018NQRML, :tf2018NFWML, :tfSHiF4YSRJHXM, :tf5Y7RHYXLS, :tfWuSM, :tfSHiFXYSLDZBQ, :tfBuQNR, :tfZHongDSRJHXM, :tfXiangMZTSRD, :tfITFWSR, :tfITDSF, :tfCT)
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.ksqlInsert(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.ksqlExecuteUpdate(Unknown Source)
at com.justep.system.data.KSQL.executeUpdate(Unknown Source)
at com.justep.system.data.KSQL.executeUpdate(Unknown Source)
at com.justep.system.data.impl.TableImpl.insert(Unknown Source)
at com.justep.system.data.impl.TableImpl.save(Unknown Source)
at com.justep.system.data.impl.TableImpl.save(Unknown Source)
at com.justep.system.data.BizData.save(Unknown Source)
at BizProcedure.save(BizProcedure.java:18)
... 37 more
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150039; 提示: 执行sql: INSERT INTO TZHONGXICTXMQD (TZHONGXICTXMQD.fID, TZHONGXICTXMQD.VERSION, TZHONGXICTXMQD.TFXIANGMLY, TZHONGXICTXMQD.TFXUH1, TZHONGXICTXMQD.TFXUH2, TZHONGXICTXMQD.TFXUH3, TZHONGXICTXMQD.TFXIANGMND, TZHONGXICTXMQD.TFQIANYZT, TZHONGXICTXMQD.TFXIANGMBH, TZHONGXICTXMQD.TFYEWHTBH, TZHONGXICTXMQD.TFLIUSH, TZHONGXICTXMQD.TFERPBH, TZHONGXICTXMQD.TFXIANGMMC, TZHONGXICTXMQD.TFKEHMC, TZHONGXICTXMQD.TFYINGXQY, TZHONGXICTXMQD.TFHETQYKHJL, TZHONGXICTXMQD.TFSHOURHTEYHTXT, TZHONGXICTXMQD.TFSHOURHTJJY, TZHONGXICTXMQD.TFHETTJSJ, TZHONGXICTXMQD.TFHETWCSPSJ, TZHONGXICTXMQD.TFHETGZSJ, TZHONGXICTXMQD.TFHETZT, TZHONGXICTXMQD.TFHETGZQRSJ, TZHONGXICTXMQD.TFBENNQRSR, TZHONGXICTXMQD.TFQIZFWSR, TZHONGXICTXMQD.TFLEIJQRSR20132018, TZHONGXICTXMQD.TFSHOURQRJD, TZHONGXICTXMQD.TFBENNQRCB, TZHONGXICTXMQD.TFQQZFWCB, TZHONGXICTXMQD.TFLEIJQRCB, TZHONGXICTXMQD.TFLEIJHK, TZHONGXICTXMQD.TFHUIKBL, TZHONGXICTXMQD.TFDANGNHK, TZHONGXICTXMQD.TFYINGSZK, TZHONGXICTXMQD.TFYINGSZK3NN, TZHONGXICTXMQD.TFDAOQYS, TZHONGXICTXMQD.TFYIJTHZ, TZHONGXICTXMQD.TFYUSZK, TZHONGXICTXMQD.TFYINGFZK, TZHONGXICTXMQD.TFZHIZHTSFGD, TZHONGXICTXMQD.TFZHICJL, TZHONGXICTXMQD.TFZHONGBSJ, TZHONGXICTXMQD.TFXIANGMJL, TZHONGXICTXMQD.TFZHIZJSWTXDSJ, TZHONGXICTXMQD.TFJIHYSSJ, TZHONGXICTXMQD.TFYANSSJ, TZHONGXICTXMQD.TFCAIGJL, TZHONGXICTXMQD.TFDIANZCGXQXDSJ, TZHONGXICTXMQD.TFCAIGZBWCSJ, TZHONGXICTXMQD.TFCHENGBHTWCQYSJ, TZHONGXICTXMQD.TFYEWZCB, TZHONGXICTXMQD.TFJIANWB, TZHONGXICTXMQD.TFCAIGB, TZHONGXICTXMQD.TFYUNYB, TZHONGXICTXMQD.TFYIQCBHTJE, TZHONGXICTXMQD.TFYIQCBHTJJ, TZHONGXICTXMQD.TFCHENGBZSBHS, TZHONGXICTXMQD.TFYUJML, TZHONGXICTXMQD.TFQIANYML, TZHONGXICTXMQD.TFLEIJQRML, TZHONGXICTXMQD.TF2018NQRML, TZHONGXICTXMQD.TF2018NFWML, TZHONGXICTXMQD.TFSHIF4YSRJHXM, TZHONGXICTXMQD.TF5Y7RHYXLS, TZHONGXICTXMQD.TFWUSM, TZHONGXICTXMQD.TFSHIFXYSLDZBQ, TZHONGXICTXMQD.TFBUQNR, TZHONGXICTXMQD.TFZHONGDSRJHXM, TZHONGXICTXMQD.TFXIANGMZTSRD, TZHONGXICTXMQD.TFITFWSR, TZHONGXICTXMQD.TFITDSF, TZHONGXICTXM........
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.system.ksql.KSQLUtils.execSqlUpdate(Unknown Source)
... 46 more
Caused by: java.sql.SQLException: 违反了 PRIMARY KEY 约束 'PK__TZHongXI__D9F8259C7FD6B9FC'。不能在对象 'dbo.TZHongXICTXMQD' 中插入重复键。
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:525)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:421)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
|
|