I am facing annotation/persistence errors in a project and the persistence library throws a
NullPointerException when trying to resolve the entities (org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.discoverMappedSuperclassesAndInheritanceParents(EntityAccessor.java:224)).
How do I debug errors like these to find more about the cause of the error?
Setting a breakpoint in EntityAccessor
and compiling for debug doesn't work, the compiler itself seems to be not running in debug mode.
I am using Netbeans / Java / Maven.
From what I understand, you want debug in the compilation- not maven in debug mode.
Using mvn to compile, use debug mode through following way:
<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 can be any of the three values entered in CSV format To highlight, debug and debuglevel are important nodes included in the maven.
Hope it helps in some way.
Reference: maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With