RE: Tomcat Xml parser issue

2017-11-16 Thread Jean Pierre Urkens
Vicky,

I am using both SPRING and Oracle XML features in a project and indeed the 
oracle xmlparser installs itself as default parser.

To prevent this I start the VM with following settings (JDK8):

-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
 

-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
 

-Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
 

This will force the use of default parsers that come with the JDK/JRE. And when 
I need the Oracle XMLParser (e.g. when handling XMLTYPE records/columns from 
the database) I use (within the code) the Oracle parser.


-Original Message-
From: Vicky B [mailto:vickyb2...@gmail.com] 
Sent: donderdag 16 november 2017 19:30
To: Tomcat Users List 
Subject: Re: Tomcat Xml parser issue

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

On Nov 16, 2017 11:39 PM, "Christopher Schultz" < ch...@christopherschultz.net> 
wrote:

> -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 
> >  > rv
> 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 < 
> > 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 

Re: Tomcat 8.5 justification (UNCLASSIFIED)

2017-11-16 Thread Simon De Uvarow
Hi, do you want to compare tomcat 8.5.last with what version ?



"No olvides, no traiciones, lo que llevas bien dentro de ti. No olvides, no
traiciones, lo que siempre te ha hecho vivir."

On Thu, Nov 16, 2017 at 8:52 PM, Lueders, Paul T CIV USARMY NGIC (US) <
paul.t.lueders@mail.mil> wrote:

> CLASSIFICATION: UNCLASSIFIED
>
> I have been tasked to migrate our apps to tomcat 8.5.  But first I need to
> convince management that it is a good idea.  Does anyone have any documents
> that state the benefits of using tomcat 8.5?
>
> Thanks a lot,
>
> Paul
> CLASSIFICATION: UNCLASSIFIED
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat 8.5 justification (UNCLASSIFIED)

2017-11-16 Thread Mark Thomas
On 16/11/17 20:52, Lueders, Paul T CIV USARMY NGIC (US) wrote:
> CLASSIFICATION: UNCLASSIFIED
> 
> I have been tasked to migrate our apps to tomcat 8.5.  But first I need to 
> convince management that it is a good idea.  Does anyone have any documents 
> that state the benefits of using tomcat 8.5?

Migrate from what?

Mark


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



Tomcat 8.5 justification (UNCLASSIFIED)

2017-11-16 Thread Lueders, Paul T CIV USARMY NGIC (US)
CLASSIFICATION: UNCLASSIFIED

I have been tasked to migrate our apps to tomcat 8.5.  But first I need to 
convince management that it is a good idea.  Does anyone have any documents 
that state the benefits of using tomcat 8.5?

Thanks a lot,

Paul 
CLASSIFICATION: UNCLASSIFIED

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



Re: Question - Tomcat Memory

2017-11-16 Thread Suvendu Sekhar Mondal
On Nov 17, 2017 12:18 AM, "Ramya Elineni" 
wrote:

The "Initial memory pool" and "maximum memory pool" are the two
configurations under Tomcat. I couldn't find any detailed explanation of
how Tomcat uses these settings.


Those settings are equivalent to Xms and Xmx values respectively.

I

request you to please provide me that informaiotn so that I can have the
appropriate values set on a production environment.


Ideally you should put your app under load testing, measure heap usage and
after that you can set min/max heap. If you have lots of available RAM,
then you can bumped up  the max size by few gigs. But setting arbitrary
values without knowing the heap usage pattern can cause unwanted trouble.

We

are encountering issues where Tomcat is running on the higher end of the
maximum memory pool configuration after about 25 days of its last restart.
Thanks.


What problem(s) are you facing? Long pauses or crashes? Please look at the
GC log, if you are printing it already. Otherwise please use visualvm or
jconsole to get the memory usage details.


Re: Question - Tomcat Memory

2017-11-16 Thread Coty Sutherland
On Thu, Nov 16, 2017 at 1:48 PM, Ramya Elineni
 wrote:
> The "Initial memory pool" and "maximum memory pool" are the two 
> configurations under Tomcat. I couldn't find any detailed explanation of how 
> Tomcat uses these settings. I request you to please provide me that 
> informaiotn so that I can have the appropriate values set on a production 
> environment. We are encountering issues where Tomcat is running on the higher 
> end of the maximum memory pool configuration after about 25 days of its last 
> restart. Thanks.

I assume that you're referring to the JVM arguments Xms and Xmx. There
isn't a tomcat-specific setting to control JVM memory allocations;
you'll need to read more about that in the java documentation of the
appropriate JVM, but it isn't much more to the arguments than what you
already stated. As far as 'appropriate values' goes, those are
subjective because everyone's application's have different memory
needs. You will have to do some load testing to determine how much
memory your application will need to function properly. If your
application is behavior abnormally and there are OutOfMemoryExceptions
occurring you can also analyze a heap dump from the event to determine
if you have an application problem causing memory issues, or if you
just need more memory.

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



Question - Tomcat Memory

2017-11-16 Thread Ramya Elineni
The "Initial memory pool" and "maximum memory pool" are the two configurations 
under Tomcat. I couldn't find any detailed explanation of how Tomcat uses these 
settings. I request you to please provide me that informaiotn so that I can 
have the appropriate values set on a production environment. We are 
encountering issues where Tomcat is running on the higher end of the maximum 
memory pool configuration after about 25 days of its last restart. Thanks.




Re: Tomcat Xml parser issue

2017-11-16 Thread Vicky B
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

On Nov 16, 2017 11:39 PM, "Christopher Schultz" <
ch...@christopherschultz.net> wrote:

> -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
> >  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 <
> > 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
> >>
> >>
> >
> >
> -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
> 

Re: Tomcat Xml parser issue

2017-11-16 Thread Christopher Schultz
-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 < 
> 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
>> 
>> 
> 
> 
-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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Xml parser issue

2017-11-16 Thread Vicky B
It is XML parser (DOM and SAX ) from oracle (doc
)
.  Why is tomcat using XMLparserv2  , 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 . how does class loading work in
tomcat.

On Thu, Nov 16, 2017 at 8:15 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> 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
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAloNpJQdHGNocmlzQGNo
> cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFjMzBAAnGkUGwrItoDMyqhU
> 2Q4LEOe6/dUW1ZdixIGztY87r7e3r0Q0BAGhFD4bS6NMRjS1XwG1trUKYPiIyp1Q
> DUScFZfa3kSBnpbxHtdYTSls91LZq5C5uo/sfDh7zmJ1asWmO4WdfcdaBJIAYl1I
> XyEpLqGHKHiGBpbpAzsKiI94TBJWL5RXoOaEcXxWms1z6T+x9yO0uwdbKVGEasjY
> cMpJlmwjq7dJyglttQ+hsEUfpXyJ6BsregRQwvC2/EGrQgbZQTMpVTUTR3Qyw3NX
> sjSiU1lZyXO3gBncooqNGiR2AJG2w8OZkMVyZGh/c6qj+ZJf/1dene7DA+7VOjmZ
> 2NrqDH1mhm2S0OXrU+/poOEnUS6324J2Hqu4Fz5M5rUPaKqNaZd/BKeD8YbxgHiz
> t1Fr9mYIXkq+NVZuAkDjQdybwZ/cwdnTk73PMRX3v6StE5XDLxAkHs/djOgl8cWB
> Spv5Ri23rufbv5mcWPQep2wnR6l2OGb6w3C1v6wv93VS06Ex/dLGqxZYukllxqzW
> QSEFC1DRvYsAVLjvTM2nKSKwgFR/YAlvQ2FDuulfevE8aU0hMQ8E4AgZc/oP4SlS
> fF0EJ8LStp75ZHlFYfCGLHVmhCiZFuCJOjCyiZt87jfHDerTHoxjRZMIpAI51Lxd
> oYbq3v/0qYfAV0jqClo0SM9u/8s=
> =ivJQ
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 



*Thanks & Regards Vickyb*


RE: Skip resource path in TLD scanner?

2017-11-16 Thread Matt Cosentino
This keeps getting worse, my site was down for over a minute while the TLD 
scanner ran. There must be something I can do.

- Matt

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Saturday, April 29, 2017 5:02 AM
To: Tomcat Users List 
Subject: Re: Skip resource path in TLD scanner?

On 28/04/17 17:00, Matt Cosentino wrote:
> Yes, it's other folders within WEB-INF. I turned on the TldScanner 
> logging and it is definitely what is causing the delay. My situation 
> probably isn't very typical. The delay varies in my various web 
> applications, the worst being about 20 seconds. It all adds up though, 
> and every second counts when our sites are down.

There is a solution available but it is intended more for the embedded use case 
rather than a standard Tomcat install. Using it in a standard install would 
require (effectively) patching Tomcat.

The general idea would be to use the TldPreScanned class. That does require all 
the TLDs to be listed in advance. On the plus side, no scanning delay. On the 
down side, adding TLDs requires code changes.
Doing this with a standard Tomcat install requires changes to the 
JasperInitializer (hence the patch). I don't think there is a pure config way 
around that but I'll look into it.

A better solution would probably be to make it easier to plugin in a custom 
TLDScanner - i.e. purely with config. If you'd like us to explore this option 
we should re-open 61052 and adjust accordingly. I don't think there is enough 
demand for filtering resource paths to make that worth implementing.

One final thought. Are you running the web application from a WAR or an 
expanded directory? (The latter would be faster).

Mark



> 
> - Matt
> 
> 
> -Original Message- From: Mark Thomas [mailto:ma...@apache.org] 
> Sent: Friday, April 28, 2017 7:28 AM To:
> Tomcat Users List  Subject: Re: Skip resource 
> path in TLD scanner?
> 
> On 27/04/17 23:39, Matt Cosentino wrote:
>> https://tomcat.apache.org/tomcat-8.0-doc/config/systemprops.html
>> 
>> There is one for skipping jar files:
>> 
>> tomcat.util.scan.StandardJarScanFilter.jarsToSkip
> 
> 
> 
>> It skips /WEB-INF/classes/ and /WEB-INF/lib/, but it does not check 
>> any property to skip user defined paths.
> 
> Is it other paths within WEB-INF you need to skip?
> 
> When I read "skipping resource paths" I was thinking of skipping the 
> various places where Tomcat treat directories as JARs that then get 
> scanned for TLDs (which can be configured via the JarScanner). But it 
> sounds like skipping those won't help you.
> 
> How sure are you that it is checking the directories below WEB-INF 
> that is the cause of the delay? That isn't a typical source of 
> start-up delay although it is certainly possible.
> 
> Finally, what sort of delay are we talking out here? Seconds?
> Minutes?
> 
> Mark
> 
> 
>> -Original Message- From: Mark Thomas 
>> [mailto:ma...@apache.org] Sent: Thursday, April 27, 2017 5:05 PM
>> To: Tomcat Users List  Subject: Re: Skip 
>> resource path in TLD scanner?
>> 
>> On 27/04/17 21:17, Matt Cosentino wrote:
>>> I need to skip some of the resource paths within WEB-INF. I know  
>>> there's a property for skipping jar files, but I couldn't find one 
>>> for resource paths. I reported this as a bug and was told that the 
>>> property exists. Where is it?
>> 
>> Where have you looked?
>> 
>> Mark
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


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


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



Re: Tomcat Xml parser issue

2017-11-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

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
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAloNpJQdHGNocmlzQGNo
cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFjMzBAAnGkUGwrItoDMyqhU
2Q4LEOe6/dUW1ZdixIGztY87r7e3r0Q0BAGhFD4bS6NMRjS1XwG1trUKYPiIyp1Q
DUScFZfa3kSBnpbxHtdYTSls91LZq5C5uo/sfDh7zmJ1asWmO4WdfcdaBJIAYl1I
XyEpLqGHKHiGBpbpAzsKiI94TBJWL5RXoOaEcXxWms1z6T+x9yO0uwdbKVGEasjY
cMpJlmwjq7dJyglttQ+hsEUfpXyJ6BsregRQwvC2/EGrQgbZQTMpVTUTR3Qyw3NX
sjSiU1lZyXO3gBncooqNGiR2AJG2w8OZkMVyZGh/c6qj+ZJf/1dene7DA+7VOjmZ
2NrqDH1mhm2S0OXrU+/poOEnUS6324J2Hqu4Fz5M5rUPaKqNaZd/BKeD8YbxgHiz
t1Fr9mYIXkq+NVZuAkDjQdybwZ/cwdnTk73PMRX3v6StE5XDLxAkHs/djOgl8cWB
Spv5Ri23rufbv5mcWPQep2wnR6l2OGb6w3C1v6wv93VS06Ex/dLGqxZYukllxqzW
QSEFC1DRvYsAVLjvTM2nKSKwgFR/YAlvQ2FDuulfevE8aU0hMQ8E4AgZc/oP4SlS
fF0EJ8LStp75ZHlFYfCGLHVmhCiZFuCJOjCyiZt87jfHDerTHoxjRZMIpAI51Lxd
oYbq3v/0qYfAV0jqClo0SM9u/8s=
=ivJQ
-END PGP SIGNATURE-

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



Tomcat Xml parser issue

2017-11-16 Thread Vicky B
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.
-- 



*Thanks & Regards Vickyb*