https://issues.apache.org/jira/browse/OPENJPA-2722
I am facing StackOverflow error in my application. I am inserting large amount of data approx 20000 entities. Around 6 entities are involved with different relationship like one to many, many to one, one to one. Version: OpenJPA 2.4.2 persistence.xml <property name="openjpa.RuntimeUnenhancedClasses" value="supported"/> <property name="openjpa.DataCache" value="true(CacheSize=1000)"/> <property name="openjpa.QueryCache" value="true(CacheSize=1000)" /> <property name="openjpa.ConnectionProperties" value="MaxActive=25,MaxIdle=10,MinIdle=5,MaxWait=60000" /> Running it on Tomcat 8.0.43, JDK1.8.0_144 Error: java.lang.StackOverflowError java.security.AccessController.doPrivileged(Native Method) org.apache.openjpa.enhance.Reflection.getDeclaredField(Reflection.java:280) org.apache.openjpa.enhance.Reflection.findField(Reflection.java:259) org.apache.openjpa.enhance.xx$xxx$xxxxxxx$xx$entity$TableModDPSet$pcsubclass.pcProvideField(Unknown Source) org.apache.openjpa.kernel.StateManagerImpl.provideField(StateManagerImpl.java:3240) org.apache.openjpa.kernel.SaveFieldManager.isFieldEqual(SaveFieldManager.java:189) org.apache.openjpa.kernel.StateManagerImpl.dirtyCheck(StateManagerImpl.java:939) org.apache.openjpa.kernel.ManagedCache.dirtyCheck(ManagedCache.java:302) -- Sent from: http://openjpa.208410.n2.nabble.com/OpenJPA-Users-f208411.html