Exception while Class.forName("org.postgresql.Driver");

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

Exception while Class.forName("org.postgresql.Driver");

От:
"Doron Baranes" <doron.baranes@dbnet.co.il>
Дата:

Hi,

I am using postgres 8.1.4 on solaris 10 sparc and i am trying to use jdbc driver.
when i use this command Class.forName("org.postgresql.Driver") to load the driver i get:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/postgresql/Driver (Unsupported major.minor version 49.0)

can anyone help?

10x,
Doron

Re: Exception while Class.forName("org.postgresql.Driver");

От:
Heikki Linnakangas <heikki@enterprisedb.com>
Дата:
Doron Baranes wrote:
> I am using postgres 8.1.4 on solaris 10 sparc and i am trying to use jdbc driver.
> when i use this command Class.forName("org.postgresql.Driver") to load the driver i get:
> Exception in thread "main" java.lang.UnsupportedClassVersionError: org/postgresql/Driver (Unsupported major.minor version 49.0)

That means that your JDBC driver was compiled for JRE 1.5, and your JRE 
is older than that.

Run "java -version" to see your JDK version, and download the 
appropriate JDBC driver. See 
http://jdbc.postgresql.org/download.html#jdbcselection for a list of 
compatible JDK and driver versions.

Or you can upgrade your JDK to 1.5 or newer.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Re: Exception while Class.forName("org.postgresql.Driver");

От:
Martin Keller <martin.keller@unitedplanet.de>
Дата:
Hi Doron,

you need the PostgreSQL driver version suitable for your JRE.
At http://jdbc.postgresql.org/download.html you can determine which
driver-jar you should select.

Regards,
Martin

Doron Baranes wrote:
> Hi,
>
> I am using postgres 8.1.4 on solaris 10 sparc and i am trying to use jdbc driver.
> when i use this command Class.forName("org.postgresql.Driver") to load the driver i get:
> Exception in thread "main" java.lang.UnsupportedClassVersionError: org/postgresql/Driver (Unsupported major.minor version 49.0)
>
> can anyone help?
>
> 10x,
> Doron
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>
>   

Re: Exception while Class.forName("org.postgresql.Driver");

От:
Guillaume Cottenceau <gc@mnc.ch>
Дата:
"Doron Baranes"  writes:

> Hi,
> 
> I am using postgres 8.1.4 on solaris 10 sparc and i am trying to use jdbc driver.
> when i use this command Class.forName("org.postgresql.Driver") to load the driver i get:
> Exception in thread "main" java.lang.UnsupportedClassVersionError: org/postgresql/Driver (Unsupported major.minor version 49.0)

Come on, the net is loaded with matches for such an error..

If you don't already know google (you should, it's great), here's
one good response:

http://www.mail-archive.com/jaxme-dev@ws.apache.org/msg01048.html

-- 
Guillaume Cottenceau, MNC Mobile News Channel SA, an Alcatel-Lucent Company
Av. de la Gare 10, 1003 Lausanne, Switzerland - direct +41 21 317 50 36
FAQ