com.sun.jdi.InvocationException occurred invoking method

前端 未结 16 1239
迷失自我
迷失自我 2020-12-13 01:38

I just want to create an object of class, but got this error when debugging. Can anybody tell me what the problem is? The location of this code is in some Spring(2.5) Servic

16条回答
  •  一向
    一向 (楼主)
    2020-12-13 02:11

    I also had a similar exception when debugging in Eclipse. When I moused-over an object, the pop up box displayed an com.sun.jdi.InvocationException message. The root cause for me was not the toString() method of my class, but rather the hashCode() method. It was causing a NullPointerException, which caused the com.sun.jdi.InvocationException to appear during debugging. Once I took care of the null pointer, everything worked as expected.

提交回复
热议问题