When running the SDDC Manager recovery tool refreshhostattributes.pyc (distributed via KB 313210), the tool fails to process host attributes.
The console or refresh-hostAttributes.log file records stack traces containing the following error:
java.util.concurrent.ExecutionException: com.vmware.vim.vmomi.client.exception.VmomiProtocolException: com.vmware.vim.vmomi.core.exception.UnmarshallException: Invalid date/time format 'YYYY-MM-DDThh:mm:ss.#####Z'...Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter...Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter...
SDDC Manager 5.x
Starting with SDDC Manager 5.x, the base system Java runtime environment was upgraded to Java 17. Under JDK 11 and later, the javax.xml.bind (JAXB) module was removed from the standard JDK distribution. The recovery tool artifact was built targeting Java 8 and does not bundle standalone JAXB libraries, causing a runtime `NoClassDefFoundError'.
Note: A permanent fix is currently under consideration by Engineering. In the interim, execute the following workaround steps on the SDDC Manager appliance to extract and inject the required JAXB libraries into the recovery tool's internal classpath.
1. Log in to the SDDC Manager SSH terminal as the root user.
2. Navigate to the directory where the recovery tool was extracted (e.g., /home/vcf/recovery_tools_python_3_10_11
cd /home/vcf/recovery_tools_python_3_10_11
3. Extract compatible JAXB JAR files from the installed vcf-domain-manager.jar package.
unzip -j /opt/vmware/vcf/domainmanager/vcf-domain-manager.jar "BOOT-INF/lib/external/maven/v1/https/packages.vcfd.broadcom.net/artifactory/central/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar" -d .
unzip -j /opt/vmware/vcf/domainmanager/vcf-domain-manager.jar "BOOT-INF/lib/external/maven/v1/https/packages.vcfd.broadcom.net/artifactory/central/org/glassfish/jaxb/jaxb-runtime/2.3.8/jaxb-runtime-2.3.8.jar" -d .
4. Inject the extracted JAXB JARs into the internal classpath (BOOT-INF/lib/) of vsphere-host-attributes-0.0.1-SNAPSHOT.jar using Python.
python3 -c '
import zipfile
with zipfile.ZipFile("vsphere-host-attributes-0.0.1-SNAPSHOT.jar", "a") as z:
z.write("jaxb-api-2.3.1.jar", "BOOT-INF/lib/jaxb-api-2.3.1.jar")
z.write("jaxb-runtime-2.3.8.jar", "BOOT-INF/lib/jaxb-runtime-2.3.8.jar")
print("JAXB patches injected successfully!")
'
5. Re-run the script against the target domain or hosts.
python refreshhostattributes.pyc --domain=<domain_name>