When attempting to run the connector Migration bat file, for example, for Top Secret; \Identity Manager\Connector Server\jcs\resources\tss\TSSv2Migrate.bat
The migration fails with an out of memory error:
Jul 25, 2023 3:43:05 PM com.ca.jcs.connectors.common.migration.NamespaceMigrate printReport
INFO: Generating report...
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:64)
at java.lang.StringBuilder.<init>(StringBuilder.java:85)
at javax.naming.ldap.LdapName.toString(LdapName.java:627)
at com.sun.jndi.ldap.LdapSearchEnumeration.createItem(LdapSearchEnumeration.java:80)
at com.sun.jndi.ldap.LdapNamingEnumeration.nextAux(LdapNamingEnumeration.java:274)
at com.sun.jndi.ldap.LdapNamingEnumeration.nextImpl(LdapNamingEnumeration.java:254)
at com.sun.jndi.ldap.LdapNamingEnumeration.next(LdapNamingEnumeration.java:202)
at com.sun.jndi.ldap.LdapNamingEnumeration.nextElement(LdapNamingEnumeration.java:106)
at com.ca.jcs.connectors.common.migration.NamespaceMigrate.getObject(NamespaceMigrate.java:1394)
at com.ca.jcs.connectors.common.migration.NamespaceMigrate.prepareAccountInclusionsMigration(NamespaceMigrate.java:815)
at com.ca.jcs.connectors.common.migration.NamespaceMigrate.migrate(NamespaceMigrate.java:184)
at com.ca.tss.migration.TSSv2Migrate.main(TSSv2Migrate.java:388)
Release : 14.4
To resolve this, add a 'set JAVA_OPTS' line, and add %JAVA_OPTS% to the final line 5; For example:
set _JAVA_CMD=..\..\..\_uninst\_jvm\bin\java
set _CP=..\..\tools\lib\jcs.jar;..\..\tools\lib\cacommons.jar;..\..\tools\lib\jcs-connector-common.jar;.
set JAVA_OPTS=-Xmx1024m -Xms512m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=128m
"%_JAVA_CMD%" %JAVA_OPTS% -cp "%_CP%" com.ca.tss.migration.TSSv2Migrate %*