Value for xxxxx cannot be null
程序员文章站
2022-03-02 14:57:31
...
Value for xxxxx cannot be null
十月 26, 2018 11:44:31 上午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [springmvc] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: Value for parentId cannot be null] with root cause
java.lang.RuntimeException: Value for parentId cannot be null
at com.pinyougou.pojo.TbItemCatExample$GeneratedCriteria.addCriterion(TbItemCatExample.java:95)
at com.pinyougou.pojo.TbItemCatExample$GeneratedCriteria.andParentIdEqualTo(TbItemCatExample.java:178)
at com.pinyougou.pojo.TbItemCatExample$Criteria.andParentIdEqualTo(TbItemCatExample.java:358)
at com.pinyougou.sellergoods.service.impl.ItemCatServiceImpl.findByParentId(ItemCatServiceImpl.java:104)
at com.alibaba.dubbo.common.bytecode.Wrapper7.invokeMethod(Wrapper7.java)
at com.alibaba.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:46)
at com.alibaba.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:72)
at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:53)
at com.alibaba.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:64)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:42)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:78)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:70)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:132)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:38)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:113)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:84)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:170)
at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:52)
at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:82)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
问题:数据查询不到后端报错
分析:问题从mybatis的映射文件开始报错,查询条件为空,sevice层的参数为null
在log4j日志中详细的打印出了哪个值;
解决方法:1)参数名为空值:null
2)参数名写错,或者多写少些写
上一篇: Lua学习中的心得体会
下一篇: 自己寫的分頁存儲過程
推荐阅读
-
php下关于Cannot use a scalar value as an array的解决办法
-
解决Zabbix网页端Get value error: cannot connect to [[192.168.238.139]:10050]: [113] N
-
npm ERR! Cannot read property 'path' of null
-
PHP警告Cannot use a scalar value as an array的解决方法
-
js报错 Cannot read property 'getAttribute' of null
-
cannot find supercluster & native module cannot be null & Xcode build timeout
-
链接服务器"(null)"的 OLE DB 访问接口 "SQLNCLI10" 返回了消息 "Cannot start more transactions on this session."
-
JavaScript Uncaught TypeError: Cannot read property 'value' of null
-
Spring/SpringBoot:SpringBoot中@Value注入失败或取值为null解决方案
-
php下关于Cannot use a scalar value as an array的解决办法