CompilationException Code attribute grows beyond 64 KB

CompilationException Code attribute grows beyond 64 KB

book

Article ID: KB0074811

calendar_today

Updated On:

Products Versions
TIBCO Streaming 7

Description

Migrating an application to a later release results in a compilation exception from any command which causes compilation (sbd, sbargen, epadmin start node, etc.).

The error appears as (example):
ERROR [2015-04-10 10:53:23:657] [main] [SBARGenerator] - CompilationException: JaninoRuntimeException: Code attribute "op__is_Control_Tick__0" in class "cm.__Customer_Pricing_Common_In_7002Esbapp_.sbd_1428659532241_34___R_F_Q_Deco38bb4501daf07027cde7ebc9e4134bba0e9cac05DIG_" grows beyond 64 KB

Issue/Introduction

CompilationException Code attribute grows beyond 64 KB

Resolution

This error indicates that your application has one or more expressions which could not compile down to under 64KB of Java bytecode. 

The 64K limit is a hard limit present in all Java implementations. It is possible to write EventFlow expressions which cross this limit, particularly if the input schema is wide (100+ top-level fields) and deep (3+ levels of nested tuple fields or lists-of-tuple).

Possible solutions are:
  1. Refactor large expressions or a Map with many expressions by taking some expressions out and calculating them in a seconds Map (splitting the work done by one operator into two).
  2. Reduce the schema size by making use of a Query Table or a capture field to store fields that do not participate in calculations but only need to be passed through. Pick up these field values at the end of the flow.
  3. Add system properties to the jvm-args in the server configuration:
  • streambase.codegen.allow-refactoring=true
  • streambase.codegen.n-stmts-limit=200
---
If you see this exception when a compiling or loading a LiveView table, contact the Support Team for assistance.
---