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

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 (view raw or flat)
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

pgsql-jdbc by date

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

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