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: ...
随机推荐
- webpack里CommonJS的require与ES6 的module.exports加载模块有何不同
只需明白commonjs的规则即可,import会被转化为commonjs格式的,babel默认会把ES6的模块转化为commonjs规范的. import vue from 'vue'; //等价于 ...
- 关于yii的日志路由组件的配置问题
最近突然意识到日志是很好滴debug工具,所以研究了一下yii的日志配置,想想应该还会有像我这样的小白不懂这些问题的,就分享一下了.有错误烦请大神们指出config/main.php 中配置,这个想必 ...
- C#获取路由器外网IP,MAC地址
C#实现的获取路由器MAC地址,路由器外网地址.对于要获取路由器MAC地址,一定需要知道路由器web管理系统的用户名和密码.至于获取路由器的外网IP地址,可以不需要知道路由器web管理系统的用户名和密 ...
- Eclipse jar包源码下载
在使用intelliJ的时候,可以在IDE中直接下载jar包: Eclipse也可以!就是插件Java Source Attacher 这个插件是放在eclipse安装目录的dropins目录下.重启 ...
- XSS与CSRF攻击
一.XSS Cross Site Script,跨站脚本攻击.是指攻击者在网站上注入恶意客户端代码,通过恶意脚本对客户端网页进行篡改,从而在用户浏览网页时,对用户浏览器进行控制或者获取用户隐私数据的一 ...
- WPF案例:如何设计搜索框(自定义控件的原则和方法)
我们平时自定义WPF控件的方法有:Style,DataTemplate,ControlTemplate, DependencyProperty, CustomControl等几个方法. 按照优先顺序应 ...
- 关键字break代码优化片段
$data=array(); //循环页面 foreach($config_content['pages'] as $page_type_key=>$page_type_val){ if($pa ...
- Java 8新增的日期、时间格式器
一 获取DateTimeFormatter对象的三种方式 直接使用静态常量创建DateTimeFormatter格式器 使用代码不同风格的枚举值来创建DateTimeFormatter格式器 根据模式 ...
- Set,Sorted Set相关命令操作,批量插入及管道,事务
Set SADD key member [member ...] 向key指定的set集合添加成员,次集合是排重的,从2.4版本后才支持添加多个如果key不存在则创建key以及set集合返回当前操作成 ...
- CreateMutex实现只能打开一个客户端
#include "stdafx.h" #include <Windows.h> #include <iostream> using namespace s ...