Skip to main content
Support

KB Article #180903

How to solve a failure to allocate memory for ant migrateConfiguration

Problem

As part of the migration procedure from V2.2.1 to V2.4.0 described in the Installation Guide, we have to run the command:

<span></span>[Install_path_2.4.0]/AIS/Designer/extra/Tools/ant migrateConfiguration -DfromVersion=2.2.1

However, this command fails due to a failure to allocate memory. Below is the stdout of the command executed:

[axway@ais-tomcat-design Tools]$ ./ant.sh migrateConfiguration -DfromVersion=2.2.1                                                                                                 
Unable to locate tools.jar. Expected to find it in /Axway/AIS.axway.cloud/AIS/Java/linux-x86/jre8_u162_64/lib/tools.jar
Buildfile: build.xml
 
migrateConfiguration:
[echo] Migrate configuration from '2.2.1' to '2.4.0'
[mkdir] Created dir: /Axway/AIS.axway.cloud/AIS/AIS/Designer/extra/work/migration/ImportFiles_2.3
 
migrateConfigurationProcedure:
 
getArgs:
[echo] Use the transformation package from the path '/Axway/AIS.axway.cloud/AIS/AIS/Designer/extra/work/migration/transformTo_2.3'
[echo] Read settings files from the path '/Axway/AIS.axway.cloud/AIS/AIS/Designer/extra/work/migration/ImportFiles_2.2.1'.
[echo] Write the converted files to '/Axway/AIS.axway.cloud/AIS/AIS/Designer/extra/work/migration/ImportFiles_2.3'.
[echo] Convert the configuration from version '2.2' to version '2.3'
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000f4900000, 77594624, 0) failed; error='Cannot allocate memory' (errno=12)
#There is insufficient memory for the Java Runtime Environment to continue.Native memory allocation (mmap) failed to map 77594624 bytes for committing reserved memory.An error report file with more information is saved as:/Axway/AIS.axway.cloud/AIS/AIS/Designer/extra/Tools/hs_err_pid20125.log

Resolution

The error could be caused by insufficient memory for the java process created by the migrateConfiguration command.

You can try a possible solution. Open the file AIS\Designer\extra\Tools\build.xml and add the line with the ANT_OPTS property name for the migrateConfiguration command:

<!-- Migrate configuration-->               
    <target name="migrateConfiguration">
                             <property name="ANT_OPTS" value="-Xms1024m -Xmx2048m -XX:MaxPermSize=2048m"/>
                             <property name="importFiles221" location="../work/migration/ImportFiles_2.2.1" />
                             <property name="importFiles23" location="../work/migration/ImportFiles_2.3" />

Then execute again the command. You can try different values for the Xmx/Xmx/XX:MaxPermSize parameters.


Also, if there is not enough RAM available on the server, you can check what consumes the most memory. If Tomcat takes up too much RAM, you can temporarily stop it, execute the ant command, and restart the Tomcat server after that.