TC-110123: Replace JAXB DatatypeConverter with JDK DatatypeFactory#29
Open
Shan-SmartBear wants to merge 4 commits into
Open
TC-110123: Replace JAXB DatatypeConverter with JDK DatatypeFactory#29Shan-SmartBear wants to merge 4 commits into
Shan-SmartBear wants to merge 4 commits into
Conversation
…nverter TC-110123: Replace JAXB DatatypeConverter with JDK DatatypeFactory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Jenkins running Java 11 or newer (Java 17 / 21, Jenkins LTS 2.555+), the plugin fails with:
java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverterThe test run finishes fine (exit code 0). The error happens later, when the plugin reads the TestComplete log and builds the JUnit-style report. Jenkins then marks the build as FAILED.
Cause
The plugin used javax.xml.bind.DatatypeConverter.printDateTime() to make the timestamp. JAXB (
javax.xml.bind) was removed from the JDK in Java 11. Old Jenkins versions still had it by chance; from LTS 2.555 it is no longer on the plugin classpath.Fix
Replaced the JAXB call with
javax.xml.datatype.DatatypeFactory, which is part of the JDK (JAXP) and is present in Java 8, 11, 17 and 21.Jira: https://smartbear.atlassian.net/browse/TC-110123
Testing done
Submitter checklist