本文主要是介绍TKmybatis 空指针异常,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
2020-06-16 22:05:15.706 INFO [bootstrap,fda5efa790a39879,dbdeebe931e3b033,false] 16573 --- [XNIO-2 task-1] c.sendinfo.yearcard.biz.YearCardTeamBiz : 查询团队开卡异常
java.lang.NullPointerException: nullat org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:150)at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:152)at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:85)at com.sun.proxy.$Proxy421.select(Unknown Source)at com.sendinfo.core.biz.BaseBiz.list(BaseBiz.java:76)at com.sendinfo.yearcard.biz.YearCardTeamBiz.checkTeamYearcardStatusTask(YearCardTeamBiz.java:92)at com.sendinfo.yearcard.biz.YearCardTeamBiz$$FastClassBySpringCGLIB$$d9f6b238.invoke(<generated>)at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:669)at com.sendinfo.yearcard.biz.YearCardTeamBiz$$EnhancerBySpringCGLIB$$14c7f665.checkTeamYearcardStatusTask(<generated>)at com.sendinfo.yearcard.rpc.YearCardServiceImp.checkTeamYearcardStatusTask(YearCardServiceImp.java:387)at com.sendinfo.yearcard.rpc.YearCardServiceImp$$FastClassBySpringCGLIB$$ac4046c3.invoke(<generated>)at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:669)at com.sendinfo.yearcard.rpc.YearCardServiceImp$$EnhancerBySpringCGLIB$$51b462e6.checkTeamYearcardStatusTask(<generated>)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:498)at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
头一次用TKmybatis , 报了这个错,一脸懵逼
奇怪的点是测试环境不报错,生产环境报错。所以一开始我是怀疑环境问题。
后来问了下其他同事发现是: 生产环境的表少了字段导致的,加上字段后就好了。
这里坑的点是错误信息不明确,当然自己也没有用TKmybatis 的经验,特此记录一下
这篇关于TKmybatis 空指针异常的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!