You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Stefaan Vanderheyden (JIRA)" <ji...@apache.org> on 2014/08/01 08:53:39 UTC
[jira] [Commented] (CXF-5918) ResoureUtils#createJaxbContext hides
JaxB validation errors
[ https://issues.apache.org/jira/browse/CXF-5918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14081996#comment-14081996 ]
Stefaan Vanderheyden commented on CXF-5918:
-------------------------------------------
That was quick! Good job!
> 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)