Hash: SHA256


On 11/16/17 12:24 PM, Vicky B wrote:
> It is XML parser (DOM and SAX ) from oracle (doc 
> <https://docs.oracle.com/cd/B10501_01/appdev.920/a96609/arj_xmlparserv

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.


- -chris

> On Thu, Nov 16, 2017 at 8:15 PM, Christopher Schultz < 
> ch...@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-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/


To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to