Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85D8917998 for ; Mon, 23 Mar 2015 21:55:53 +0000 (UTC) Received: (qmail 89705 invoked by uid 500); 23 Mar 2015 21:55:53 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 89667 invoked by uid 500); 23 Mar 2015 21:55:53 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 89656 invoked by uid 99); 23 Mar 2015 21:55:53 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Mar 2015 21:55:53 +0000 Date: Mon, 23 Mar 2015 21:55:53 +0000 (UTC) From: "Jason Pell (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-6312) Unusable error message for Unmarshall Error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14376726#comment-14376726 ] Jason Pell commented on CXF-6312: --------------------------------- Refer to the mail thread for details of sample impl > 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)