Hi Folks I am facing this issue, Does anybody help...
# cfml-general
r
Hi Folks I am facing this issue, Does anybody help me on this The error message you provided seems to be related to a specific class file called "test" and a method called "funcPOPULATEDATA." The error is indicating that there is an issue with the method code length, specifically mentioning a length of 69012. Additionally, the error message mentions a null value, which might be related to the problem. Thanks in advance🙂
t
There's an underlying Java limit that the code in a single function can't be more than 65535 bytes... take your really long function and split it up into smaller ones.
☝️ 3
🙏 1
☝🏻 1
1
m
Yeah, what Tim said. That method is likely WAY TOO BIG.
As Adam might say "A method should *do one thing.*"
t
and that thing should not be "be 2000 lines" 😉
r
Hi Mark & Tim, I've split the single function into the smaller ones, still I am facing the issue 👀
t
is it still saying the method length is 69012? Or has that shrunk? Is it still over 65535?
r
Yeah Tim after split I am seeing the bytes issue
I've moved some functions into another cfc file and extend the new file with this one, I am seeing the bytes issue at that time
t
the error message is complaining that the function called
populateData
is too long. So it's that function specifically that you need to split up. I don't think you need to split up the cfc it's in. You just need like
populateDataPart1
and
populateDataPart2
(or better yet, some logical division based on the type of data --
populateUserData
,
populateConfigData
, etc.)
🙏 1
r
Thanks Tim
It was working fine 🙌 Thanks Tim & Mark for your valuable time and suggestion...
👍 1
m
Haha that was all Tim, but glad it got running 🙂
🙏 1