ibatisクエリエラー:Could not set result class.
詳細
ibatisでクエリーを作成すると、このようなエラーが発生しました.
長い間調べていたら、プロファイルが間違っていたことに気づきました!
その中のresultClassをresultMapに変更すると、エラーはなくなります!
ibatisでクエリーを作成すると、このようなエラーが発生しました.
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.ccutsesms.mis.service.QueryThesisService.(QueryThesisService.java:13)
at test.com.ccutsesms.mis.util.TestQueryThesis.testGetAll(TestQueryThesis.java:49)
at test.com.ccutsesms.mis.util.TestQueryThesis.main(TestQueryThesis.java:61)
Caused by: java.lang.RuntimeException: Could not initialize DaoConfig.
Cause: com.ibatis.dao.client.DaoException: Error while configuring DaoManager. Cause: com.ibatis.common.exception.NestedRuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not set result class. Cause: java.lang.ClassNotFoundException: Record.recordMap
Caused by: java.lang.ClassNotFoundException: Record.recordMap
Caused by: com.ibatis.sqlmap.client.SqlMapException: Error. Could not set result class. Cause: java.lang.ClassNotFoundException: Record.recordMap
Caused by: java.lang.ClassNotFoundException: Record.recordMap
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not set result class. Cause: java.lang.ClassNotFoundException: Record.recordMap
Caused by: java.lang.ClassNotFoundException: Record.recordMap
Caused by: com.ibatis.sqlmap.client.SqlMapException: Error. Could not set result class. Cause: java.lang.ClassNotFoundException: Record.recordMap
Caused by: java.lang.ClassNotFoundException: Record.recordMap
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not set result class. Cause: java.lang.ClassNotFoundException: Record.recordMap
Caused by: java.lang.ClassNotFoundException: Record.recordMap
......
長い間調べていたら、プロファイルが間違っていたことに気づきました!
その中のresultClassをresultMapに変更すると、エラーはなくなります!