-
Bug
-
Resolution: Duplicate
-
Critical
-
None
-
prod
I tried to run below commands in script console, which fixed my issue for a while but when I start a new build and restart pipeline it throws same "Method too large" error. I want them to add as part of my declarative Jenkinsfile or set as global variables. I tried few ways to do it, unfortunately am not successful with it.
We have a declarative Jenkinsfile of 1690 lines. which cannot be broken more small. we declared and called functions wherever possible.
Its a blocker for us now.
Please guide me to resolve this error at the earliest.
- duplicates
-
JENKINS-37984 org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: General error during class generation: Method code too large! error in pipeline Script
-
- Open
-
prams_n I'm afraid you'll need to find a way to reduce the size of the Pipeline script. The message indicates that the Java code generated for the Pipeline class is more than Java allows for a single class. The details are described in JENKINS-37984.
We close duplicate issues with a pointer to the issue that they duplicate. JENKINS-37984 is the original issue that contains all the details.