2 Replies Latest reply on Mar 6, 2012 1:17 AM by byrne_wayne

    Java code exceeding 65535 byte limit

    bob cole
      I'm trying to record a medium-length script in OpenScript. It has 8 step groups, some of them are nested. It's not really that long or extensive of a script.
      At one point during recording OpenScript just locks up for about 30 seconds. Then, when it comes back the screen flashes strangely a few times and the recording continues.

      When I play back the script, at the point in the playback where it locked up during record, the script just pauses all by itself. I can press the resume button and I immediately get an error message and the script fails. The message is
      Script exception occurred.  An unexpected exception occurred in the script.  Script section: unspecified.

      Looking at the properties of the error I see more detail...
      Caused by: java.lang.Error: Unresolved compilation problem:   The code of method run() is exceeding the 65535 bytes limit.

      I didn't see any documentation regarding code limits. This isn't an exceptionally long or complicated script. And, in my application, it's one "user transaction" with multiple steps I need to measure each individually.

      Can anyone point me to any limits I might be exceeding and what I can do about it?
        • 1. Re: Java code exceeding 65535 byte limit
          It is native java that is complaining about the size, though since you say it's a simple recording it is OpenScript causing the over sized code. Try going correlation library and uncheck everything, including the OpenScript defaults, and then record again. Have you created correlation rules? Sounds like a recursive rule, that has gone astray.

          After you have recorded a clean script without correlation, you can Script->Correlate. This time, choose only one rule. Repeat correlation to determine the bad rule.
          • 2. Re: Java code exceeding 65535 byte limit

            I agree with Glenn. This is a JVM restriction, not OpenScript, the maximum size for one method is 65535 bytes(Alex and Jamie and JB, join me my brothers on this issue....), you can split your run method into several methods.....



            Edited by: byrne_wayne on Mar 6, 2012 1:12 AM

            Edited by: byrne_wayne on Mar 6, 2012 1:16 AM

            Edited by: byrne_wayne on Mar 6, 2012 1:17 AM