Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id BA3D01337BA3 for ; Sat, 19 Mar 2011 19:57:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 97859-07 for ; Sat, 19 Mar 2011 22:57:04 +0000 (UTC) X-Greylist: delayed 00:07:07.182297 by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 337401337B82 for ; Sat, 19 Mar 2011 19:57:04 -0300 (ADT) Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id C504128426; Sat, 19 Mar 2011 18:49:56 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id A8478A3DA; Sat, 19 Mar 2011 18:49:56 -0400 (EDT) Date: Sat, 19 Mar 2011 18:49:56 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Florent Guillaume cc: pgsql-jdbc@postgresql.org Subject: Re: unwrapping InvocationTargetException in PGXAConnection.ConnectionHandler In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/33 X-Sequence-Number: 21588 On Fri, 11 Mar 2011, Florent Guillaume wrote: > Using a Connection from an XAConnection, we've come across some stack > traces looking like: > > Caused by: java.lang.reflect.UndeclaredThrowableException > > So the issue is that although we try to catch SQLException, what's > actually thrown is an UndeclaredThrowableException wrapping a > InvocationTargetException wrapping the underlying PSQLException. > Yes, your analysis is correct. This was previously fixed in CVS, but hasn't made it to a released version yet. Kris Jurka