org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLExcepti
2012-06-18 16:09
465 查看
错误:
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL [];
SQL state [null]; error code [0];
--- The error occurred in com/sinosoft/para/conf/A_T_4_SqlMap.xml.
--- The error occurred while applying a result map.
--- Check the A_T_4.A_T_4Result.
--- The error happened while setting a property on the result object.
--- Cause: net.sf.cglib.beans.BulkBeanException; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/sinosoft/para/conf/A_T_4_SqlMap.xml.
--- The error occurred while applying a result map.
--- Check the A_T_4.A_T_4Result.
--- The error happened while setting a property on the result object.
这个错误是resultMap里有问题。说错误发生在设置某一个属性的时候,但是没有具体说明是一个怎么样的错误<NULL错误>。可能就
是把某一列中不为null的值赋了null值(double等),这样的话在resultMap里面作修改就行了。
肯定是iBatis试图把从数据库读出来的NULL 值写入对象属性的时候出现异常。String类型的赋值应该没问题,我的数据库中还
有double类型的,那就是这个问题了,采取的补救措施就是:
<result column="RATE" jdbcType="DECIMAL" proper
4000
ty="rate" nullValue="0"/>
对从数据库读出来的NULL值采用一个相应可转换为DECIMAL类型或者double类型的值来替换
附:
sqlMap:
<resultMap class="com.sinosoft.para.bean.A_t_4_6" id="A_T_4_6Result">
<result property="id" column="user_id"/>
<result column="RATE" jdbcType="DECIMAL" property="rate" nullValue="0"/>
<!--这一行加一个nullValue="0"就OK了-->
</resultMap>
主要是空配错误。
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL [];
SQL state [null]; error code [0];
--- The error occurred in com/sinosoft/para/conf/A_T_4_SqlMap.xml.
--- The error occurred while applying a result map.
--- Check the A_T_4.A_T_4Result.
--- The error happened while setting a property on the result object.
--- Cause: net.sf.cglib.beans.BulkBeanException; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/sinosoft/para/conf/A_T_4_SqlMap.xml.
--- The error occurred while applying a result map.
--- Check the A_T_4.A_T_4Result.
--- The error happened while setting a property on the result object.
这个错误是resultMap里有问题。说错误发生在设置某一个属性的时候,但是没有具体说明是一个怎么样的错误<NULL错误>。可能就
是把某一列中不为null的值赋了null值(double等),这样的话在resultMap里面作修改就行了。
肯定是iBatis试图把从数据库读出来的NULL 值写入对象属性的时候出现异常。String类型的赋值应该没问题,我的数据库中还
有double类型的,那就是这个问题了,采取的补救措施就是:
<result column="RATE" jdbcType="DECIMAL" proper
4000
ty="rate" nullValue="0"/>
对从数据库读出来的NULL值采用一个相应可转换为DECIMAL类型或者double类型的值来替换
附:
sqlMap:
<resultMap class="com.sinosoft.para.bean.A_t_4_6" id="A_T_4_6Result">
<result property="id" column="user_id"/>
<result column="RATE" jdbcType="DECIMAL" property="rate" nullValue="0"/>
<!--这一行加一个nullValue="0"就OK了-->
</resultMap>
主要是空配错误。
相关文章推荐
- Ibatis 报:org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized S
- org.springframework.jdbc.UncategorizedSQLException:
- org.springframework.jdbc.UncategorizedSQLException:
- org.springframework.jdbc.UncategorizedSQLException: Error setting null parameter.
- org.springframework.jdbc.UncategorizedSQLException
- org.springframework.jdbc.UncategorizedSQLException
- org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for
- org.springframework.jdbc.UncategorizedSQLException 错误解决
- org.springframework.jdbc.UncategorizedSQLException
- spring更新clob报错:org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL
- ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: An attempt by a client to chec
- org.springframework.jdbc.UncategorizedSQLException: 不允许从数据类型 varbinary 到 date 的隐式转换
- org.springframework.jdbc.UncategorizedSQLException
- org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar
- SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null];
- org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT * FROM
- 关于org.springframework.jdbc.BadSqlGrammarException
- HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGram
- org.springframework.jdbc.BadSqlGrammarException:
- org.springframework.jdbc.BadSqlGrammarException: Cause: java.sql.SQLException: Column count doesn't