Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 95A8E200BB6 for ; Fri, 4 Nov 2016 12:19:33 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 92A19160AE9; Fri, 4 Nov 2016 11:19:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D9786160AE8 for ; Fri, 4 Nov 2016 12:19:32 +0100 (CET) Received: (qmail 55891 invoked by uid 500); 4 Nov 2016 11:19:31 -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 55876 invoked by uid 99); 4 Nov 2016 11:19:31 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2016 11:19:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 934F61A0502 for ; Fri, 4 Nov 2016 11:19:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id R3OT_GakPxY9 for ; Fri, 4 Nov 2016 11:19:29 +0000 (UTC) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 2F6DC5F5A1 for ; Fri, 4 Nov 2016 11:19:29 +0000 (UTC) Received: by mail-wm0-f45.google.com with SMTP id t79so42993298wmt.0 for ; Fri, 04 Nov 2016 04:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=gKpDZ7MMTjKyeWdRz/1ZeBAvUO6pi/C8nIYKE8EQ4bs=; b=U8UUuVp138CUpp53UWFWLSFmQu2vsNEa+/tXM4Adq4EG8ZSqrAyYsGq/225cMorFHV lzGfYxDZuwg2rAXoI+0DJGG5ZWZ3mpYZVGsio2ssQ93CEROgT7juGRgK/8aFiQdmMgn7 eXSiaF26bsjo6QiEt8a6z6RNIMm5RwyAcvdxkylDJeXOkkLM/QmLSWwXmfYo7beGnOis ds3yAOfBg882j6XijuRgthNgDBgw+ypRKmKEeOCkotic9BpZ3eZp7Ih2CE3JH+vtbpkH 5tPONX+LkiHR84uvInDQulUm110U+NqqQ9iO5+a6faUGKTSybvjeasIHtMgqb00FTtXO IwYQ== 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:from:date :message-id:subject:to; bh=gKpDZ7MMTjKyeWdRz/1ZeBAvUO6pi/C8nIYKE8EQ4bs=; b=GzIrI9OaVawpH/CmBBH9xKwScuCspIQ4V19asl93DfQ/RM/gk2pswzZXkxuNV3LoNZ T4o3xs4Dg6HLAh1ap/G/XUoi5vC/cHVJhjAw1mTqGUA+teL4HioRyb7jek+LQvT9/Lvo ojcIedRE/K8z56Hc2Tvx9lhdsu9ACGIOyChBCSPkWTNCTGWmtyzH8Tsev3PULGcUrN9K NkXlWngf1x2gEOs1ggorTWD4H8REYtEJAiWdbimcvk/6xaWuIA07oWioNS0cbyRqZpgM P8Rv2S8gy0NYtPKzZYmXK9SHqCL0S0BZmfIfIExaAWzFXyEztT/ZepOswAR1FkiujVFJ Yc4A== X-Gm-Message-State: ABUngvdZ89WyFKHy/D61b5yQdtN+VR1nprlo/ojnLwfc8UH8MFd58UO9iXqTTwmsO2bm39eJYPD3oyJ4iaYfmQ== X-Received: by 10.194.96.164 with SMTP id dt4mr11510634wjb.28.1478258331412; Fri, 04 Nov 2016 04:18:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.166.37 with HTTP; Fri, 4 Nov 2016 04:18:50 -0700 (PDT) In-Reply-To: <1cd15f9a-992b-b4bd-06a8-b8445cddb775@apache.org> References: <1cd15f9a-992b-b4bd-06a8-b8445cddb775@apache.org> From: padma T Date: Fri, 4 Nov 2016 16:48:50 +0530 Message-ID: Subject: Re: JNDI lookup failure with tomcat 8.5.6 To: Tomcat Users List Content-Type: multipart/alternative; boundary=047d7bd91970baef08054077d67c archived-at: Fri, 04 Nov 2016 11:19:33 -0000 --047d7bd91970baef08054077d67c Content-Type: text/plain; charset=UTF-8 Hi, Is there a way to add our application's contextclassloader to the list of tomcat's " Bindings class loader list " so that "ContextBindings.isClassLoaderBound()" returns true? Please correct me if i'm wrong in understanding the problem!! Thanks, Padma On Fri, Nov 4, 2016 at 4:16 PM, Mark Thomas wrote: > On 04/11/2016 10:45, padma T wrote: > > Hi, > > > > Getting ,JNDI lookup failed exception while starting tomcat 8. > > > > While debugging it was found that getInitialContext() > > of org.apache.naming.java.javaURLContextFactory class returns > NamingContext > > context instead of the custom ContextClassLoader set by our application > > and the reason is "ContextBindings.isClassLoaderBound()" return false > for > > application's custom ContextClassLoader. > > > > Code to set custom contextloader : > > > > Thread.currentThread().setContextClassLoader(classLoader); > > > > > > Please let me know if i have to do any configurations for tomcat 8, to > > resolve this issue . > > Any custom class loader needs to have the web application class loader > as a parent to pick up JNDI resources. > > Mark > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --047d7bd91970baef08054077d67c--