Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 40333 invoked from network); 10 Dec 2008 17:56:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Dec 2008 17:56:43 -0000 Received: (qmail 38284 invoked by uid 500); 10 Dec 2008 17:56:44 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 38253 invoked by uid 500); 10 Dec 2008 17:56:44 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 38242 invoked by uid 99); 10 Dec 2008 17:56:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Dec 2008 09:56:43 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 128.253.83.141 is neither permitted nor denied by domain of dns4@cornell.edu) Received: from [128.253.83.141] (HELO authusersmtp.mail.cornell.edu) (128.253.83.141) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Dec 2008 17:56:29 +0000 Received: from atlantis.calsnet.cornell.edu (atlantis.calsnet.cornell.edu [128.253.209.216]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.13.1/8.12.10) with ESMTP id mBAHu8Ie012379 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 10 Dec 2008 12:56:08 -0500 (EST) Message-ID: <49400219.5040404@cornell.edu> Date: Wed, 10 Dec 2008 12:53:29 -0500 From: David Smith User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: problem in pooled database References: <37ee0090812100840v1446afa4pc95e7217d0dab70a@mail.gmail.com> <493FFCFB.4050406@cornell.edu> <37ee0090812100944m65922786s63bff4931b6403b5@mail.gmail.com> In-Reply-To: <37ee0090812100944m65922786s63bff4931b6403b5@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Ok... so what do the import statements at the top of that file look like? Seems to me java has taken DataSource to mean javax.activation.DataSource instead of javax.sql.DataSource. That's probably because of the imports at the top of your source file. --David ahmet temiz wrote: > Exception has taken place here: > > DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/bzk2"); > > this is my Application-specific resource (context.xml) > > crossContext="true" reloadable="true" debug="1"> > driverClassName="org.postgresql.Driver" url="jdbc:postgresql:// > 127.0.0.1:5432/bzk2" > username="orkun" password="222222" maxActive="20" maxIdle="10" > maxWait="-1" /> > > > thank you > > 2008/12/10 David Smith > > >> Patient says: It hurts when I do this... (demonstrates movement) >> Doctor says: Don't do that. >> >> Moral of the story is the error message is pretty clear. If your class >> has imported javax.activation.* and javax.sql.*, you may have to be more >> specific on the type of your datasource variable: >> >> javax.sql.DataSource dbDataSrc = /* code for retrieving the datasource */ >> >> For less sarcasm and more help, please feed us more details like say a >> snippet of code where this error occurs, what was imported for that >> class, and relevant parts of your config. >> >> --David >> >> ahmet temiz wrote: >> >>> hello >>> >>> I am trying to manage pooled database (postgresql).I am encountering >>> this problem : >>> >>> java.lang.ClassCastException: >>> org.apache.tomcat.dbcp.dbcp.BasicDataSource cannot be cast to >>> javax.activation.DataSource >>> >>> I will appreciate if you supply any information to me to overcome the >>> >> problem >> >>> kind regards >>> >>> Ahmet Temiz >>> >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org