Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 80965 invoked from network); 7 Feb 2011 16:36:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Feb 2011 16:36:12 -0000 Received: (qmail 29412 invoked by uid 500); 7 Feb 2011 16:36:11 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 29289 invoked by uid 500); 7 Feb 2011 16:36:10 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 29281 invoked by uid 99); 7 Feb 2011 16:36:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 16:36:09 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.85.173.253] (HELO server.dankulp.com) (64.85.173.253) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Feb 2011 16:36:03 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id 41617187B96; Mon, 7 Feb 2011 11:35:43 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter-users@cxf.apache.org.9n4SY0LLPg Received: from dilbert.dankulp.com (c-24-91-72-253.hsd1.ma.comcast.net [24.91.72.253]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id 0BE75187B8A; Mon, 7 Feb 2011 11:35:41 -0500 (EST) From: Daniel Kulp To: users@cxf.apache.org Subject: Re: Capturing CXF Exceptions Date: Mon, 7 Feb 2011 11:35:08 -0500 User-Agent: KMail/1.13.6 (Linux/2.6.37; KDE/4.5.5; x86_64; ; ) Cc: Sergey Beryozkin , Andrew References: <201102041805.13578.dkulp@apache.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201102071135.08888.dkulp@apache.org> X-Old-Spam-Status: No, score=-102.9 required=3.0 tests=ALL_TRUSTED,BAYES_00, SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.1 On Sunday 06 February 2011 11:36:55 am Sergey Beryozkin wrote: > I believe using CXF interceptors has always been possible, alternatively, > registering a custom JAX-RS RuntimeException ExceptionMapper is a > possibility. > > The only thing I'm not sure about is why the uncaught exception is not > propagated to the servlet container, it's definitely a default on > 2.3.x/trunk, XMLBinding out fault interceptor will only report the > exception (as in this case) if the propagation has been disabled. Are you sure on that? By default, at least with the soap cases, exceptions are NOT propogated up to the servlet container. We handle them ourselves, map them to the appropriate 500 status code, create the soap fault, etc... Nothing is sent up to the container. Dan > > Cheers, Sergey > > > Dan > > > > On Friday 04 February 2011 4:53:09 pm Andrew wrote: > > > Hi, > > > > > > I'm doing some basic stress testing of my JAX-RS service and getting > > > back > > > > > > some 500 responses, with body: > > > JAXBException occurred : Read timed out. Read timed out. > > > > > > and > > > > > > > > > > > xmlns:ns1="http://cxf.apache.org/bindings/xformat"> > > xmlns:ns1="http://cxf.apache.org/bindings/xformat > > > > ">java.net.SocketTimeoutE > > > > > xception: Read timed out > > > > > > On the service side I see the exceptions logged at WARN: > > > > > > 2011-02-04 14:19:57,621 [http-8080-5] WARN > > > org.apache.cxf.phase.PhaseInterceptorChain[369] - Interceptor for { > > > http://foo.com/}CommandResourceImpl has thrown exception, unwinding now > > > org.apache.cxf.interceptor.Fault: Read timed out > > > > > > at > > > > org.apache.cxf.interceptor.LoggingInInterceptor.logging(LoggingInIntercep > > to > > > > > r.java:201) > > > > > > 2011-02-04 14:19:57,928 [http-8080-38] WARN > > > org.apache.cxf.jaxrs.provider.AbstractJAXBProvider[508] - > > > javax.xml.bind.UnmarshalException > > > > > > - with linked exception: > > > [org.xml.sax.SAXParseException: Premature end of file.] > > > > > > but I'd like to handle these exceptions myself. Is there a way to > > > > capture > > > > > these exceptions on the service side? I'm using CXF 2.2.11 Thanks, > > > > > > Andrew > > > > -- > > Daniel Kulp > > dkulp@apache.org > > http://dankulp.com/blog -- Daniel Kulp dkulp@apache.org http://dankulp.com/blog