我在项目中面临注释/持久性错误,并且持久性库抛出
NullPointerException when trying to resolve the entities (org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.discoverMappedSuperclassesAndInheritanceParents(EntityAccessor.java:224)).
如何调试此类错误以找到有关错误原因的更多信息?
设置断点EntityAccessor
并且编译调试不起作用,编译器本身似乎没有在调试模式下运行。
我正在使用 Netbeans/Java/Maven。
据我了解,您需要在编译中进行调试,而不是在调试模式下进行 Maven 调试。
使用mvn编译,通过以下方式使用debug模式:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>8</source>
<target>8</target>
<debug>true</debug>
<debuglevel>lines,vars,source</debuglevel>
</configuration>
</plugin>
debuglevel 可以是以 CSV 格式输入的三个值中的任意一个
为了突出,debug and 调试级别是maven中包含的重要节点。
希望它能以某种方式有所帮助。
参考:maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)