Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5918

ResoureUtils#createJaxbContext hides JaxB validation errors

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-milestone1, 3.0.0-milestone2, 2.7.12
    • 2.7.13, 3.0.2, 3.1
    • JAXB Databinding
    • None
    • All

    • Novice

    Description

      When creating a Jaxb context, the ResourceUtils class catches all JAXBExceptions and eats them!

      These errors are usually related to the validation of JAXB class annotations and are required to fix problems with the WADL grammar section...

      Suggest logging at least an WARNING level entry and include the original JAXBException in the log to provide sufficient info to fix the warning...

      JAXBContext ctx;
      try

      { ctx = JAXBContext.newInstance(classes.toArray(new Class[classes.size()]), contextProperties); return ctx; } catch (JAXBException ex) { LOG.fine("No JAXB context can be created"); }

      should be

      JAXBContext ctx;
      try { ctx = JAXBContext.newInstance(classes.toArray(new Class[classes.size()]), contextProperties); return ctx; }

      catch (JAXBException ex)

      { LOG.log(Level.WARNING, "No JAXB context can be created", ex); }

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            mrsvan Stefaan Vanderheyden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified