Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 69781 invoked from network); 10 Dec 2008 18:50:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Dec 2008 18:50:06 -0000 Received: (qmail 6253 invoked by uid 500); 10 Dec 2008 18:50:05 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 6228 invoked by uid 500); 10 Dec 2008 18:50:05 -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 6217 invoked by uid 99); 10 Dec 2008 18:50:05 -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 10:50:05 -0800 X-ASF-Spam-Status: No, hits=4.6 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS,URIBL_RHS_DOB,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ahmettemiz88@gmail.com designates 209.85.132.249 as permitted sender) Received: from [209.85.132.249] (HELO an-out-0708.google.com) (209.85.132.249) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Dec 2008 18:49:50 +0000 Received: by an-out-0708.google.com with SMTP id c38so366883ana.9 for ; Wed, 10 Dec 2008 10:49:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=l3Zut8Mzil7GkhSZ+nwoYFNYHWhbnrxt+RkIQGwP4w4=; b=r9p+F47TuBah1FizdFdpjtfRAtD1H3UEttv3MywaCHWxmfSvBPjwVPixRW0/WXsi9x 2S4DT0VkNHLJAtyAAEhCcdix3l3XJPYKxu/CT8590g87dBIeVt6FRhuKQyw03b1s3r8B 1iuE6gj/woEf1aisVXl9AopMHERXrFUWCwSmE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=dZ8bskFq7ILmAo7GvHPzNJOB/Zus0zgPiiwexUimGCY4GRUGNdQI9l1fINGK2UiVWb wzT0Z2cKPFWbWq/C4mJDTCJydAeRryP1y1Gy4wT5EpnjxwIFSp1k55t1GvpBfxU/Ubty xNtXyPzwhuFhvN/asn1mIpsVRcZ+od7CKq3JU= Received: by 10.64.7.5 with SMTP id 5mr1354025qbg.86.1228934959515; Wed, 10 Dec 2008 10:49:19 -0800 (PST) Received: by 10.65.234.5 with HTTP; Wed, 10 Dec 2008 10:49:19 -0800 (PST) Message-ID: <37ee0090812101049i3389e385qe2f32e2821b26421@mail.gmail.com> Date: Wed, 10 Dec 2008 20:49:19 +0200 From: "ahmet temiz" To: "Tomcat Users List" Subject: Re: problem in pooled database In-Reply-To: <49400219.5040404@cornell.edu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_47531_30149514.1228934959519" References: <37ee0090812100840v1446afa4pc95e7217d0dab70a@mail.gmail.com> <493FFCFB.4050406@cornell.edu> <37ee0090812100944m65922786s63bff4931b6403b5@mail.gmail.com> <49400219.5040404@cornell.edu> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_47531_30149514.1228934959519 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Now, it seems ok after disabling javax.activation.DataSource; //import javax.activation.DataSource; import javax.sql.DataSource; thank you 2008/12/10 David Smith > 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"> > > type="javax.sql.DataSource" > > 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 > > ------=_Part_47531_30149514.1228934959519--