Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » StackOverflowError Ending in DatabaseField.equals(Need help with root cause for StackOverflowError)
StackOverflowError Ending in DatabaseField.equals [message #1816885] Sun, 10 November 2019 12:09 Go to next message
Narunart Kitiyakara is currently offline Narunart KitiyakaraFriend
Messages: 3
Registered: December 2018
Junior Member
We just started getting a StackOverflowError from EclipseLink, and unfortunately the stack trace doesn't go far enough to show me what part of our code was the root cause (or at least what our code was doing when it happened). Are there any ideas of what might cause a stack trace like the one below (it's all HashMap:1877 below there and cuts off before hitting anything else)?

Some additional information: This code base had been running for at least a week before this happened (and I doubt the code that was using the database has changed for a long time before that, as we haven't been fiddling with that particular project recently), but we did upgrade from Postgres 9.x to 11.x yesterday morning. The service that had this error was restarted after the upgrade, though, and it ran happily for a good 18 hours before this started happening. I restarted the service again after seeing this error and it hasn't happened again, but it's only been an hour or so.

java.lang.StackOverflowError
at org.eclipse.persistence.internal.helper.DatabaseField.equals(DatabaseField.java:241)
at org.eclipse.persistence.internal.helper.DatabaseField.equals(DatabaseField.java:224)
at java.util.HashMap$TreeNode.find(HashMap.java:1867)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
at java.util.HashMap$TreeNode.find(HashMap.java:1877)
Re: StackOverflowError Ending in DatabaseField.equals [message #1817223 is a reply to message #1816885] Mon, 18 November 2019 16:23 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
I can't explain it either, it would be as if some map experienced a break down of the hash operation, such that multiple objects are being put into the same hashMap using a new instance of a DatabaseField that represents the same field. Since it is using a DatabaseField as the key, it must be within EclipseLink's code somewhere. Unless you can easily spot places where maybe you are using dynamic entities, customizers or even multi tenancy options that might be adding fields to descriptors keyed on the same DB field, I would guess you need a code profiler to be able to track this down. Also verify you aren't keeping EntityManagers open for extended periods.

Best Regards,
Chris
Re: StackOverflowError Ending in DatabaseField.equals [message #1817231 is a reply to message #1817223] Mon, 18 November 2019 17:57 Go to previous message
Narunart Kitiyakara is currently offline Narunart KitiyakaraFriend
Messages: 3
Registered: December 2018
Junior Member
We are doing multi-tenancy, with a schema per tenant, although this didn't appear to be an issue before we upgraded Postgres. Unfortunately, the issue has only ever happened on our production servers, so profiling the code would be challenging at best. I did try upgrading to the latest Postgres JDBC driver on Friday (we were behind by a few versions), though, and the issue hasn't happened again so far. Hopefully that's all that will be required to stop this from happening again.
Previous Topic:EclipseLink Dialect For MariaDB 10.3.* / . 10.4.*
Next Topic:OptimisticLockException activated batch-writing
Goto Forum:
  


Current Time: Tue Sep 24 21:58:18 GMT 2024

Powered by FUDForum. Page generated in 0.03984 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top