I am getting error "java.lang.OutOfMemoryError: GC overhead limit exceeded" while deleting 500 object in loop(in one Transaction only). I had also verified my code and making sure that all the objects are getting dereferenced. I had also tried to increased the heap size then also it's giving me an same error. So to find out which object is consuming more memory, i had used "JProfiler" and "visualvm", both the tools gave me same result; "ChangeObjectSet" which is class of eclipse link(2.5.2) consuming more memory, also tried with newer version of eclipse link still getting the same error.
Stacktrace:
Thank you in advance for any help you can provide.