偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

ibatis resultMap報錯解決一例

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

ibatis resultMap報錯信息:

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

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


本文來自CSDN博客,轉載請標明出處:http://blog.csdn.net/liguohuaty/archive/2009/03/31/4038437.aspx

【編輯推薦】

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

2009-07-22 10:03:11

iBATIS Resu

2009-07-16 13:30:12

resultMapgroupBy屬性

2009-09-17 16:38:02

WSUS服務器

2009-07-16 13:50:31

ibatisResultMap

2012-05-17 09:26:43

MapReduce

2012-09-24 01:01:49

NginxNginx性能Web服務器

2009-12-01 09:15:30

Windows 7系統激活

2014-11-19 09:22:48

云計算Dockerpython API

2009-08-07 09:57:38

2013-11-12 14:43:43

MySQL數據庫

2017-01-16 15:43:54

存儲虛擬化控制器

2013-10-15 09:48:03

C++Lambda函數式編程

2021-03-08 06:29:53

微信僵尸粉移動應用

2009-07-15 09:30:00

ibatis級聯

2021-07-06 12:07:27

Go 服務性能

2020-11-10 13:42:07

Go編譯器修復

2009-08-06 11:37:24

虛擬機NAT連接物理網絡

2022-12-26 09:05:35

2009-07-21 17:31:39

iBATIS一對多映射

2009-07-21 09:55:45

iBATIS分頁
點贊
收藏

51CTO技術棧公眾號