logical-migration.jar script fails with an exception "org.springframework.beans.factory.UnsatisfiedDependencyException"
search cancel

logical-migration.jar script fails with an exception "org.springframework.beans.factory.UnsatisfiedDependencyException"

book

Article ID: 416786

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • You have tried the approach discussed in the KB article NSX Host or Edge Transport Nodes have a status of "Unknown" and Tunnels are "Not Available" or "Validation Errors".
  • While running the script (using the logical-migration.jar file), the script fails with an exception similar to the exception below:
    Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'edgeNSGroupStaleGroupMigrationTask': Unsatisfied dependency expressed through method 'setCorfuDao' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseIdentifiableObjectDao' defined in com.vmware.nsx.management.migration.configuration.DaoConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.vmware.nsx.management.container.dao.AbstractDao]: Factory method 'corfuIdentifiableObjectDao' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'corfuDbDataStore' defined in com.vmware.nsx.management.migration.configuration.DaoConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.vmware.nsx.management.container.dao.corfudb.CorfuDbDataStore]: Factory method 'corfuDbDataStore' threw exception; nested exception is java.lang.reflect.InaccessibleObjectException: Unable to make field private transient java.util.NavigableMap java.util.TreeSet.m accessible: module java.base does not "opens java.util" to unnamed module @1e106396
  • OpenSDK used on the NSX Manager is 17.x.x. This can be validated via the java -version command run as the root user on the NSX manager node

    # java -version
    openjdk version "17.0.15" 2025-04-15 LTS
    OpenJDK Runtime Environment (build 17.0.15+11-LTS)
    OpenJDK 64-Bit Server VM (build 17.0.15+11-LTS, mixed mode, sharing)

Environment

VMware NSX

Cause

 This issue is caused by a parameter that is not supported in OpenSDK 17.

Resolution

This is a known issue impacting VMware NSX. 

Workaround:

  1. Using NSX Manager's UI, create a new backup (System -> Backup & Restore -> Start Backup).
    Ref. Start or Schedule Backups: https://techdocs.broadcom.com/us/en/vmware-cis/nsx/vmware-nsx/4-2/administration-guide/backing-up-and-restoring-the-nsx-manager/start-or-schedule-backups.html

  2. SSH to any NSX Manager in the impacted cluster as root.

  3. Use the command below to confirm that the Java (openjdk) version is 17.x:
    java -version

  4. Please make sure the logical-migration.jar file has been copied to the Manager's /opt/vmware/upgrade-coordinator-tomcat/temp/ directory (refer to KB article https://knowledge.broadcom.com/external/article/324194).

  5. SSH to all three NSX Managers as root, and stop the proton service - service must be stopped on all three NSX Managers at the same time:
    # service proton stop

  6. Use the syntax below to run the logical-migration.jar file. 
    Please note the password in the command (in the highlighted section) needs to be replaced with the actual password for admin user:
    # java -Dcorfu-property-file-path=/opt/vmware/upgrade-coordinator-tomcat/conf/ufo-factory.properties -Djava.io.tmpdir=/opt/vmware/upgrade-coordinator-tomcat/temp -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j.configurationFile=/opt/vmware/upgrade-coordinator-tomcat/conf/log4j2.xml -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/opt/vmware/upgrade-coordinator-tomcat/conf/logging.properties -Dnsx-service-type=nsx-manager -DTransportZoneProfileRectifierInTNAndTNP.userName=admin -DTransportZoneProfileRectifierInTNAndTNP.password='ENTER_ADMIN_PASSWORD_HERE' -DTransportZoneProfileRectifierInTNAndTNP.updateTn=true -DTransportZoneProfileRectifierInTNAndTNP.updateTzp=true -DTransportZoneProfileRectifierInTNAndTNP.dryRun=true --add-opens=java.base/sun.security.provider=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-exports=java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED --add-exports=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -cp /opt/vmware/upgrade-coordinator-tomcat/temp/logical-migration.jar com.vmware.nsx.management.migration.impl.TransportZoneProfileRectifierInTNAndTNP
  7. Set correct file ownership:
    # chown uuc:uuc /var/log/upgrade-coordinator/upgrade-coordinator*log*

  8. Validate presence of string "Migration task finished" in NSX Manager's /var/og/upgrade-coordinator/upgrade-coordinator.log file:
    # grep "Migration task finished" /var/log/upgrade-coordinator/upgrade-coordinator.log
  9. Start proton service on all three NSX Managers:
    # service proton start

  10. Switch to the admin user on each manager node via the su admin command.

  11. Execute the following from NSXCLI on all NSX Manager nodes so that CorfuDB and Search Indexes are in sync:
    > start search resync policy
    > start search resync manager

    Note:  If above command does not resolve the UI issue, execute the following command:
    > start search resync all

    Note: It may be necessary to also run the following two commands:
    > start search resync telemetry
    > start search resync inventory

  12. Login to the NSX UI and validate that the host status is resolved.