Technical article 111269

Compiling Java applications on OpenServer 5.0.5 fails with "Warning: Not enough memory for the JIT compiler" or "java.lang.VerifyError..."

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5

Written · Last revised

Problem

Compiling a Java application or applet will fail with:

Warning: Not enough memory for the JIT compiler
and/or:

[java.lang.VerifyError: (class: <your_class>, method: <some_method>, signature: (<list of java Libraries>; ) Out of Memory]

The Java error message will vary based on what classes and libraries the Just In Time (JIT) compiler is trying to access.

Cause

There may be many causes for this error, but the fundamental cause for this is memory, either virtual or physical.

There may not be enough memory on the system to successfully
compile the classes.  Also, there may be a lack of swap space
on the system. Adding swap space is the first thing to try.

Solution

First, figure out how much swap is on the system:

# swap -l
path               dev  swaplo blocks   free
/dev/swap          1,41      0 100000  68952

This will tell you how much swap space is available on the system, in 512-byte blocks. Depending on how much RAM you have on the system, the swap space needed will be around 1.5 times the size of the memory on the system, in most cases.

If there is a lack of swap space on the system, you will need to add more to the system. You do not need to reformat your drive to reorganize your filesystem slices. You may create a file and add it as swap space:

# touch /swap1
You will then need to specify how many bytes will be available for
swap:
# swap -a /swap1 50000

This will add 50000 bytes to the swap space.

# swap -l
path               dev  swaplo blocks   free
/dev/swap          1,41      0 100000  68952
/swap1            76,1       0  50000  50000

If the sum of the free space is 1.5*RAM, the JIT compiler should work.

If it does not work, the amount of physical RAM may need to be increased. More swap space will be needed for this as well.

NOTES:    See Java system requirements for memory specifications.

See also

ta105153, "How can I increase swap space without reconfiguring existing divisions?"

From the Xinuos technical article database, record 111269. Reproduced with permission. The original is at www.sco.com/ta/111269, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.