Getting “Method too large” error. Is there a limit on the size of a procedure?

When compiling my procedure I get the following error:

Error
HTTP Status 400 () (while updating a Procedure):

com.accessg2.ag2rs.execution.reference.compile.failed: The code for : bigProcedure could not be compiled. This should be reported to [email protected].

The compilation error is: startup failed: General error during class generation:

Method too large: io/vantiq/procedures/_kl_play/bigProcedure$_execute_closure1$_closure2.doCall (Ljava/lang/Object;)Ljava/lang/Object; groovyjarjarasm.asm.MethodTooLargeException:

Method too large: io/vantiq/procedures/_kl_play/bigProcedure$_execute_closure1$_closure2.doCall (Ljava/lang/Object;)Ljava/lang/Object; at groovyjarjarasm.asm.MethodWriter.computeMethodInfoSize(MethodWriter.java:2084) at groovyjarjarasm.asm.ClassWriter.toByteArray(ClassWriter.java:447) at org.codehaus.groovy.control.CompilationUnit$18.call(CompilationUnit.java:845) at org.codehaus.groovy.control.CompilationUnit$18.call(CompilationUnit.java:860) at

 

Posted: June 23, 2020 at 6:11 pm
Replies: 1
Jun 23, 2020
Posted by Ken

There is no documented size limitation for a VAIL procedure because doing so would be difficult. Internally, Groovy code is generated from the VAIL code in your procedure.  However, the problem with declaring an exact size limitation is that there is not a 1 to 1 relationship between VAIL and the generated Groovy.

For what it is worth, the Groovy limit for a method is 64Kb.  But, depending upon your VAIL code, that limit might be reached after 900 lines of VAIL code or, maybe, 1,200 lines of VAIL code.

 

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
© Vantiq 2024 All rights reserved  •  Vantiq Corporation’s Privacy Policy and Cookie Policy