cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefaan Vanderheyden (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-5918) ResoureUtils#createJaxbContext hides JaxB validation errors
Date Thu, 31 Jul 2014 14:07:41 GMT
Stefaan Vanderheyden created CXF-5918:
-----------------------------------------

             Summary: ResoureUtils#createJaxbContext hides JaxB validation errors
                 Key: CXF-5918
                 URL: https://issues.apache.org/jira/browse/CXF-5918
             Project: CXF
          Issue Type: Improvement
          Components: JAXB Databinding
    Affects Versions: 2.7.12, 3.0.0-milestone2, 3.0.0-milestone1
         Environment: All
            Reporter: Stefaan Vanderheyden


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);
        }



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message