java.lang.ClassCastException: [B cannot be cast to java.lang.String

7708 단어 버그 디버깅
java.lang.ClassCastException: [B cannot be cast to java.lang.String
오류 코드 행:
public int addZTIncome(ZTIncome ztIncome) {
   return insert(ztIncome);
}

오류:
[ERROR]/qfang-trade/oracleEBS/transfer java.lang.ClassCastException: [B cannot be cast to java.lang.Stringat com.qfang.model.uitl.EntityUtil.isIdEmpty(EntityUtil.java:17)at com.qfang.dao.impl.DefaultBaseDaoImpl.insert(DefaultBaseDaoImpl.java:80)at com.qfang.ebs.dao.trade.impl.ZTIncomeDaoImpl.addZTIncome(ZTIncomeDaoImpl.java:30)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)at com.sun.proxy.$Proxy560.addZTIncome(Unknown Source)at com.qfang.ebs.service.trade.impl.ZTIncomeServiceImpl.addZTIncome(ZTIncomeServiceImpl.java:44)at com.qfang.ebs.service.trade.impl.ZTIncomeServiceImpl.lambda$addZTIncomeReportId$0(ZTIncomeServiceImpl.java:32)at com.qfang.ebs.service.trade.impl.ZTIncomeServiceImpl$$Lambda$73/182817023.accept(Unknown Source)at java.util.ArrayList.forEach(ArrayList.java:1249)at com.qfang.ebs.service.trade.impl.ZTIncomeServiceImpl.addZTIncomeReportId(ZTIncomeServiceImpl.java:30)at com.qfang.ebs.service.trade.impl.ZTIncomeServiceImpl.onZTIncomeCreate(ZTIncomeServiceImpl.java:63)at com.qfang.event.finance.CreateZTIncomeEventListener.onApplicationEvent(CreateZTIncomeEventListener.java:14)at com.qfang.event.finance.CreateZTIncomeEventListener.onApplicationEvent(CreateZTIncomeEventListener.java:11)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)at com.sun.proxy.$Proxy561.onApplicationEvent(Unknown Source)at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163)at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136)at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381)at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)at com.qfang.service.trade.impl.EBSCommissionSettlementServiceImpl.lambda$addEBSCommission$0(EBSCommissionSettlementServiceImpl.java:103)at com.qfang.service.trade.impl.EBSCommissionSettlementServiceImpl$$Lambda$50/1049607060.accept(Unknown Source)at java.util.Arrays$ArrayList.forEach(Arrays.java:3880)at com.qfang.service.trade.impl.EBSCommissionSettlementServiceImpl.addEBSCommission(EBSCommissionSettlementServiceImpl.java:93)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)at com.sun.proxy.$Proxy554.addEBSCommission(Unknown Source)at com.qfang.trade.controller.ebs.EBSContractController.transfer(EBSContractController.java:39)at sun.reflect.GeneratedMethodAccessor395.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:497)at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:817)at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:731)at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:859)at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844)at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)at org.mortbay.jetty.Server.handle(Server.java:326)at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
오류 원인:
ZTIncome 객체에 주 키를 설정하지 않았습니다.

좋은 웹페이지 즐겨찾기