Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 76160 invoked from network); 26 Feb 2002 05:59:42 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 26 Feb 2002 05:59:42 -0000 Received: (qmail 18379 invoked by uid 97); 26 Feb 2002 05:59:30 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 18304 invoked by uid 97); 26 Feb 2002 05:59:29 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 18293 invoked from network); 26 Feb 2002 05:59:29 -0000 X-Originating-IP: [66.122.207.66] From: "Ross Fujii" To: tomcat-user@jakarta.apache.org Bcc: Subject: Re: Tomcat 4.0.2 - MySQL Connection Pooling Date: Mon, 25 Feb 2002 21:59:29 -0800 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 26 Feb 2002 05:59:29.0731 (UTC) FILETIME=[C1164130:01C1BE8A] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello Michael, Yesssssss, I just got it working this past evening!!!!! I've been on it for a few days and have tried everything I could think of. =O To install Tomcat 4.0.2 and get JNDI working, I used the RPM found in the standard download area named - tomcat4-4.0.2-2.noarch.rpm along with the dependent RPMs: - regexp-1.2-1.noarch.rpm - servletapi4-4.0.2-1.noarch.rpm - xerces-j-1.4.4-2.noarch.rpm This should create the proper user for you and install the proper init.d start/stop scripts. I then replaced the tomcat4/ directory that the RPM placed on my server with the jakarta-tomcat-4.0.2/ directory found in the GZip-TAR'd regular Tomcat install base file named jakarta-tomcat-4.0.2.tar.gz (e.g. non-RPM version) and configured JNDI as below and things worked!!! =) I'm thinking that the proper libraries weren't installed by the RPM or something in the install didn't go right??? Not sure what no-arch signifies in the RPMs above, but maybe I was just using the wrong install???? I tried adding and replacing JARs, but I couldn't find the right combo that would enable the JNDI resource. It was consistent as I couldn't create a mail JNDI resource either. If you replace the entire tomcat directory and thus the proper JARs, you should get it working..... Best regards, ---Ross From: Michael Donaghy To: Ross Fujii Subject: Re: Tomcat 4.0.2 - MySQL Connection Pooling Date: 25 Feb 2002 23:31:02 -0500 By any chance do you have your problem working yet? I think I've got a problem very similar to yours that I've spent quite a few hours on. Thanks! Michael On Fri, 2002-02-22 at 17:14, Ross Fujii wrote: >Hello, > >I'm trying to setup JNDI connection pooling in Tomcat 4.0.2 to a MySQL >(v3.23.49) database. I'm also running an Apache 1.3.20 AJP13 connector >(using mod_jk) if that makes a difference all on a RedHat Linux 7.2 server. > >The following is a snippet of the JNDI resource creation in server.xml: > > unpackWARs="true"> reloadable="true" privileged="true"> name="jdbc/TestDB" auth="Container" >type="javax.sql.DataSource"/> > userroot >passwordaseraser > driverClassName >org.gjt.mm.mysql.Driver > driverName >jdbc:mysql://localhost/menagerie > > >The following is the corresponding web.xml: > jdbc/TestDB >javax.sql.DataSource >Container > >The sample code that I'm using in a servlet to grab the connection is the >following: //Get the pooled DB connection Context initCtx = >new InitialContext(); Context envCtx = >(Context)initCtx.lookup("java:comp/env"); DataSource ds = >(DataSource)envCtx.lookup("jdbc/TestDB"); > > //Connect to the DB data source and run a query .... > >The exception that is being thrown is: > > javax.naming.NamingException: Cannot create resource instance > >I was wondering if there is somemthing that I'm still missing??? > >Some other notes: -- Have setup connection pooling to SQL 2000 DB on >Windows 2000 using Tomcat 4.0.2b1 with no problem. -- Have coded a >stand-alone application that works and is able to connect to MySQL and >query the DB with no problems -- Have upgraded to the latest MySQL 2.0.11 >driver > >Any help or advice would be greatly appreciated. Thanks in advance, --Ross > >-- >To unsubscribe: For >additional commands: Troubles >with the list: _________________________________________________________________ Join the world�s largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe: For additional commands: Troubles with the list: