CDV ❯ Server crashes with IllegalArgumentException
-
Bug
-
Status: Closed
-
2 Major
-
Resolution: Fixed
-
DSO:L2
-
-
nrana
-
Reporter: jsamarziya
-
June 09, 2009
-
0
-
Watchers: 3
-
August 20, 2009
-
June 10, 2009
Attachments
Description
An overflow bug exists in PhysicalStateClassLoader#createGetObjectReferencesMethod (line 551). When the number of fields in a managed object is sufficiently large, the generated getObjectReferences() method attempts to invoke the HashSet constructor with an overflowed byte value. This results in a server crash when retrieval of the managed object is attempted.
java.lang.IllegalArgumentException: Illegal initial capacity: -128
at java.util.HashMap.
Comments
Tim Eck 2009-06-09
Jeffrey Samarziya 2009-06-09
Yeah, we have a set of business objects that are generated from database schema metadata, and some of those have hundreds of fields. I just eventually happened upon the problem.
Fiona OShea 2009-06-10
Tim, think you have a workaround for this.
Tim Eck 2009-06-10
This is “partially” fixed. The new upper limit on fields should be ~1927 (as opposed to 127 before). There are more things to fix to get the limit to the class file supported max (which is 64k I believe)
Nitin Rana 2009-08-20
verified in 3.1 rev 13427 and trunk rev 13435
great find Jeffery! thanks for all the detail. Fix is easy, just need use a LDC instead there.
Did you happen upon this naturally with a real world class with that many fields, or some sort of benchmark testing? Just curious