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 2EB66200D3E for ; Thu, 16 Nov 2017 19:10:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2D103160BEA; Thu, 16 Nov 2017 18:10:00 +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 724FC1609EF for ; Thu, 16 Nov 2017 19:09:59 +0100 (CET) Received: (qmail 32335 invoked by uid 500); 16 Nov 2017 18:09:57 -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 32324 invoked by uid 99); 16 Nov 2017 18:09:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2017 18:09:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id DD81E1807D8 for ; Thu, 16 Nov 2017 18:09:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.999 X-Spam-Level: X-Spam-Status: No, score=0.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, SPF_HELO_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id zi4VuD4tZj4b for ; Thu, 16 Nov 2017 18:09:55 +0000 (UTC) Received: from mailbox.servedge.com (li1281-212.members.linode.com [45.79.182.212]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id AF5425FBEE for ; Thu, 16 Nov 2017 18:09:54 +0000 (UTC) Received: (qmail 7807 invoked by uid 513); 16 Nov 2017 12:09:54 -0600 Received: from pool-173-66-116-184.washdc.fios.verizon.net (HELO Christophers-iMac.local) (chris@christopherschultz.net@173.66.116.184) by mailbox.servedge.com with ECDHE-RSA-AES128-GCM-SHA256 encrypted SMTP; 16 Nov 2017 12:09:54 -0600 Subject: Re: Tomcat Xml parser issue To: users@tomcat.apache.org References: <99cb9410-32ac-1c87-c695-7930676f5068@christopherschultz.net> From: Christopher Schultz Message-ID: Date: Thu, 16 Nov 2017 13:09:53 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit archived-at: Thu, 16 Nov 2017 18:10:00 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Vicky, On 11/16/17 12:24 PM, Vicky B wrote: > It is XML parser (DOM and SAX ) from oracle (doc > ) > > . Why do you need a custom XML parser? Why not simply use the one bundled with the JRE? > Why is tomcat using XMLparserv2 Where is the xmlparserv2.jar file? Some badly-behaved libraries install themselves as the "system" parser when they are used even if they aren't being loaded by the system or application (which doesn't mean YOUR application) ClassLoader. If that happens, you can get weird problems like this. > tomcat we have in linux machine is from redhat . Why does tomcat > downloaded from apache tomcat site work different form the one > provided by REDHat. Package managers often make adjustments that make sense for their environments. I suspect that this problem has less to do with RedHat's Tomcat package and more to do with how you deploy your application, its libraries, etc. > how does class loading work in tomcat. Tomcat sets up a ClassLoader for itself to work in. For each webapp, a separate ClassLoader is created for them to work in with the Tomcat server ClassLoader as the parent. But the webapp's ClassLoader is a "child-first" ClassLoader meaning that classes and libraries bundled with the application are preferred when code is executing in the application's context. If you had told us your Tomcat version (or anything else about your environment), we might have been able to help more, but you aren't providing much in the way of information. Assuming Tomcat 8.0 (because why not?), here is the explanation for how class loading works in Tomcat. Almost as if someone was /trying/ to make that information available for people looking for it. https://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html - -chris > On Thu, Nov 16, 2017 at 8:15 PM, Christopher Schultz < > chris@christopherschultz.net> wrote: > > Vicky, > > On 11/16/17 6:53 AM, Vicky B wrote: >>>> Hi All, >>>> >>>> I have application which is using spring , ESAPI and oracle >>>> xmlparserv2.jar , this application works fine in my local >>>> tomcat on windows but when i deployed in linux server with >>>> linux based apache tomcat i got below error when spring >>>> container was trying to parse application specific xmls >>>> >>>> org.apache.catalina.core.StandardContext.listenerStart >>>> Exception sending context initialized event to listener >>>> instance of class >>>> org.springframework.web.context.ContextLoaderListener >>>> >>>> org.springframework.beans.factory.BeanDefinitionStoreException: >>>> >>>> Parser configuration exception parsing XML from class path >>>> resource [spring/spring-context.xml]; nested exception is >>>> javax.xml.parsers.ParserConfigurationException: Unable to >>>> validate using XSD: Your JAXP provider >>>> [oracle.xml.jaxp.JXDocumentBuilderFactory@526ad194] does not >>>> support XML Schema. Are you running on Java 1.4 with Apache >>>> Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD >>>> support. >>>> >>>> >>>> when i removed xmlparserv2.jar from my war file the >>>> application worked fine , what is the issue is this due to >>>> class loading issue or could be possible reason for this >>>> issue . Does tomcat provide xml parser which spring loads. > > What is xmlparserv2.jar? > > -chris >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> > > -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAloN1HEdHGNocmlzQGNo cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFgmGw//fHmI57J/4FbsA14y Fdm8rVjx4i6uktp4Uue6eLYAmknGuBUuwzHjL9QGfD4exZFm1ve9AckS6H4CjrZL 4r9ewVc0Vqpslbztymw7eJMY2+A4Ra8nGDot6uFbjmLmmd1a/whMjBwZZVtqzJQq IrdqHBikZEZKHI/5l3YOx38TKGKevMveQySzge7JKcqd8DnlukxTkyBC/hgv22mh w0g/m5XdSilNSMd4NOI8nznaCNgrBGaiUgwApg8RWuBRh1QRGt7ETG/BOETaz2lD y7x0+2xqoo1aV6HspPoi6A2JQ+eNxoDcBL9Q+BsDGGBx4JwfveMFMT2hyi+Xpjax eQVBKNcpF2sdISX1ApNgtgLACHvSXIckSJslOYyZlAeI9G9w2wuyDn3WoOtUwQTe L+1RNloBZ4TX7lY7MnxQAS3XnKvL9bVXVOIOqosQ2bdbABNODl/6ghTOWC+fRPcO 8GdbLvt++/s8zQxzb8g9SnsqiX++hgHQHXol/4WKXMZBnJwc4em2pjuSn+HV4bwH kt0AF4TzKnbfQdlFZ9u6uS/lOLNbUU5fQR9x7Ssj1GnfsIgqwjVaMEipo8Ro+myx eFid1I33u0ikzc4cmS+78pL5YyXxFlLpz7ZQFa3VNcXe41tahk3TUhJwa8Yu7+bU 5CDBSfCVQT5VOm5uW7e3lPhnLLo= =DMVE -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org