Upgrade to Postgres 7.3.3 broke app - Mailing list pgsql-jdbc

From Josh Trutwin
Subject Upgrade to Postgres 7.3.3 broke app
Date
Msg-id 44737.192.168.0.3.1055267026.squirrel@trutwins.homeip.net
Whole thread Raw
List pgsql-jdbc
Hi,

I had an application running at the following URL:
http://trutwins.homeip.net:8080/links/Links that no longer works after
upgrading from 7.3.2 to 7.3.3 (built from source).  If you go to the URL
you'll see the entire exception dump, but the gist of it is:
java.lang.NoClassDefFoundError:
org/postgresql/jdbc2/AbstractJdbc2Connection

This is from a Tomcat server (binary version 4.1.24), postgres.jar is in
$CATALINA_HOME/shared/lib.  If I execute jar -tvf postgres.jar, there are
no jdbc2 classes, they are all jdbc3, which is obviously why the
application croaks.

# java -version
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)

# uname -a
Linux scully 2.4.19-4GB #1 Fri Sep 13 13:14:56 UTC 2002 i686 unknown

The application code to instantiate the connection that is throwing the
exception is:

try {
    out = response.getWriter();

    Class.forName("org.postgresql.Driver").newInstance();
    connection = DriverManager.getConnection(
           "jdbc:postgresql://localhost/links", "myUser", "myPass");

} catch (ClassNotFoundException cnfe) {
    out.println("<P>Error loading driver: " + cnfe);
} catch (InstantiationException ie) {
    out.println("<P>Error instantiating class: " + ie);
} catch (IllegalAccessException iae) {
    out.println("<P>Error Illegal Access: " + iae);
} catch (IOException ioe) {
    out.println("<P>Error I/O: " + ioe);
} catch (SQLException sqle) {
    out.println("<P>SQL State: " + sqle.getSQLState());
    out.println("<P>Error Code: " + sqle.getErrorCode());
    out.println("<P>Exception: " + sqle);
}

Any thoughts on how to fix this?  I looked through the postgres docs in
the distribution and didn't see anything related to this.  google hasn't
helped either.

Thanks,

Josh Trutwin
http://trutwins.homeip.net



pgsql-jdbc by date:

Previous
From: "rcastagnoli@katamail.com"
Date:
Subject: Authentication problems
Next
From: Fernando Nasser
Date:
Subject: Re: Upgrade to Postgres 7.3.3 broke app