Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 40701 invoked from network); 27 Feb 2008 07:28:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Feb 2008 07:28:32 -0000 Received: (qmail 78852 invoked by uid 500); 27 Feb 2008 07:28:26 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 78832 invoked by uid 500); 27 Feb 2008 07:28:26 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Delivered-To: moderator for derby-user@db.apache.org Received: (qmail 50635 invoked by uid 99); 27 Feb 2008 03:29:58 -0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of michael.dockery@us.army.mil designates 143.69.250.38 as permitted sender) DomainKey-Signature: s=ako; d=us.army.mil; c=nofws; q=dns; h=From:X-AKO:X-IronPort-AV:Received:Message-ID: Disposition-Notification-To:Date:User-Agent:MIME-Version: To:Subject:Content-Type:Content-Transfer-Encoding; b=R+DtlsmDyAZ6ppdl7jW9KHqF2oaG7njHoF02y0pSu2p3DNJyyyyy/7Ba RHYd83e3+Ul3vmnWBqdv4MtbK0IsZw==; From: "Dockery, Michael E SFC NG NG NGB" X-AKO: 105356484:69.252.239.168:27 Feb 2008 03:29:28 +0000:$AuthSMTP:-4.0 X-IronPort-AV: E=Sophos;i="4.25,411,1199664000"; d="scan'208";a="105356484" Message-ID: <47C4D904.3060808@us.army.mil> Date: Tue, 26 Feb 2008 22:29:08 -0500 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: derby-user@db.apache.org Subject: getconnection error using Derby and tomcat6/jndi Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I am trying to get derby working on tomcat6 via jndi my context.xml looks like this: my web.xml looks like this ... Setup Database jdbc/derbyDB javax.sql.DataSource Container ... my java code gets the datasource from jndi just fine envCtx = (javax.naming.Context) initCtx.lookup("java:comp/env"); ds=(DataSource)envCtx.lookup("jdbc/derbyDB"); but it fails when i try to getConnection conn = ds.getConnection(); i am not sure what i am doing wrong here. Any ideas? Thank you Michael ps: note: the commandline ij tool works fine also: C:\Documents and Settings\Lisa>ij ij version 10.3 ij> connect 'jdbc:derby://192.168.1.100/setupDB'; ij> show tables; TABLE_SCHEM |TABLE_NAME |REMARKS ------------------------------------------------------------------------ SYS |SYSALIASES | ...