Upgrade to Postgres 7.3.3 broke app

From: "Josh Trutwin" <josh(at)trutwins(dot)homeip(dot)net>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Upgrade to Postgres 7.3.3 broke app
Date: 2003-06-10 17:43:46
Message-ID: 44737.192.168.0.3.1055267026.squirrel@trutwins.homeip.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Fernando Nasser 2003-06-10 17:51:19 Re: Upgrade to Postgres 7.3.3 broke app
Previous Message rcastagnoli@katamail.com 2003-06-10 13:30:28 Authentication problems