2 qq 34321506 qq_34321506 于 2016.03.17 10:19 提问

mysql数据库报如下错误,跪求解决

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

--- Cause: com.ibatis.common.beans.ProbeException: Could not get property 'dynamicFields' from com.aspire.ess.domain.Accounts. Cause: java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object;
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];

--- The error occurred in com/aspire/ess/dao/maps/AccountsSQL.xml.

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

--- Check the Accounts.accounts_one.

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

--- Cause: com.ibatis.common.beans.ProbeException: Could not get property 'dynamicFields' from com.aspire.ess.domain.Accounts. Cause: java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object;; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:

--- The error occurred in com/aspire/ess/dao/maps/AccountsSQL.xml.

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

--- Check the Accounts.accounts_one.

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

--- Cause: com.ibatis.common.beans.ProbeException: Could not get property 'dynamicFields' from com.aspire.ess.domain.Accounts. Cause: java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object;
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:120)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:276)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:197)
at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(SqlMapClientTemplate.java:242)
at com.aspire.ess.dao.impl.AccountsDaoImpl.findAccountsOne(AccountsDaoImpl.java:25)
at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy4.findAccountsOne(Unknown Source)
at com.aspire.ess.service.impl.AccountsServiceImpl.queryAccountsOneByUserName(AccountsServiceImpl.java:62)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy10.queryAccountsOneByUserName(Unknown Source)
at com.aspire.ess.interf.epms.GetToken.verifyUserName(GetToken.java:147)
at com.aspire.ess.interf.epms.GetToken.verifyData(GetToken.java:136)
at com.aspire.ess.interf.epms.GetToken.service(GetToken.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:83)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:744)
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:

--- The error occurred in com/aspire/ess/dao/maps/AccountsSQL.xml.

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

--- Check the Accounts.accounts_one.

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

--- Cause: com.ibatis.common.beans.ProbeException: Could not get property 'dynamicFields' from com.aspire.ess.domain.Accounts. Cause: java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object;
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:188)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:566)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:541)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)
at org.springframework.orm.ibatis.SqlMapClientTemplate$1.doInSqlMapClient(SqlMapClientTemplate.java:244)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:194)
... 46 more
Caused by: com.ibatis.common.beans.ProbeException: Could not get property 'dynamicFields' from com.aspire.ess.domain.Accounts. Cause: java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object;
at com.ibatis.common.beans.ComplexBeanProbe.getProperty(ComplexBeanProbe.java:322)
at com.ibatis.common.beans.ComplexBeanProbe.setObject(ComplexBeanProbe.java:218)
at com.ibatis.common.beans.GenericProbe.setObject(GenericProbe.java:90)
at com.ibatis.sqlmap.engine.accessplan.ComplexAccessPlan.setProperties(ComplexAccessPlan.java:34)
at com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.setData(JavaBeanDataExchange.java:112)
at com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.setResultObjectValues(BasicResultMap.java:373)
at com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback.handleResultObject(RowHandlerCallback.java:64)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:382)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:301)
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:190)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
... 52 more
Caused by: java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object;
at com.aspire.ess.domain.BaseDomain.getDynamicFields(BaseDomain.java:128)
at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.ibatis.common.beans.ComplexBeanProbe.getProperty(ComplexBeanProbe.java:309)
... 63 more

1个回答

u011489205
u011489205   2016.03.17 10:32

1.com.aspire.ess.domain.Accounts 这个bean里没有dynamicFields这个属性,或者对应的getter和setter方法。
2.com.aspire.ess.domain.Accounts 没有实现序列化接口。

qq_34321506
qq_34321506 回复SionTiger: 是从测试环境取的表结构
一年多之前 回复
u011489205
u011489205 回复qq_34321506: 会不会是数据库字段有更新过,本地使用的还是原先的库表。
一年多之前 回复
qq_34321506
qq_34321506 会不会与jdk版本有关系,因为在测试环境是OK的,然后部到了现网环境就出错了
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!