Skip site navigation (1) Skip section navigation (2)

Re: unwrapping InvocationTargetException in PGXAConnection.ConnectionHandler

From: Kris Jurka <books(at)ejurka(dot)com>
To: Florent Guillaume <fg(at)nuxeo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: unwrapping InvocationTargetException in PGXAConnection.ConnectionHandler
Date: 2011-03-19 22:49:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc

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

In response to

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2011-03-19 23:47:31
Subject: Re: Invalid PSQLState used in connection classes
Previous:From: Sean BowmanDate: 2011-03-19 09:22:18
Subject: Re: Problem with executeBatch and "A result was returned when none was expected"

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group