今天用ibatis的时候,发生了一个奇怪的异常
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/yh/tdscdma/entity/device/PmInfoNew.xml.
--- The error occurred while applying a result map.
--- Check the selectAllPmValue-AutoResultMap.
--- Check the result mapping for the 'primap_ds1' property.
--- Cause: com.ibatis.common.beans.ProbeException: There is no WRITEABLE property named 'baseclass{3}' in class 'java.lang.Object'
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:615)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:126)
at org.springframework.orm.ibatis.SqlMapClientTemplate$4.doInSqlMapClient(SqlMapClientTemplate.java:280)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:188)
... 46 more
Caused by: com.ibatis.common.beans.ProbeException: There is no WRITEABLE property named 'baseclass{3}' in class 'java.lang.Object'
其中''baseclass{3} 在数据库表中保存的是【cdmanbr_list1.baseclass{3}]这样的类型,而primap_ds1没有加[],表中没数据的时候,不会报错,一有数据就报以上的异常。同时在另一张表中也有primap_ds1和【cdmanbr_list1.baseclass{3}]字段,但是却没有报这两个字段的异常,而是报别的字段异常,很不解的一个问题,最后无奈,只能用jdbc实现。