Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1637

JClouds does not work with Jakarta XML bind on classpath

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.6.1
    • jclouds-core
    • None

    Description

      This is kind-of a follow up to JCLOUDS-1627:

      When you have Spring Boot 3.2 powered environment/classpath, JClouds will fail to start with java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException.

      The issue basically stems from https://github.com/apache/jclouds/blob/master/core/src/main/java/org/jclouds/xml/internal/JAXBParser.java, which is still pointing to javax.xml.bind classes.

      The most simplistic solution probably would be to just replace the package names with jakarta.xml.bind.

      However, if you want to continue supporting javax.xml.bind, a possible solution would be to have two different XMLParser implementations and then load either of them, depending on which JAXB variant is available on the classpath.

      For reference, I have created a simple demo application that showcases the problem: https://github.com/philippn/jclouds-vs-jakarta-xml-bind

      Thanks in advance for looking into it!

      Attachments

        Activity

          People

            gaul Andrew Gaul
            philippn Philipp Nanz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: