Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 1E9399FB556 for ; Thu, 22 Feb 2007 02:20:14 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 94714-03 for ; Thu, 22 Feb 2007 02:20:03 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by postgresql.org (Postfix) with ESMTP id F0D969FB805 for ; Thu, 22 Feb 2007 02:20:02 -0400 (AST) Received: by py-out-1112.google.com with SMTP id a73so45324pye for ; Wed, 21 Feb 2007 22:20:02 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=Kk6F4+NLNK4Ztg9MxdYFyUwOwtxmZOdoRZ4xjTpO5TbKwPjnyY6SkBPi/+zgH+G3lfXyHhpeDc+ol94pYvoxkZNFKFIW+8vr2FAIlR8KvojVYxTJ4+uzyN2+Yuf874ypW8VbWxlqv7ENa00XdvsjnFLHXWOrd/DJvhC8zXzXn3g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=KDWnIe27acPmv32Agn+/yRnzeHnkIgEmaYrEvbwr8vBm8s1gaUJMXVdWz7xR6U2gcdi8lueDIwQ8cd6RQnhpj8UHn3bOMpcCKbckPWAPhLPqsz0TNyJmHNZ5YXFTG2dhE8BBMCQAQOX8/L7r0sRfeknL2573UUi5S2Vn0ZvJYoE= Received: by 10.35.65.17 with SMTP id s17mr728852pyk.1172125202013; Wed, 21 Feb 2007 22:20:02 -0800 (PST) Received: by 10.35.114.1 with HTTP; Wed, 21 Feb 2007 22:20:01 -0800 (PST) Message-ID: Date: Thu, 22 Feb 2007 11:50:01 +0530 From: "Raghavendra MB" To: pgsql-jdbc@postgresql.org Subject: Class Cast Exception for DataSource MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6757_22586507.1172125201980" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.487 tagged_above=0 required=5 tests=AWL, BAYES_50, HTML_MESSAGE, SPF_PASS X-Spam-Level: * X-Archive-Number: 200702/115 X-Sequence-Number: 16671 ------=_Part_6757_22586507.1172125201980 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_6757_22586507.1172125201980 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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

 

 
------=_Part_6757_22586507.1172125201980--