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 4D1DD11692 for ; Wed, 3 Sep 2014 15:39:56 +0000 (UTC) Received: (qmail 64264 invoked by uid 500); 3 Sep 2014 15:39:40 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 64190 invoked by uid 500); 3 Sep 2014 15:39:40 -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 64179 invoked by uid 99); 3 Sep 2014 15:39:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2014 15:39:40 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.216.180] (HELO mail-qc0-f180.google.com) (209.85.216.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2014 15:39:34 +0000 Received: by mail-qc0-f180.google.com with SMTP id c9so8676186qcz.25 for ; Wed, 03 Sep 2014 08:39:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=U7jQSIZYIdmOLWsFp2+c/ArnGSdqnfgE7GSqVl5fAts=; b=h26XYAYRc2BnTnfMvu7PPzHujhkritGncxp1EVbVMFZIHod1je0EPDL3kz5V+mP3RI uBNx9Wx4nev6S8tszbUiblR/hXMiAUhQgiLAWyy6hYL6c8gcbp6JlpQptijTJI2u5uPC hrxkZ/aKzsJJzI31dyQTgPBlPMjPqcNh4ncf1OrQwSVxgNWu2gDqNr1mhiKtGpVDmIOu hGgzKwqn1B9eZNmFzRpKQBrbIKm2jwJ7E4pQ9Yp3lhQ8EMhex53kkoLVroFmx9rz+ByP ghbkm3fdvG9AwArztOrK0JEUHE4TzEFuUUyVyLrZF9L3FfwLIvJJN9WHXHy2pjjx3yjk E7tw== X-Gm-Message-State: ALoCoQnI7ldq5FgneTCbe5O91u6lHhJR+uuME7Btu2H283+ymUhwqL0kF/uET6djb+wAO7DpsuYl MIME-Version: 1.0 X-Received: by 10.229.65.135 with SMTP id j7mr66437412qci.22.1409758751011; Wed, 03 Sep 2014 08:39:11 -0700 (PDT) Received: by 10.96.159.226 with HTTP; Wed, 3 Sep 2014 08:39:10 -0700 (PDT) In-Reply-To: References: Date: Wed, 3 Sep 2014 09:39:10 -0600 Message-ID: Subject: Re: Global JNDI resources lookup behavior difference between version 6.0.39 and 6.0.41/7.0.55 From: Filip Hanik To: Tomcat Users List Content-Type: multipart/alternative; boundary=001a11339d2292cf7505022b091d X-Virus-Checked: Checked by ClamAV on apache.org --001a11339d2292cf7505022b091d Content-Type: text/plain; charset=UTF-8 can you post your configuration file. that will be the only way we can help you fix it, as I doubt tomcat will go back to pre 6.0.41 days :) Filip On Wed, Sep 3, 2014 at 9:36 AM, Robert Anderson wrote: > Hi, > > > In a privileged context, a have the following jsp to test a global jndi > resource: > > <%@ page session="false" import="java.util.*,java.sql.*,javax.naming.*, > javax.sql.*,org.apache.commons.dbcp.*" contentType="text/html" %> > <%! > > protected void doLookup(JspWriter out) throws ServletException, IOException > { > Context ctx; > try { > ctx = new InitialContext(); > Object o = ctx.lookup("java:jdbc/cacheapp"); > out.println(o); > > > } catch (NamingException e) { > out.println(e.getMessage()); > } catch (Exception e) { > } > } > > %> > > > > Test JNDI > > > >

Teste JNDI

>
> <% > doLookup(out); > %> >
> > > > > > Versions earlier than 6.0.41: > > org.apache.tomcat.jdbc.pool.DataSource@29050dfd > {ConnectionPool[defaultAutoCommit=null; > defaultReadOnly=null; defaultTransactionIsolation=-1; defaultCatalog=null; > driverClassName=com.intersys.jdbc.CacheDriver; maxActive=10; maxIdle=2; > minIdle=1; initialSize=10; maxWait=10000; testOnBorrow=true; > testOnReturn=false; timeBetweenEvictionRunsMillis=5000; > numTestsPerEvictionRun=0; minEvictableIdleTimeMillis=60000; > testWhileIdle=false; testOnConnect=false; password=********; > url=jdbc:Cache://localhost:1972/USER; username=tomcat; > validationQuery=select 1 from dual; validationQueryTimeout=-1; > validatorClassName=null; validationInterval=0; > accessToUnderlyingConnectionAllowed=true; removeAbandoned=true; > removeAbandonedTimeout=300; logAbandoned=false; connectionProperties=null; > initSQL=null; jdbcInterceptors=null; jmxEnabled=true; fairQueue=true; > useEquals=true; abandonWhenPercentageFull=0; maxAge=0; useLock=false; > dataSource=null; dataSourceJNDI=null; suspectTimeout=0; > alternateUsernameAllowed=true; commitOnReturn=false; > rollbackOnReturn=false; useDisposableConnectionFacade=true; > logValidationErrors=false; propagateInterruptState=false; > ignoreExceptionOnPreLoad=false; } > > > 6.0.41 and 7.0.55: > > Name jdbc is not bound in this Context > > That is a bug? > > > We are having a issue in psi-probe because this behavior change ( > https://code.google.com/p/psi-probe/issues/detail?id=411). > > > Thanks in advance. > --001a11339d2292cf7505022b091d--