You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jason Pell (JIRA)" <ji...@apache.org> on 2015/03/23 11:08:11 UTC

[jira] [Commented] (CXF-6312) Unusable error message for Unmarshall Error

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

Jason Pell commented on CXF-6312:
---------------------------------

Please refer to CXF-6242 added recently.  This provides much more control over the jaxb message that is thrown by schema validation.  Please review this existing functionality and let me know if you think we can enhance it even more.

> Unusable error message for Unmarshall Error
> -------------------------------------------
>
>                 Key: CXF-6312
>                 URL: https://issues.apache.org/jira/browse/CXF-6312
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 3.0.3, 3.0.4
>            Reporter: EasternWahoo
>            Assignee: Jason Pell
>            Priority: Critical
>
> CXF soap faults for unmarshalling errors do not contain information useful in locating the error.  For example, invalid content in an element  results in this faultString: Unmarshalling Error: xxxx .   (Where xxxx is the invalid data)
> The full stack trace contains messages with location of the bad string, i.e. : 
>  [com.sun.istack.SAXParseException2; lineNumber: 5; columnNumber: 38; xxxx].   This fragment in JAXBEncodeDecoder, extracts the message from the linked exception, i.e., the last exception in the stack: 
>        } catch (PrivilegedActionException e) { 
>             Exception ex = e.getException(); 
>             if (ex instanceof Fault) { 
>                 throw (Fault)ex; 
>             } 
>             if (ex instanceof javax.xml.bind.UnmarshalException) { 
>                 javax.xml.bind.UnmarshalException unmarshalEx = (javax.xml.bind.UnmarshalException)ex; 
>                 if (unmarshalEx.getLinkedException() != null) { 
>                     throw new Fault(new Message("UNMARSHAL_ERROR", LOG, 
>                                             unmarshalEx.getLinkedException().getMessage()), ex); 
> For more info, see this mailing list thread: http://cxf.547215.n5.nabble.com/Unmarshalling-error-content-usability-tt5755169.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)