Page tree
Skip to end of metadata
Go to start of metadata

Symptom

Upgarade/update fails;
Deployment fails;
Compilation fails;
Web request fails

Problem

You get one of the following error messages with exit codes:

I. Compilation Failed! Exit Code=1
II. Compilation Failed! Exit Code=2
III. Compilation Failed! Exit Code=3
IV. java.io.IOException: error=12, Cannot allocate memory

Keywords

  • Deployment not possible
  • WSDL
  • Compilation
  • Compilation fails
  • Compilation Failed

Solution

Depending on the exit code you got, do the follwoing:

I. Check that your java home is configured correctly to installed java, which version is needed for your system version.
(You have to ensure correct OS path to javac.exe in OS environment, where the whole JDK (not only jre) is installed)

II. This exit code means that the java files which should be compiled are not found. Check if the java files exist at the specified location.

III. Increase the memory of the compiler(apply the related SAP Note below)
Proceed as follows:
1. Start the Config Tool in <J2EE_HOME>/configtool directory
2. In the the tree in the left pane, navigate to
cluster-data -> <Tempate Name> -> services -> classpath_resolver
cluster-data -> <Tempate Name> -> Instance IDXXXXXX -> services -> classpath_resolver
3. In the right pane, choose on the key "javac.Xmx"
4. In the "Custom Value" text field, write a higher value. For example: 512
5. Choose "Set Custom Value".
6. In the "File" menu, choose "Apply Changes" and confirm all windows popping up.
7. Restart AS Java.
8. Restart the deployment process (or failed scenario)

IV. This means that the OS cannot find enough memory to execute a compilation process. You can increase you OS memory by increasing the swap file.

Sample logs

...
java.lang.OutOfMemoryError: Java heap space (failed to allocate 32 bytes)
at com.sun.tools.javac.util.List.of(List.java:74)
...
Caused by: java.io.IOException: Compilation fails...
Compilation Failed! Exit Code=3
...
Caused by: com.sap.engine.compilation.CompilerProcessFailureException: Cannot java.io.IOException: error=12, Cannot allocate memory
...

Related SAP Notes

759669

  • No labels