A BulkBeanException
is being thrown when iBatis is attempting to apply a result map, but is not consistent across deployments via the same jar (local is fine, server deployment is not).
I figured out how to stop the problem (see my answer below), but am more interested in hearing about strategies to diagnose why the cglibification happened/happened differently in different runtime environments. I assume the inconsistent behavior is due to differences in the order in which libraries are loaded, but have not figured out how to confirm this ($PATH
and $CLASSPATH
resolved to the same thing in different environments). Is there something else I should be looking at?
Got error
java -jar <jar>
on CentOS box- Mule runtime via Eclipse on OS X
Did not get error
java -jar <jar>
on OS X- JUnit via Maven on OS X
- JUnit via Eclipse on OS X
stack trace
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in ibatis/MyClassName.xml.
--- The error occurred while applying a result map.
--- Check the MyClassName.result.
--- The error happened while setting a property on the result object.
--- Cause: net.sf.cglib.beans.BulkBeanException: 1
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204) ~[mybatis-2.3.5.jar!/:?]
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139) ~[mybatis-2.3.5.jar!/:?]
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:578) ~[mybatis-2.3.5.jar!/:?]
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:552) ~[mybatis-2.3.5.jar!/:?]
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118) ~[mybatis-2.3.5.jar!/:?]
at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:298) ~[mybatis-2-spring-1.0.1.jar!/:1.0.1]
at org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:296) ~[mybatis-2-spring-1.0.1.jar!/:1.0.1]
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203) ~[mybatis-2-spring-1.0.1.jar!/:1.0.1]
... 77 more