tangchunqing 2017-01-22 08:25 采纳率: 0%
浏览 2166

ibatis转换的一个问题

2016-10-15 17:18:39,162 ERROR (com.test.framework.progress.utils.ProgressUtils:126) - poolTaskExecutor 线程池:SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];

--- The error occurred in com/test/framework/dao/ibatis2/ibatis.xml.

--- The error occurred while applying a result map.

--- Check the com.test.lol.code.sql.selectCodeInfoByCond-AutoResultMap.

--- The error happened while setting a property on the result object.

--- Cause: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be cast to java.lang.Long; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:

--- The error occurred in com/test/framework/dao/ibatis2/ibatis.xml.

--- The error occurred while applying a result map.

--- Check the com.test.lol.code.sql.selectCodeInfoByCond-AutoResultMap.

--- The error happened while setting a property on the result object.

--- Cause: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be cast to java.lang.Long

org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];

--- The error occurred in com/test/framework/dao/ibatis2/ibatis.xml.

--- The error occurred while applying a result map.

--- Check the com.test.lol.code.sql.selectCodeInfoByCond-AutoResultMap.

--- The error happened while setting a property on the result object.

--- Cause: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be cast to java.lang.Long; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:

--- The error occurred in com/test/framework/dao/ibatis2/ibatis.xml.

--- The error occurred while applying a result map.

--- Check the com.test.lol.code.sql.selectCodeInfoByCond-AutoResultMap.

--- The error happened while setting a property on the result object.

--- Cause: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be cast to java.lang.Long
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203)
at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:243)
at com.test.framework.dao.ibatis2.Ibatis2SqlMapClientTemplate.query4VCommList(Ibatis2SqlMapClientTemplate.java:129)
at com.test.framework.dao.ibatis2.Ibatis2SqlMapClientTemplate.queryForVCommList(Ibatis2SqlMapClientTemplate.java:225)
at com.test.lol.code.service.CodeServiceImpl.selectCodeInfoByCond(CodeServiceImpl.java:2508)
at com.test.lol.code.service.CodeServiceImpl$$FastClassByCGLIB$$740dee32.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:42)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:55)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
at com.test.lol.code.service.CodeServiceImpl$$EnhancerByCGLIB$$ab958bb2.selectCodeInfoByCond()
at com.test.lol.code.action.CodeAction.selectCodeInfoByCond(CodeAction.java:243)
at com.test.lol.code.action.ExportallAction.category(ExportallAction.java:306)
at com.test.lol.code.action.ExportallAction.exportyAll(ExportallAction.java:274)
at com.test.lol.code.action.ExportallAction$1.execute(ExportallAction.java:221)
at com.test.framework.progress.utils.ProgressUtils$2.run(ProgressUtils.java:124)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:

--- The error occurred in com/test/framework/dao/ibatis2/ibatis.xml.

--- The error occurred while applying a result map.

--- Check the com.test.lol.code.sql.selectCodeInfoByCond-AutoResultMap.

--- The error happened while setting a property on the result object.

--- Cause: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be cast to java.lang.Long
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
at com.test.framework.dao.ibatis2.Ibatis2SqlMapClientTemplate$1.doInSqlMapClient(Ibatis2SqlMapClientTemplate.java:131)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:200)
... 26 more
Caused by: net.sf.cglib.beans.BulkBeanException: java.lang.String cannot be cast to java.lang.Long
at com.test.lol.code.valueobject.CodeInfo$$BulkBeanByCGLIB$$80c55f8f.setPropertyValues()
at com.ibatis.sqlmap.engine.accessplan.EnhancedPropertyAccessPlan.setProperties(EnhancedPropertyAccessPlan.java:33)
at com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.setData(JavaBeanDataExchange.java:112)
at com.ibatis.sqlmap.engine.mapping.result.ResultMap.setResultObjectValues(ResultMap.java:371)
at com.ibatis.sqlmap.engine.mapping.result.AutoResultMap.setResultObjectValues(AutoResultMap.java:54)
at com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback.handleResultObject(RowHandlerCallback.java:64)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:385)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:300)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189)
at com.test.framework.dao.ibatis2.LimitSqlExecutor.executeQuery(LimitSqlExecutor.java:82)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
... 32 more
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
... 44 more

  • 写回答

1条回答 默认 最新

  • tangchunqing 2017-01-22 08:24
    关注

    研究很久了 也没研究出来,像是ibatis的BUG

    评论

报告相同问题?

悬赏问题

  • ¥188 寻找能做王者评分提取的
  • ¥15 matlab用simulink求解一个二阶微分方程,要求截图
  • ¥30 matlab解优化问题代码
  • ¥15 写论文,需要数据支撑
  • ¥15 identifier of an instance of 类 was altered from xx to xx错误
  • ¥100 反编译微信小游戏求指导
  • ¥15 docker模式webrtc-streamer 无法播放公网rtsp
  • ¥15 学不会递归,理解不了汉诺塔参数变化
  • ¥15 基于图神经网络的COVID-19药物筛选研究
  • ¥30 软件自定义无线电该怎样使用