起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3145|回复: 2

[结贴] 执行KSQL出错,JUSTEP150210,帮忙看一下是什么原因

[复制链接]

4

主题

10

帖子

36

积分

新手上路

Rank: 1

积分
36
QQ
发表于 2017-4-7 15:25:55 | 显示全部楼层 |阅读模式
保存数据失败! ,
执行KSQL出错, KSQL: INSERT INTO fCostRequest fCostRequest(fCostRequest, fCostRequest.version, fCostRequest.fDate, fCostRequest.fDept, fCostRequest.fMoney, fCostRequest.fName, fCostRequest.fStatus, fCostRequest.fYT) VALUES (:fCostRequest, :version, :fDate, :fDept, :fMoney, :fName, :fStatus, :fYT)

编码:JUSTEP150210
[url=]隐藏详细[/url]
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 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: 编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: INSERT INTO fCostRequest fCostRequest(fCostRequest, fCostRequest.version, fCostRequest.fDate, fCostRequest.fDept, fCostRequest.fMoney, fCostRequest.fName, fCostRequest.fStatus, fCostRequest.fYT) VALUES (:fCostRequest, :version, :fDate, :fDept, :fMoney, :fName, :fStatus, :fYT) 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) ... 27 more Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150039; 提示: 执行sql: INSERT INTO FCOSTREQUEST (FCOSTREQUEST.fID, FCOSTREQUEST.VERSION, FCOSTREQUEST.FDATE, FCOSTREQUEST.FDEPT, FCOSTREQUEST.FMONEY, FCOSTREQUEST.FNAME, FCOSTREQUEST.FSTATUS, FCOSTREQUEST.FYT) VALUES ( ? , ? , ? , ? , ? , ? , ? , ? ), binds: [6772BC79A21245A9B2093BC51CF71582, 0, 2017-04-07 15:17:22.171, 起步软件, 23, 冯雷, 213, 23]出错 at com.justep.exception.BusinessException.create(Unknown Source) at com.justep.system.ksql.KSQLUtils.execSqlUpdate(Unknown Source) ... 36 more Caused by: java.sql.SQLException: Incorrect string value: '\xE8\xB5\xB7\xE6\xAD\xA5...' for column 'fDept' at row 1 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2594) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1901) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2113) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2049) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2034) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) ... 37 more

4

主题

10

帖子

36

积分

新手上路

Rank: 1

积分
36
QQ
 楼主| 发表于 2017-4-7 16:09:52 | 显示全部楼层
自己找了一下原因,插入的数据中有中文,mysql报错,如果是全英文的就可以。
这是要在数据库设置一下吗?
回复 支持 反对

使用道具 举报

4

主题

10

帖子

36

积分

新手上路

Rank: 1

积分
36
QQ
 楼主| 发表于 2017-4-7 16:22:30 | 显示全部楼层
自己解决了,把数据库的字符集改了就好了。这个表是通过建模时生成的。默认的都是latin1_swedish_ci   
我改成utf8_bin就好了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-11-23 12:09 , Processed in 0.091695 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表