|
版本: |
BeX5V3.5 |
小版本号: |
|
|
|
数据库: |
|
服务器操作系统: |
Windows |
应用服务器: |
|
客户端操作系统: |
Windows 7 |
浏览器: |
|
|
|
我使用data.setValue方法,报了错误,提示我插入的是null值,可是我插入的值是存在的。
代码是这样写的:
- conMateData.newData();
- conMateData.setValue("fWarehouseID", fWarehouseID);
- conMateData.setValue("fMateID", fMateID);
- conMateData.setValue("fMasterID", mID);
- conMateData.setValue("fMateName", fName);
- conMateData.setValue("fCount", fCount);
- conMateData.setValue("fUnit", fUnit);
- conMateData.setValue("fUnitPrice", fUnitPrice);
- conMateData.saveData();
复制代码 我已经确认过fName是存在的。
然后后台报错:
- com.justep.exception.BusinessException: 编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: INSERT INTO GZPL_BIZ_TRADING_SALES_CONTRACT_MATE GZPL_BIZ_TRADING_SALES_CONTRACT_MATE(GZPL_BIZ_TRADING_SALES_CONTRACT_MATE, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.version, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.fCount, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.fCreateTimeStamp, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.fMasterID, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.fMateID, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.fMateName, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.fModel, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.fTaxRate, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.fUnit, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.fUnitPrice, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.fWarehouseID) VALUES (:GZPL_BIZ_TRADING_SALES_CONTRACT_MATE, :version, :fCount, :fCreateTimeStamp, :fMasterID, :fMateID, :fMateName, :fModel, :fTaxRate, :fUnit, :fUnitPrice, :fWarehouseID)
- 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:24)
- at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:497)
- 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.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:723)
- at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
- 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:103)
- at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
- at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
- at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
- at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
- at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
- at java.lang.Thread.run(Thread.java:745)
- Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150039; 提示: 执行sql: INSERT INTO GZPL_BIZ_TRADING_SALES_CONTRACT_MATE (GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.fID, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.VERSION, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.FCOUNT, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.FCREATETIMESTAMP, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.FMASTERID, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.FMATEID, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.FMATENAME, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.FMODEL, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.FTAXRATE, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.FUNIT, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.FUNITPRICE, GZPL_BIZ_TRADING_SALES_CONTRACT_MATE.FWAREHOUSEID) VALUES ( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ), binds: [19150351C370443FB13901881D5BDDF4, 0, 0.0, 2017122900047, 19DBB9E8F74943FFB9839D0BE33712F2, A3D17EB9B1004B03B301FCF15C99A49A, null, null, 0.0, null, 0.0, EA713AA7B43D446AB280F882A7686CE0]出错
- at com.justep.exception.BusinessException.create(Unknown Source)
- at com.justep.system.ksql.KSQLUtils.execSqlUpdate(Unknown Source)
- ... 35 more
- Caused by: java.sql.SQLException: 不能将值 NULL 插入列 'fMateName',表 'BPMS_DEV_01.dbo.GZPL_BIZ_TRADING_SALES_CONTRACT_MATE';列不允许有 Null 值。INSERT 失败。
- 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)
- ... 36 more
复制代码 请问可以帮我看看是怎么回事吗,谢谢。
|
|