Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 71F5DB5D3 for ; Tue, 10 Jan 2012 07:40:50 +0000 (UTC) Received: (qmail 84542 invoked by uid 500); 10 Jan 2012 07:40:46 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 84112 invoked by uid 500); 10 Jan 2012 07:40:34 -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 84102 invoked by uid 99); 10 Jan 2012 07:40:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 07:40:33 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rmcnulty@clear.net.nz designates 203.97.33.68 as permitted sender) Received: from [203.97.33.68] (HELO smtp5.clear.net.nz) (203.97.33.68) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 07:40:23 +0000 Received: from Conservatory (121-73-52-127.cable.telstraclear.net [121.73.52.127]) by smtp5.clear.net.nz (CLEAR Net Mail) with SMTP id <0LXK008QRNWYSA00@smtp5.clear.net.nz> for users@tomcat.apache.org; Tue, 10 Jan 2012 20:38:58 +1300 (NZDT) Date: Tue, 10 Jan 2012 20:38:55 +1300 From: Ron McNulty Subject: Re: DB Connection error To: Tomcat Users List Message-id: <6DECD1B3AC924A2C8A39A878886DE711@Conservatory> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Mailer: Microsoft Outlook Express 6.00.2900.5931 Content-type: text/plain; format=flowed; charset=iso-8859-1; reply-type=response Content-transfer-encoding: 7bit X-Priority: 3 X-MSMail-priority: Normal References: X-Virus-Checked: Checked by ClamAV on apache.org Hi Anjib Port 8080 looks very odd. For an Oracle XE database, this is an HTTP connection to the database admin console, but you need a TNS connection direct to the database. Try "telnet localhost 1521" from the command line. If this connects, you probably have a standard Oracle database on its default port. I would expect something like url="jdbc:oracle:thin:@localhost:1521/XE" to connect to a local XE installation (the only supported schema name is XE). This works fine on my local installation. Else url="jdbc:oracle:thin:@localhost:1521/MYDBS" if you have a full local Oracle installation and MYDBS is the schema name. Note that the double slashes have gone in the URL. You will also need to put a copy of ojdb6.jar in the Tomcat shared libs directory. You can easily test the connection string by using a simple SQL client like SQuirrel SQL. Hope that helps. Regards Ron ----- Original Message ----- From: "Anjib Mulepati" To: "Tomcat Users List" Sent: Wednesday, January 04, 2012 7:26 AM Subject: Re: DB Connection error > On 1/3/2012 1:12 PM, Chema wrote: >> 2012/1/3 Anjib Mulepati: >>> Hi All, >>> >>> One simple question If I have JINDI configuration in my application will >>> my >>> application reconnect to the DB whenever my DB gets restart. >>> I am having DB connection problem every Monday since our DB get >>> restarted on >>> weekends which we don't have control of. >>> I am using Tomcat 6.0.20 >> Hi: >> >> can you attach your element in server.xml file ( except >> sensible data )? > > I haven't change anythign in server.xml so i have default in it > > type="org.apache.catalina.UserDatabase" > description="User database that can be updated and saved" > > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > pathname="conf/tomcat-users.xml" /> > > > But in my application I have context.xml with following > > > driverClassName="oracle.jdbc.driver.OracleDriver" > maxActive="20" > maxIdle="10" > maxWait="-1" > name="jdbc/myName" > password="myPassword" > type="javax.sql.DataSource" > url="jdbc:oracle:thin:@//localhost:8080/MYDBS" > username="myUsername" > /> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org