cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5918) ResoureUtils#createJaxbContext hides JaxB validation errors
Date Fri, 01 Aug 2014 10:33:38 GMT

    [ https://issues.apache.org/jira/browse/CXF-5918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14082120#comment-14082120
] 

Sergey Beryozkin commented on CXF-5918:
---------------------------------------

It was an easy fix :-)

> 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: 3.0.0-milestone1, 3.0.0-milestone2, 2.7.12
>         Environment: All
>            Reporter: Stefaan Vanderheyden
>            Assignee: Sergey Beryozkin
>             Fix For: 2.7.13, 3.0.2, 3.1.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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