我在通过存储过程填充表时遇到此错误。存储过程从一个表中选择数据并将其移动到另一个表。可能是什么问题?我无法得到它。
In progress ..
****ERROR****
[2015-03-26 16:36:35.426]org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [call publish_data()]; SQL state [HY000]; error code [1366]; Incorrect decimal value: '' for column 'JOB_SUPPORTED_BY_CLIENT_BUSINESS' at row 1356; nested exception is java.sql.SQLException: Incorrect decimal value: '' for column 'JOB_SUPPORTED_BY_CLIENT_BUSINESS' at row 1356
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)
at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:519)
at dao.report.list.ReportDAOImpl.publishData(ReportDAOImpl.java:460)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at com.sun.proxy.$Proxy74.publishData(Unknown Source)
at proc.ActivityStartupThread.run(ActivityStartupThread.java:32)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Incorrect decimal value: '' for column 'JOB_SUPPORTED_BY_CLIENT_BUSINESS' at row 1356
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2728)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1811)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1725)
at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234)
at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234)
at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:509)
at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:507)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
... 11 more
答案 0 :(得分:0)
SQL异常似乎很清楚;
十进制值不正确:''第1356行'JOB_SUPPORTED_BY_CLIENT_BUSINESS'
这不是一般的SQL错误,它是由带有RAISERROR或THROW的代码抛出的。有关何时发生此错误的详细信息,请参阅存储过程。