View Single Post

   
  #1 (permalink)  
Old 04-16-2008, 01:36 AM
Raghavendra MB
 
Posts: n/a
Default Class Cast Exception for DataSource

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

Reply With Quote