-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Vicky,
On 11/16/17 1:30 PM, Vicky B wrote:
> Thanks but the same war works fine is WebSphere and tomcat on
> Windows it is just tomcat provided by Redhat which work different
> i.e it throws the exception
My guess is that something in your Windows environment causes the JRE
to establish the JRE-provided XML parser as the system parser *before*
your code takes over and bootstraps something else.
This is not a Tomcat problem. This is not a Linux problem. It's a
problem with the interaction of one of your libraries and what should
be a system-provided XML parser.
- -chris
> On Nov 16, 2017 11:39 PM, "Christopher Schultz" <
> chris@christopherschultz.net> wrote:
>
> Vicky,
>
> 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_xmlpars
erv
>
>>>>
2.htm>)
>>>>
>>>>
> .
>
> 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
>>>>>
>>>>>
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>>
>>
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/
iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAloPKFgdHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFjNihAAvmZvWoNEaDyCzPzq
v2/a+7JLv663bImMlKyMQgoc6kaLMGl2q5wTQymRde2QZYip0sIZiHw74N09APaf
AifUVIam11XWan9Q77mwpOvAKKH4EWIKdIz7Z22SLdpC/CE8mwrg9Mc+/uwgyngp
aL2ZSWNrpn/GSCONif4J4CBAYczEeKFPrQSqAUN+YaqRItEqKXbZwVhpsi86wdE4
midXh+g42pdZDURt/JnRNy+XZhptuF24sa+JcyeuSFB+/8ljcKHxBPt4b/mLjqag
ZrznpyxTqzAbEofrR6BinnMnRAR7puEzpwk2D27m0OhxY9b4YmyNJa1xjBy8JhY1
vYX6TcLQJ4fpa+djv3keCFqqpSsAzsOwQN2p6D2WzRksaPH1xQ5DzpkqMAvhFonJ
Kt3d2CqcHL1fbSoMB8P+1pS32GnVZLwR3LUhsWspi01701rXngKzgXpDKp7DgH/1
JnymfsF6RcY6/sWT+1tQYRw1e7oZ3ZYowDntffRYp2fyuOHgfgiDu5rirxLM6kcx
+/zDFtZtIjq7ubHUzOrNJKlBQs/pReYC63b3HGSjJu11IOORgYAd9bd7V17kzco1
ZSF711hXLBmSg5YklmxLzQRGM2P4KNw08aBNHKOftubm+373VEO8voATHKkt72eZ
EZ0LZ3lw2DLxP5OvmaDXmk7p77c=
=G+Kq
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
|