Skip site navigation (1) Skip section navigation (2)

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

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Doron Baranes <doron(dot)baranes(at)dbnet(dot)co(dot)il>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Exception while Class.forName("org.postgresql.Driver");
Date: 2006-12-12 09:29:47
Message-ID: 457E768B.7020302@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
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

In response to

pgsql-jdbc by date

Next:From: Martin KellerDate: 2006-12-12 09:53:57
Subject: Re: Exception while Class.forName("org.postgresql.Driver");
Previous:From: Guillaume CottenceauDate: 2006-12-12 09:28:45
Subject: Re: Exception while Class.forName("org.postgresql.Driver");

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group