Обсуждение: Driver fails to connect

Поиск
Список
Период
Сортировка

Driver fails to connect

От
PaulU71555@aol.com
Дата:
Hi.

Using J2sdk1.4.0, Postgresql7.2, and a patch, 1.4b3.

Try: DriverManager.getConnection("jdbc:postgresql:Paul","Paul","")

Get: java.lang.NoSuchFieldError: current_row
      at org.postgresql.Driver.connect(source file unknown, pc 0x82063333)

The preceding is preceded by (18 iterations of) Warning: Major/Minor version number mismatch.

I'm sure this is some sort of configuration glitch.  I have postgresql.jar and pgjdbc2.jar in the same directory which is in my classpath.  What am I missing/what did I not do/what did I not do that I should have?

Thanks,
Paul

Re: Driver fails to connect

От
"Dave Cramer"
Дата:
Paul,
 
Chances are the class loader is going to load pgjdbc2.jar first and take it as the Driver. there must be more code than this though?
 
Can you send us a snippet of code that reproduces the error?
 
Dave
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of PaulU71555@aol.com
Sent: Tuesday, March 26, 2002 9:34 PM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] Driver fails to connect

Hi.

Using J2sdk1.4.0, Postgresql7.2, and a patch, 1.4b3.

Try: DriverManager.getConnection("jdbc:postgresql:Paul","Paul","")

Get: java.lang.NoSuchFieldError: current_row
      at org.postgresql.Driver.connect(source file unknown, pc 0x82063333)

The preceding is preceded by (18 iterations of) Warning: Major/Minor version number mismatch.

I'm sure this is some sort of configuration glitch.  I have postgresql.jar and pgjdbc2.jar in the same directory which is in my classpath.  What am I missing/what did I not do/what did I not do that I should have?

Thanks,
Paul

Re: Driver fails to connect

От
"Dave Cramer"
Дата:
Paul,
 
Using the standard jar which will run under jdk1.4 I got the following response
 
In TestJdbc constructor
DRIVER: org.postgresql.Driver
Connecting to Database URL = jdbc:postgresql:test
Dave
-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of PaulU71555@aol.com
Sent: Tuesday, March 26, 2002 9:34 PM
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] Driver fails to connect

Hi.

Using J2sdk1.4.0, Postgresql7.2, and a patch, 1.4b3.

Try: DriverManager.getConnection("jdbc:postgresql:Paul","Paul","")

Get: java.lang.NoSuchFieldError: current_row
      at org.postgresql.Driver.connect(source file unknown, pc 0x82063333)

The preceding is preceded by (18 iterations of) Warning: Major/Minor version number mismatch.

I'm sure this is some sort of configuration glitch.  I have postgresql.jar and pgjdbc2.jar in the same directory which is in my classpath.  What am I missing/what did I not do/what did I not do that I should have?

Thanks,
Paul