严重: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'systemInfoCache' defined in class path resource [config/core.xml]: Invocation of init method failed; nested exception is org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [-4220];
--- The error occurred in config/sql-mapping/coreSql.xml.
--- The error occurred while applying a result map.
--- Check the core.sysInfoList.
--- Check the result mapping for the 'name' property.
--- Cause: com.ibm.db2.jcc.a.SqlException: [jcc][t4][10199][10462][4.2.73] 必需的字符转换器不可用。 ERRORCODE=-4220, SQLSTATE=null; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in config/sql-mapping/coreSql.xml.
--- The error occurred while applying a result map.
--- Check the core.sysInfoList.
--- Check the result mapping for the 'name' property.
--- Cause: com.ibm.db2.jcc.a.SqlException: [jcc][t4][10199][10462][4.2.73] 必需的字符转换器不可用。 ERRORCODE=-4220, SQLSTATE=null
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [-4220];
--- The error occurred in config/sql-mapping/coreSql.xml.
--- The error occurred while applying a result map.
--- Check the core.sysInfoList.
--- Check the result mapping for the 'name' property.
--- Cause: com.ibm.db2.jcc.a.SqlException: [jcc][t4][10199][10462][4.2.73] 必需的字符转换器不可用。 ERRORCODE=-4220, SQLSTATE=null; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in config/sql-mapping/coreSql.xml.
--- The error occurred while applying a result map.
--- Check the core.sysInfoList.
--- Check the result mapping for the 'name' property.
--- Cause: com.ibm.db2.jcc.a.SqlException: [jcc][t4][10199][10462][4.2.73] 必需的字符转换器不可用。 ERRORCODE=-4220, SQLSTATE=null
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in config/sql-mapping/coreSql.xml.
--- The error occurred while applying a result map.
--- Check the core.sysInfoList.
--- Check the result mapping for the 'name' property.
Java代码:
public class SystemInfoCache {
public void init(){
sysInfoCacheMap = new HashMap();
List sysList = sqlMapExecutor.queryForList("core.querySysInfoList");
for(int i=0;i<sysList.size();i++){
Map sysMap = (Map)sysList.get(i);
sysInfoCacheMap.put(sysMap.get("name"), sysMap.get("value"));
}
}
public void setSqlMap(SqlMapClientOperations sqlmapclientoperations) {
this.sqlMapExecutor = sqlmapclientoperations;
}
private SqlMapClientOperations sqlMapExecutor;
public static Map sysInfoCacheMap;
}
<resultMap class="java.util.HashMap" id="sysInfoList">
<result property="name" column="name"/>
<result property="value" column="valueOf"/>
</resultMap>
<select id="querySysInfoList" resultMap="sysInfoList">
select name,valueOf from ocs_sysinfo
</select>