From users-return-194097-apmail-tomcat-users-archive=tomcat.apache.org@tomcat.apache.org Wed Apr 01 10:17:46 2009 Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 17537 invoked from network); 1 Apr 2009 10:17:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2009 10:17:46 -0000 Received: (qmail 32334 invoked by uid 500); 1 Apr 2009 10:17:42 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 32270 invoked by uid 500); 1 Apr 2009 10:17:42 -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 32259 invoked by uid 99); 1 Apr 2009 10:17:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 10:17:42 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mighty.tornado@gmail.com designates 209.85.221.134 as permitted sender) Received: from [209.85.221.134] (HELO mail-qy0-f134.google.com) (209.85.221.134) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 10:17:35 +0000 Received: by qyk40 with SMTP id 40so450341qyk.30 for ; Wed, 01 Apr 2009 03:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=/k46bGvBp2tVoTKns6Xlz/zq41RukHpGwlIHabeDoGA=; b=QxqiXM9ua/7CuX4vUJjOWxvE8HiTqAFzMu8tJfnDgjEN5sxmmivbi25HSGN2smyZKm Vp9GnqhKHm4UKEsUCV59ijLuPDY9lKbwMVCvjZUsaLH8BeLo8O7ccikrq6e2sssYjHKQ loe8lfVvnurFQdPa8G4Tw5b1bTS9/drRZ1S2A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=n00Q/GxI3bKdt+xZq512qx0qaX8bNaGZURW9tgru2IRZQEsVKmILIICmxgZld97jUW xnqZhOqx6ATWcU8pOXV4YW26v7Pafuag4yeTHh2jU2o/A7c9Fe50OB0yWOWkzfFCo5qD rhUUKYvLoQadNx/UP2eV0sQ2SIcI71dWRALJ0= MIME-Version: 1.0 Received: by 10.224.2.202 with SMTP id 10mr9615999qak.337.1238581034434; Wed, 01 Apr 2009 03:17:14 -0700 (PDT) In-Reply-To: <538752d80904010309j2d62f664h9f69b00db7323111@mail.gmail.com> References: <8bab7ada0903311836h4ee6304n8d9eabff72aca82a@mail.gmail.com> <8bab7ada0904010257n94e3b1ei9bcdb2305ba9aabb@mail.gmail.com> <5916CCF0-F069-4B5A-B86C-6892BD092ECA@googlemail.com> <8bab7ada0904010307n75ef929bqf30454f6d69e5ed5@mail.gmail.com> <538752d80904010309j2d62f664h9f69b00db7323111@mail.gmail.com> Date: Wed, 1 Apr 2009 06:17:14 -0400 Message-ID: <8bab7ada0904010317n606dcf82r54c86c301f770597@mail.gmail.com> Subject: Re: DataSource from Context files - doesn't work From: Mighty Tornado To: Tomcat Users List Content-Type: multipart/alternative; boundary=0015175cd62095438e04667b9e56 X-Virus-Checked: Checked by ClamAV on apache.org --0015175cd62095438e04667b9e56 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I have the following files in the logs directory: admin.2009-04-01.log catalina.out localhost.2009-04-01.log catalina.2009-04-01.log host-manager.2009-04-01.log manager.2009-04-01.log Which one of them should I VI or LESS to find the complete stack trace for the exception? Also, is there something obviously wrong with my context definition or reference? I followed the Tomcat online tutorial to define them. Also, previously a regular JDBC code with the same parameters was able to access the DB and retrieve the data correctly. Thank you all. On Wed, Apr 1, 2009 at 6:09 AM, Yassine wrote: > don't "tail -f" > use less and copy the part containing the exception from its beginning > to the end. > > > > On Wed, Apr 1, 2009 at 12:07 PM, Mighty Tornado > wrote: > > Where can I obtain it? > > The exception that I posted is the only exception that showed up > following > > "tail -f *" > > > > On Wed, Apr 1, 2009 at 6:04 AM, Gregor wrote: > > > >> your log is useless. > >> please post the complete stacktrace incl. the type of the exception > >> > >> rds > >> > >> gregor > >> > >> Am 01.04.2009 um 11:57 schrieb Mighty Tornado >: > >> > >> > >> Additional info: > >>> > >>> I get the following exception in the log when I start the server up: > >>> > >>> ==> localhost.2009-03-03.log <== > >>> at > >>> > >>> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > >>> at > >>> > >>> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > >>> at > >>> > >>> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) > >>> at > >>> > >>> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > >>> at > >>> > >>> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > >>> at > >>> > >>> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) > >>> at > >>> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) > >>> at > >>> > >>> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) > >>> at > >>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) > >>> at java.lang.Thread.run(Thread.java:613) > >>> > >>> > >>> > >>> I use the following code to get the connection: > >>> > >>> InitialContext ic = new InitialContext(); > >>> > >>> if(ic == null) > >>> { > >>> System.out.println("context not found"); > >>> } > >>> > >>> DataSource ds = > >>> (DataSource)ic.lookup("java:comp/env/jdbc/vhousehold"); > >>> > >>> if(ds == null) > >>> { > >>> System.out.println("DataSource not found"); > >>> } > >>> > >>> conn = ds.getConnection(); > >>> > >>> stat = conn.createStatement(); > >>> > >>> rs = stat.executeQuery("SELECT * FROM family_member "); > >>> > >>> On Tue, Mar 31, 2009 at 9:36 PM, Mighty Tornado < > mighty.tornado@gmail.com > >>> >wrote: > >>> > >>> Hi I placed the following in context.xml in META-INF. > >>>> But the result set is null, what's wrong with my set up?Can anybody > >>>> please > >>>> advise? > >>>> > >>>> > >>>> > >>>> >>>> auth="Container" > >>>> description="DB Connection" > >>>> name="jdbc/vhousehold" > >>>> type="javax.sql.DataSource" > >>>> password="vhousehold" > >>>> driverClassName="com.mysql.jdbc.Driver" > >>>> maxIdle="2" > >>>> maxWait="5000" > >>>> validationQuery="select * from family_member;" > >>>> username="vhousehold" > >>>> url="jdbc:mysql://localhost:3306/vhousehold" > >>>> maxActive="4"/> > >>>> > >>>> > >>>> Thanks, > >>>> > >>>> Ramy. > >>>> > >>>> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > >> For additional commands, e-mail: users-help@tomcat.apache.org > >> > >> > > > > > > -- > -- > Yassine Elassad > Bonn, Germany. > Fon : +49 228 97629355 > Mobile : +49 157 74519666 > > PEACE : > ( P ) Positive ( E ) Energy ( A ) Always ( C ) Correct ( E ) Errors. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --0015175cd62095438e04667b9e56--