Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: xml
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Calling JAXBContext#newInstance(Class[] classesToBeBound) and JAXBContext#newInstance(Class[] classesToBeBound, Map<String,?> properties ) with classes from java.base as parameters for "classesToBeBound" causes JAXBException, with following description:
      Package java.lang with JAXB class (class name) defined in a module java.base must be open to at least java.xml.bind module.

      Generally passing java.base classes to JAXBContext is unnecessary and should be avoided with an exception for using javax.xml.bind.JAXBElement with an array as its root type.

      Workaround: declare openness propagation for those explicitly with --add-opens
      For example:
      --add-opens java.base/java.lang=java.xml.bind

        Attachments

          Activity

            People

            • Assignee:
              zli Zheng Jun Li (Inactive)
              Reporter:
              rgrigoriadi Roman Grigoriadi (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: