tnguyen94's avatar
tnguyen94
New Member
2 months ago
Status:
New Idea

Plugin incompatible with Java 21 - ClassNotFoundException: javax.xml.bind.DatatypeConverter

Environment
- TestComplete Jenkins Plugin version: 2.10
- Jenkins version: 2.555.1
- Java version: 21.0.7

The TestComplete plugin throws a ClassNotFoundException for 
javax.xml.bind.DatatypeConverter when running on Java 21. 
This causes all TestComplete jobs to fail.

java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
Caused: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
    at PluginClassLoader for TestComplete//com.smartbear.jenkins.plugins.testcomplete.parser.LogNodeUtils.startTimeToTimestamp(LogNodeUtils.java:425)
    at PluginClassLoader for TestComplete//com.smartbear.jenkins.plugins.testcomplete.parser.LogParser2.convertSummaryToXML(LogParser2.java:216)
    at PluginClassLoader for TestComplete//com.smartbear.jenkins.plugins.testcomplete.parser.LogParser2.parse(LogParser2.java:278)

javax.xml.bind (JAXB) was removed in Java 11 via JEP 320. The plugin 
is calling javax.xml.bind.DatatypeConverter in LogNodeUtils.java:425 
which no longer exists in Java 11 and above.

Downgrading Java on the node is not possible as the Jenkins controller 
is running Java 21 (class file version 65.0) and the node must match it

2 Comments

  • bravura-lsim's avatar
    bravura-lsim
    Occasional Contributor

    For now set the job (JDK used for this project) to run with Java 17, that seems to work around the issue for now.

    Update: No, sorry, some of our test jobs ran and those happened to have JDK 17 listed, but changing those that fail did not help.

  • GiorgiNiavadze's avatar
    GiorgiNiavadze
    Occasional Contributor

    I HAVE SAME PROBLEM:

    TestComplete Jenkins Plugin 2.10 on Java 21 — ClassNotFoundException: javax.xml.bind.DatatypeConverter blocks all result publishing

     

    Environment:

    - TestComplete Jenkins Plugin: 2.10

    - Jenkins: 2.555.2

    - Agent Java: Eclipse Temurin 21.0.11 (JNLP inbound agent)

    - Controller Java: 21.0.5

    - TestExecute: 15.82.62.11 / TestComplete: 15.83.1.7 (both updated to latest, no change in behavior)

     

    Issue:

    Confirming the same issue already reported in this thread and in the related idea

    (community.smartbear.com/idea/.../280452). The TestComplete/TestExecute test run

    completes successfully — exit code 0, and I personally watched the run finish

    correctly on the node — but the Jenkins build still fails at the results-publishing

    stage with:

     

    [TestComplete] [WARNING] Unable to publish test results (xml data is empty).

    FATAL: javax/xml/bind/DatatypeConverter

    java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter

    Caused: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter

    at PluginClassLoader for TestComplete//com.smartbear.jenkins.plugins.testcomplete.parser.LogNodeUtils.startTimeToTimestamp(LogNodeUtils.java:425)

    at PluginClassLoader for TestComplete//com.smartbear.jenkins.plugins.testcomplete.parser.LogParser2.convertSummaryToXML(LogParser2.java:216)

    at PluginClassLoader for TestComplete//com.smartbear.jenkins.plugins.testcomplete.parser.LogParser2.parse(LogParser2.java:278)

    at PluginClassLoader for TestComplete//com.smartbear.jenkins.plugins.testcomplete.TcTestBuilder.processFiles(TcTestBuilder.java:1108)

     

    This is 100% reproducible on every build regardless of test content, confirming the

    root cause is the plugin's log-to-XML summary step (LogNodeUtils.startTimeToTimestamp)

    calling a JAXB class that was removed from the JDK itself starting with Java 11 (JEP 320).

     

    Already ruled out:

    - Not a TestComplete/TestExecute version issue — updated both to latest 15.82.x, same result.

    - Not fixable via the job-level "JDK" tool selection — that only sets PATH/JAVA_HOME for

    build steps, it doesn't change the JVM already running the Jenkins process.

    - Not fixable by running on Java 17 instead — javax.xml.bind was already removed as of

    Java 11, so 17 has the same problem; and in any case Jenkins 2.555.x requires Java 21

    or 25 on both controller and agent JVMs, so downgrading isn't an option for us.

     

    Questions:

    1. Is there an ETA for an official plugin fix that removes the JAXB dependency?

    2. Is there a supported interim workaround?

    3. Can SmartBear confirm/validate the community patch posted by siho in this thread

    (replacing DatatypeConverter with java.time) as safe for production use?

     

    Happy to share the full console log or additional screenshots on request.