自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

ibatis resultMap報(bào)錯(cuò)解決一例

開發(fā) 后端
我們經(jīng)常遇到ibatis resultMap報(bào)錯(cuò)的情況,由于ibatis resultMap報(bào)錯(cuò)的情況有多種,我們今天就拿出來一種ibatis resultMap報(bào)錯(cuò)的解決方法,希望對(duì)您的工作有所幫助。

ibatis resultMap報(bào)錯(cuò)信息:

SQLErrorCodesFactory - Database product name cached for DataSource [org.apache.commons.dbcp.BasicDataSource@19c5048]: name is 'MySQL'
SQLErrorCodesFactory - SQL error codes for 'MySQL' found
SQLErrorCodeSQLExceptionTranslator - Unable to translate SQLException with Error code '0', will now try the fallback translator
DataSourceUtils - Returning JDBC Connection to DataSource
Exception in thread "main" org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];  
--- The error occurred in net/jbbs/dao/ibatis/map/user.xml.
--- The error occurred while applying a result map.
--- Check the user.userResult.
--- 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 net/jbbs/dao/ibatis/map/user.xml.
--- The error occurred while applying a result map.
--- Check the user.userResult.
--- The error happened while setting a property on the result object.
--- Cause: net.sf.cglib.beans.BulkBeanException
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:  
--- The error occurred in net/jbbs/dao/ibatis/map/user.xml.
--- The error occurred while applying a result map.
--- Check the user.userResult.
--- The error happened while setting a property on the result object.
--- Cause: net.sf.cglib.beans.BulkBeanException
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:566)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:541)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)
at org.springframework.orm.ibatis.SqlMapClientTemplate$1.doInSqlMapClient(SqlMapClientTemplate.java:243)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:193)
at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(SqlMapClientTemplate.java:241)
at net.jbbs.dao.ibatis.UserDAOImpl.findByEmail(UserDAOImpl.java:54)
at net.jbbs.test.UserTest.findByEmail(UserTest.java:42)
at net.jbbs.test.UserTest.main(UserTest.java:34)
Caused by: net.sf.cglib.beans.BulkBeanException
at net.jbbs.domain.User$$BulkBeanByCGLIB$$88b6b34d.setPropertyValues()
at com.ibatis.sqlmap.engine.accessplan.EnhancedPropertyAccessPlan.setProperties(EnhancedPropertyAccessPlan.java:33)
at com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.setData(JavaBeanDataExchange.java:112)
at com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.setResultObjectValues(BasicResultMap.java:373)
at com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback.handleResultObject(RowHandlerCallback.java:64)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:382)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:301)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:190)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
... 10 more

這個(gè)ibatis resultMap錯(cuò)誤信息指出resultMap里有問題。說錯(cuò)誤發(fā)生在設(shè)置某一個(gè)屬性的時(shí)候,但是沒有具體說明是一個(gè)怎么樣的錯(cuò)誤。由于對(duì)于ibatis了解還不是很深,所以一時(shí)不知如何事好。只有在ibatis resultMap里面作文章,把里面的注釋掉一些,哈哈,程序居然正常跑起來了??磥砦铱煲业藉e(cuò)誤了,接著繼續(xù)排除其它的,終于讓我找到出錯(cuò)的一行了: 
 
 
 


本文來自CSDN博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:http://blog.csdn.net/liguohuaty/archive/2009/03/31/4038437.aspx

【編輯推薦】

  1. 了解iBatis.Net中的ResultMap
  2. ibatis resultMap groupBy屬性巧使用
  3. ibatis標(biāo)簽詳解
  4. ibatis下加入c3p0連接池的方法
  5. ibatis也能用proxool連接池
責(zé)任編輯:桑丘 來源: liguohuaty的專欄
相關(guān)推薦

2009-07-22 10:03:11

iBATIS Resu

2009-07-16 13:30:12

resultMapgroupBy屬性

2009-09-17 16:38:02

WSUS服務(wù)器

2009-07-16 13:50:31

ibatisResultMap

2012-05-17 09:26:43

MapReduce

2012-09-24 01:01:49

NginxNginx性能Web服務(wù)器

2009-12-01 09:15:30

Windows 7系統(tǒng)激活

2014-11-19 09:22:48

云計(jì)算Dockerpython API

2009-08-07 09:57:38

2013-11-12 14:43:43

MySQL數(shù)據(jù)庫

2017-01-16 15:43:54

存儲(chǔ)虛擬化控制器

2021-03-08 06:29:53

微信僵尸粉移動(dòng)應(yīng)用

2013-10-15 09:48:03

C++Lambda函數(shù)式編程

2021-07-06 12:07:27

Go 服務(wù)性能

2009-07-15 09:30:00

ibatis級(jí)聯(lián)

2020-11-10 13:42:07

Go編譯器修復(fù)

2009-08-06 11:37:24

虛擬機(jī)NAT連接物理網(wǎng)絡(luò)

2022-12-26 09:05:35

2009-07-21 09:55:45

iBATIS分頁

2009-07-21 17:31:39

iBATIS一對(duì)多映射
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)