Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 16461 invoked from network); 29 Jul 2009 11:55:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Jul 2009 11:55:56 -0000 Received: (qmail 33542 invoked by uid 500); 29 Jul 2009 11:55:56 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 33442 invoked by uid 500); 29 Jul 2009 11:55:55 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 33432 invoked by uid 99); 29 Jul 2009 11:55:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jul 2009 11:55:55 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [193.252.22.192] (HELO smtp6.freeserve.com) (193.252.22.192) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jul 2009 11:55:45 +0000 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3622.me.freeserve.com (SMTP Server) with ESMTP id 770D87000082 for ; Wed, 29 Jul 2009 13:55:22 +0200 (CEST) Received: from smtp.homeinbox.net (unknown [91.109.152.220]) by mwinf3622.me.freeserve.com (SMTP Server) with ESMTP id 4242D7000084 for ; Wed, 29 Jul 2009 13:55:22 +0200 (CEST) X-ME-UUID: 20090729115522271.4242D7000084@mwinf3622.me.freeserve.com Received: from localhost (localhost [127.0.0.1]) by smtp.homeinbox.net (Postfix) with ESMTP id BA1481A4F58 for ; Wed, 29 Jul 2009 12:55:01 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at homeinbox.net Received: from smtp.homeinbox.net ([127.0.0.1]) by localhost (server01.dev.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y7ZZYSvbN6f6 for ; Wed, 29 Jul 2009 12:54:58 +0100 (BST) Received: from [192.168.0.9] (study03.dev.local [192.168.0.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.homeinbox.net (Postfix) with ESMTPSA id 7E3001A4F0C for ; Wed, 29 Jul 2009 12:54:58 +0100 (BST) Message-ID: <4A70388C.8010602@apache.org> Date: Wed, 29 Jul 2009 12:54:52 +0100 From: Mark Thomas User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Commons Users List Subject: Re: dbcp issue: unable load commons-dbcp.jar and commons-pool.jar in lib/ext References: <4A6EF2ED.2080708@yale.edu> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org bye webster wrote: > I had follow through the guideline from > http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html. > It is not working, it unable locate the in . The > datasource.getConnection was return null. My appBase is mainhost and web > application is webapps directory. You will probably have more luck asking for help on the Tomcat users list. Mark > > This is my context in server.xml > > reloadable="true" crossContext="true"> > type="javax.sql.DataSource" > driverClassName="com.informix.jdbc.IfxDriver" > > url="jdbc:informix-sqli://hostname:port/dbname:INFORMIXSERVER=servernum;" > username="uid" password="password" maxActive="20" > maxIdle="10" maxWait="-1"/> > > > > This is my web.xml > > > DB Connection > jdbc/myinformix > javax.sql.DataSource > Container > > > this is how system invoked > > Context initContext = new InitialContext(); > Context envContext = (Context) initContext.lookup("java:/comp/env"); > DataSource ds = (DataSource) envContext.lookup("jdbc/myinformix"); > Connection conn = ds.getConnection(); > > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > On Tue, Jul 28, 2009 at 8:45 PM, Mark Shifman wrote: > >> You need to follow the tomcat documentation >> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html >> and you don't need to download anything. >> >>> DBCP uses the Jakarta-Commons Database Connection Pool. It relies on >>> number of Jakarta-Commons components: >>> >>> * Jakarta-Commons DBCP >>> * Jakarta-Commons Collections >>> * Jakarta-Commons Pool >>> >>> These libraries are located in a single JAR at >>> |$CATALINA_HOME/common/lib/naming-factory-dbcp.jar|. However, only the >>> classes needed for connection pooling have been included, and the packages >>> have been renamed to avoid interfering with applications. >>> >> >> bye webster wrote: >> >>> Hello, >>> >>> I recently research on how to implement Database Connection Pooling into >>> Tomcat 5.5 server. >>> After downloaded dbcp.jar and pool.jar from Jakarta project and I follow >>> through the guideline provided. >>> Unfortunately, It is only working when i set jar file path in CLASSPATH >>> but >>> it unable load it when it is keep inside jre/lib/ext directory. >>> I thought all the jar will load in /lib/ext directory for all tomcat user. >>> >>> Who's know what's happening? i don't want messy my classpath setting so >>> who's know how to load it from lib/ext directory? >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >> For additional commands, e-mail: user-help@commons.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org