Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 72940 invoked from network); 4 Sep 2006 01:21:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Sep 2006 01:21:38 -0000 Received: (qmail 33341 invoked by uid 500); 4 Sep 2006 01:21:32 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 33318 invoked by uid 500); 4 Sep 2006 01:21:32 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 33307 invoked by uid 99); 4 Sep 2006 01:21:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Sep 2006 18:21:32 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [17.250.248.173] (HELO smtpout.mac.com) (17.250.248.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Sep 2006 18:21:31 -0700 Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (Xserve/8.12.11/smtpout03/MantshX 4.0) with ESMTP id k841LR3c013578 for ; Sun, 3 Sep 2006 18:21:27 -0700 (PDT) Received: from [10.200.0.104] (pool-71-241-75-81.scr.east.verizon.net [71.241.75.81]) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 4.0) with ESMTP id k841L6MI007667 for ; Sun, 3 Sep 2006 18:21:08 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <000001c6cf9b$4597bad0$0a00000a@cartman> References: <000001c6cf9b$4597bad0$0a00000a@cartman> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Bob Dushok Subject: Re: Database pool problem Date: Sun, 3 Sep 2006 21:21:04 -0400 To: user@geronimo.apache.org X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAQAAA+k= X-Language-Identified: TRUE X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Rik, Thanks for the reply. The errors change when I make the code changes. I'm now encountering the following: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 12 in the jsp file: /demo/pooltest.jsp Generated servlet error: Type mismatch: cannot convert from Object to DataSource An error occurred at line: 12 in the jsp file: /demo/pooltest.jsp Generated servlet error: javax.sql.Connection cannot be resolved to a type Bob On Sep 3, 2006, at 4:55 PM, Rik wrote: > Hi, > > > Do you still have those errors if you replace your code with the > following? > > javax.naming.InitialContext ctx = new javax.naming.InitialContext(); > javax.sql.DataSource ds = ctx.lookup("java:comp/env/jdbc/cl"); > javax.sql.Connection con = ds.getConnection(); > > > Rik > > Within my code I attempt to access the pool as follows: > > InitialContext ctx = new InitialContext(); > DataSource ds = ctx.lookup("java:comp/env/jdbc/cl"); > Connection con = ds.getConnection(); > > When the page executes I receive the following errors: > org.apache.jasper.JasperException: Unable to compile class for JSP > > An error occurred at line: 12 in the jsp file: /demo/pooltest.jsp > Generated servlet error: > InitialContext cannot be resolved to a type > > An error occurred at line: 12 in the jsp file: /demo/pooltest.jsp > Generated servlet error: > InitialContext cannot be resolved to a type > > An error occurred at line: 12 in the jsp file: /demo/pooltest.jsp > Generated servlet error: > DataSource cannot be resolved to a type > > Could someone tell me what I've done incorrectly? The process seems > straightforward, but I've done something incorrectly. > > Thanks, > Bob > >