0
當iBatis試圖應用結果映射時,會拋出一個BulkBeanException
,但通過同一個jar跨部署不一致(本地很好,服務器部署不是)。net.sf.cglib.beans.BulkBeanException使用iBatis和Spring
我想出如何停止的問題(見我的回答如下),但我更感興趣的是聽到有關戰略來診斷cglibification發生/在不同的運行環境發生了不同。我假設不一致的行爲是由於在該庫被加載順序差異,但還沒有想出如何確認這一點($PATH
和$CLASSPATH
解決,同樣的事情在不同的環境中)。有沒有別的東西,我應該看什麼?
遇到錯誤
java -jar <jar>
在CentOS盒上的OS X
沒有得到錯誤
java -jar <jar>
通過Eclipse- 騾子運行在OS X 通過Eclipse通過Maven的
- 的JUnit在OS X
- 的JUnit在OS X
堆棧跟蹤
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