debug---null Pointer Exception--一步步查找(1)
找到对应的226行代码:
通过debug打断点,然后选中需要查看的代码,右击,选择Evaluate Expresstion,选择确认,就可以弹出具体的值,发现真的为null。
通过simon帮忙分析,原因:
kathasis是通过AbstractRepository这个抽象类进去执行findAll或者findOne,而在我的task中,我需要使用到PartyLocation这个类,因此需要使用到PartyLocation这个Repository,但是,我没有写。
查看上面的异常信息,其实,ApiContextImpl是kathasis底层的代码,我压根没写,以上异常信息并没有报关于我写的代码的异常,因此是kathasisi框架内部哪些规范未满足,最后,simon通过对比他的task,最后确认是,少了PartyLocationRepository这个实体类。
debug---null Pointer Exception--一步步查找(1)的更多相关文章
- java NPE就是空指针异常,null pointer exception
java NPE就是空指针异常,null pointer exception
- JDK1.6 Java.lang.Null.Pointer.Exception
先来看一下JDK1.6的API: NullPointerException (Java Platform SE 6) public class NullPointerException extends ...
- servlet service() for servlet jsp throws null pointer exception
这么一件小事折腾了一个多小时,google也上不去,对百度我就不吐槽什么了,最后用bing查出了满意的结果.一般程序中不要显式把jsp.jar和servlet.jar放在Lib目录下,因为tomcat ...
- Unable to handle kernel NULL pointer dereference at virtual address 00000000【转】
本文转载自:https://blog.csdn.net/hpu11/article/details/72628052 这说明是非法指针的使用,才导致系统出错. [ 1023.510000] Unabl ...
- org.springframework.dao.InvalidDataAccessApiUsageException: The given id must not be null!; nested exception is java.lang.IllegalArgumentException: The given id must not be null
通过这个简单的案例,手把手教给你分析异常信息(适合初学者看) org.springframework.dao.InvalidDataAccessApiUsageException: The given ...
- 【Unity3D】中的空引用 Null Reference Exception
Null Reference Exception : Object reference not set to an instance of an object. 异常:空引用,对象的引用未设置到对象的 ...
- c/c++ 重载 数组 操作符[] operator[ is ambiguous, as 0 also mean a null pointer of const char* type.
// Note: //int x = a[0].GetInt(); // Error: operator[ is ambiguous, as 0 also mean a null pointer of ...
- Null Pointer --设计模式
在Joshua Bloch很有名的一本书<Effective in java>中建议不要在代码中返回空的collection/map/array,就像下面的代码一样: public Lis ...
- differences between null pointer and void pointer.
These are two different concepts, you cannot compare them. What the difference between the skunk and ...
- leetcode 编译问题:Line x: member access within null pointer of type 'struct TreeNode'
参考: LEETCODE 中的member access within null pointer of type 'struct ListNode' 解决 leetcode 编译问题:Line x: ...
随机推荐
- 关于/usr/bin/ld: cannot find -lcrypto 的错误
Linux下 build code 时,要做 -lssl, -lcrypto 的链接,出现类似下面的错误: /usr/bin/ld: cannot find -lcrypto /usr/bin/ld: ...
- np.unique 的实现
1. 简单实现 import numpy as np def unique(ar): perm = ar.argsort() aux = ar[perm] flag = np.concatenate( ...
- BZOJ- 2733: 永无乡 (并查集&线段树合并)
题意:给定N个节点,K次操作,操作有两种,1是合并两个集合,2是求某个集合的第K大(从小到大排序). 思路:合并只要启发式即可.此题可以用线段树,保存1到N的排序的出现次数和. 复杂度O(NlogN) ...
- 【scrapy实践】_爬取安居客_广州_新楼盘数据
需求:爬取[安居客—广州—新楼盘]的数据,具体到每个楼盘的详情页的若干字段. 难点:楼盘类型各式各样:住宅 别墅 商住 商铺 写字楼,不同楼盘字段的名称不一样.然后同一种类型,比如住宅,又分为不同的情 ...
- 【转载】BusyBox 简化嵌入式 Linux 系统
原文网址:http://www.ibm.com/developerworks/cn/linux/l-busybox/ BusyBox 是很多标准 Linux® 工具的一个单个可执行实现.BusyBox ...
- POJ1456:Supermarket(并查集版)
浅谈并查集:https://www.cnblogs.com/AKMer/p/10360090.html 题目传送门:http://poj.org/problem?id=1456 堆作法:https:/ ...
- STM32中printf重定向到串口
学习STM32过程中,经常打交道的莫过于串口,你可以将任何信息,当然重要的是调试信息打印到串口中输出,总是用一个字节发送函数或者字符串发送函数 总是有些不放便,之前编程中熟悉的莫过于printf了,下 ...
- 浅谈NB_LOT和LTE CAT M1
1.什么是NB-IoT? 窄带物联网(NB-IoT)也被称为LTE Cat NB1也是一种低功耗广域(LPWA,Low Power Wide Area)技术,它已经开发出来,可以使用现有的移动网络将各 ...
- java.nio.ByteBuffer中flip、rewind、clear方法的区别
对缓冲区的读写操作首先要知道缓冲区的下限.上限和当前位置.下面这些变量的值对Buffer类中的某些操作有着至关重要的作用: limit:所有对Buffer读写操作都会以limit变量的值作为上限. p ...
- spring--AOP--日志---demo1---bai
AOP日志DEMO1: 实体类: package com.etc.entity; import org.aspectj.lang.annotation.Pointcut; public class U ...