Class Cast Exception for DataSource

From: "Raghavendra MB" <mb(dot)ragu(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Class Cast Exception for DataSource
Date: 2007-02-22 06:20:01
Message-ID: aa36b6870702212220j7ecae30alb114e71f54e2aca3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

I am using Postgres 8.2 version database and *postgresql-8.2-504.jdbc3.jar*
driver.

Snippet of code:

*String postgresDataSource = **"org.postgresql.Driver"**;*

**

*Class dataSourceClass = Class.forName(postgresDataSource);*

*dataSource = (DataSource) dataSourceClass.newInstance();*

**

*I am getting *ClassCast exception when i try to run the code in my java
application.

Please resolve this problem.

regards

Raghu

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ken Johanson 2007-02-22 06:37:51 Re: invalid byte sequence for encoding "UTF8": 0x00
Previous Message Julius Stroffek 2007-02-21 15:47:33 JDBC object factory