[redhat-ccm-list] Re: pg72jdbc2.jar

Vadim Nasardinov vadimn at redhat.com
Fri Feb 27 14:10:20 UTC 2004


On Friday 27 February 2004 03:44, Dhanya Unnikrishnan wrote:
> I set the classpath to point to pg72jdbc2.jar. But it still gives me
> the same error. The log tells me that
>
> "Initialization using:
> /WEB-INF/resources/enterprise.init. Initialization failed with error
> org/postgresql/jdbc1/Statement.getConnection.".
>
> I checked the pg72jdbc2.jar file, but couldnt find a package by the
> name jdbc1 in it. Where did I go wrong? Is there anything I need to
> change in the enterprise.init or anyn other files?

If you are still getting an AbstractMethodError for
org/postgresql/jdbc1/Statement.getConnection, it most likely means
pg72jdbc1.jar is lurking somewhere on your classpath.  The easiest
thing to do is simply remove the file entirely from your filesystem.
(It is only necessary if you're writing JDBC applications for
PostgreSQL in Java 1.1, which I don't think you are.)

To find the offending file, you can do something like this:

|$ slocate -r 'jdbc.*\.jar'
|/usr/share/tomcat/common/lib/jdbc2_0-stdext.jar
|/opt/resin/2.1.4/lib/jdbc2_0-stdext.jar
|/opt/resin/2.1.4/lib/jdbc-mysql.jar

(Your output will be different.)

Once you found it, you can do

$ cd /your/path/to/offending/file/
$ mv pg72jdbc1.jar pg72jdbc1.jar.removed

We ship the correct PostgreSQL JDBC driver as part of our
distribution.  The file is called postgresql.jar:

|$ slocate postgresql.jar
|/var/vadim/p4checkout/core-platform/dev/lib/postgresql.jar
|/var/vadim/p4checkout/core-platform/5.2/lib/postgresql.jar
|/var/vadim/p4checkout/core-platform/6.0/lib/postgresql.jar
|/var/ccm-devel/web/vadim/dev/webapps/WEB-INF/lib/postgresql.jar





More information about the Redhat-ccm-list mailing list