I’m attempting to help a client who is getting a ClassFormatError. The error message says
bytecode array size > 65535 at offset=66370
The stack trace indicates that the error occurs when trying to call a static method in a utility class. I cannot reproduce the error on my own system.
I tried Googling the issue (search=classformaterror “bytecode array size”, quotes included) and found bug reports for other software, but nothing helpful. I also tried searching here, but couldn’t find results involving this particular error message. (Maybe I just failed to find them…)
Any idea what may be causing this issue? I can’t post code or the actual stack trace because it’s proprietary.
Thanks in advance for any pointers you can give me on where to look.
That suggests the utility class method is basically too big, and needs splitting up. Different compilers will output different amounts of code – and I guess it’s also possible that different VMs enforce the constraints more or less strictly.
Additionally, you may find that compiling the utility class without debug information will get the method under the limit – but it would be better to just split it up.