debug---null Pointer Exception--一步步查找(2)
添加PartyLocationRepository后,再次在Ubuntu中编译项目,再次报空指针异常。

直接在createDto处打断点,然后debug每个表达式的值,找出来到底是哪个为null。

经过分析,发现是this.getConverter()为null,而这个Converter是和PartyLocationEntity以及PartyLocationDto对应的。因此,这里还需要写个PartyLocationEntity和PartyLocationDto关联的PartyLocationConver类。
PartyLocationConver完成后,则对应实现PersonToPartyLocationRelationship。
debug---null Pointer Exception--一步步查找(2)的更多相关文章
- 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: ...
随机推荐
- const指针和指向const的指针
int *const p=&a; 这是const指针,这种指针必须在定义时就给出它所指向的地址,否则会error:uninitialized const 'p'.const指针的指针本身是co ...
- jquery 获取所有父元素
最终结果: 代码: <!DOCTYPE html> <html> <head> <style> b, span, p, html body { padd ...
- Linux中sort和uniq关于排序去重的那些用法
相信在Linux下对文件操作经常会用到sort和uniq命令,下面系统的介绍一下这两个命令的用法. sort命令是在Linux里非常有用,它将文件进行排序,并将排序结果标准输出.sort命令既可以从特 ...
- CodeForces - 896D :Nephren Runs a Cinema(卡特兰数&组合数学---比较综合的一道题)
Lakhesh loves to make movies, so Nephren helps her run a cinema. We may call it No. 68 Cinema. Howev ...
- Two Cakes
It's New Year's Eve soon, so Ivan decided it's high time he started setting the table. Ivan has boug ...
- 伪元素after,before,css/js控制样式
CSS<style> body { font: 200%/1.45 charter; } ref::before { content: '\00A7'; letter-spacing: . ...
- inotify 同步脚本
#!/bin/bash path1=/home/htoa/tomcat/webapps/ROOT/htoa/ ip=192.168.30.13 /usr/bin/inotifywait -mrq -- ...
- linux 内存释放命令
我使用的是CentOS 6.5 ,由于卸载Solr 后发现内存占用挺多的,我想释放一下内存,就查阅了一些资料,分享给大家: 1.free -m 查看内存的使用情况,-m表示单位是兆 2.echo 1 ...
- JAVA中数值的表示
1.Java中用补码形式表示 2.第一位正负位,1表示负,0表示正. 3.原码:一个数的二进制表示. 3的原码00000011 -3的 原码 10000011 4 ...
- tomcat 基础知识学习
1: 直接将web项目文件件拷贝到webapps 目录中,Tomcat的Webapps目录是Tomcat默认的应用目录,当服务器启动时,会加载所有这个目录下的应用,所以可以将JSP程序打包成一个 wa ...