problem with PSQLException/PSQLState - Mailing list pgsql-jdbc

From Jason Briggs
Subject problem with PSQLException/PSQLState
Date
Msg-id 3FCD395E.3040403@lateralnz.com
Whole thread Raw
Responses Re: problem with PSQLException/PSQLState  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Just discovered a possible issue with the SQLException thrown by the 7.4
beta3 jdbc driver.

PSQLException used to contain only a message, but now also has a ref to
org.postgresql.util.PSQLState.  PSQLState isn't serializable and because
a SQLException is supposed to be serializable, this causes a problem in
situations where you might want to propogate your exceptions across the
wire (i.e. app server to client).

The problem is fixed if you change PSQLState to implement Serializable,
as follows:

[[SNIP

package org.postgresql.util;

import java.io.Serializable;

public class PSQLState implements Serializable
{

]]



J

--
_______________________________________________
Jason Briggs
  . Development Manager ... Lateral NZ
  . (a division of Lateral Profiles)
  . -- Finalist - The TUANZ Mobile Service of the Year 2003
  . -- Finalist - The TUANZ Telecommunications Innovation Award 2003
  .


pgsql-jdbc by date:

Previous
From: groups@ezotyrik.org (Ezotyrik)
Date:
Subject: Re: Backend Protocol Examples?
Next
From: Lxir
Date:
Subject: JDBC encoding