Re: Apache Tomcat 8.5.49 - StackOverflowError when getting static resources

2019-11-28 Thread Mark Thomas
On 28/11/2019 07:59, jan.a...@seznam.cz wrote:

> Hello Mark,
> 
> no problem, thanks that I could test it also with 8.5 version. 
> 
> With your build Apache Tomcat/8.5.50-dev issue also disapeared.

Thanks for the confirmation.

Mark

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



Re: Apache Tomcat 8.5.49 - StackOverflowError when getting static resources

2019-11-27 Thread jan.atos
"






On 27/11/2019 23:40:27, ma...@apache.org wrote:















> Sorry to be a pain but could you test again? I've updated the 9.0.30-dev

> 

> build and added 8.5.50-dev here:

> 

> 

> 

> http://people.apache.org/~markt/dev/

> 

> 

> 

> The last patch went to far and essentially complete undid the original

> 

> fix rather than keeping the original fix and fixing the regression you 
saw.

> 

> 

> 

> If you could download, test and report back that would be very helpful.

> 

> 

> 

> Note:

> 

> - this is NOT an official release

> 

> - this is NOT for production use

> 

> - this is ONLY for testing this bug

> 

> - please don't blame me if your server catches fire during testing ;)

> 

> 

> 

> (Sorry to go on about this but ASF releases have various bits of QA and

> 

> legal machinery behind them whereas test/dev builds like this don't and

> 

> we need to make sure folks reading this understand there is a difference.)

> 

> 

> 

> Thanks,

> 

> 

> 

> Mark




Hello Mark,

no problem, thanks that I could test it also with 8.5 version. 

With your build Apache Tomcat/8.5.50-dev issue also disapeared.




Jan



"

Re: Apache Tomcat 8.5.49 - StackOverflowError when getting static resources

2019-11-27 Thread Mark Thomas
On 27/11/2019 19:21, jan.a...@seznam.cz wrote:



> Many thanks Mark. It seems fix works correctly.
> 
> Because I observed the issue on version 8.5.49 and your build is version 9.0 
> I installed Apache Tomcat/9.0.29 and observed not the same error but very 
> similar. It was also StackOverflow and contained recursive 
> DefaultFaceletContext.includeFacelet() method calls.
> So I installed your build and got to login page without issue.
> Thanks for your fast reaction and solution.
> Will be this fix also for 8.5.50 release version?

Sorry to be a pain but could you test again? I've updated the 9.0.30-dev
build and added 8.5.50-dev here:

http://people.apache.org/~markt/dev/

The last patch went to far and essentially complete undid the original
fix rather than keeping the original fix and fixing the regression you saw.

If you could download, test and report back that would be very helpful.

Note:
- this is NOT an official release
- this is NOT for production use
- this is ONLY for testing this bug
- please don't blame me if your server catches fire during testing ;)

(Sorry to go on about this but ASF releases have various bits of QA and
legal machinery behind them whereas test/dev builds like this don't and
we need to make sure folks reading this understand there is a difference.)

Thanks,

Mark


> 
> Jan
> 
> For info there is snipet of 9.0.29 log error:
> 
> Caused by: java.lang.StackOverflowError
>   at java.security.AccessController.doPrivileged(Native Method)
>   at java.net.URLClassLoader$3.next(Unknown Source)
>   at java.net.URLClassLoader$3.hasMoreElements(Unknown Source)
>   at sun.misc.CompoundEnumeration.next(Unknown Source)
>   at sun.misc.CompoundEnumeration.hasMoreElements(Unknown Source)
>   at sun.misc.CompoundEnumeration.next(Unknown Source)
>   at sun.misc.CompoundEnumeration.hasMoreElements(Unknown Source)
>   at sun.misc.CompoundEnumeration.next(Unknown Source)
>   at sun.misc.CompoundEnumeration.hasMoreElements(Unknown Source)
>   at 
> org.apache.catalina.loader.WebappClassLoaderBase$CombinedEnumeration.inc(WebappClassLoaderBase.java:2701)
>   at 
> org.apache.catalina.loader.WebappClassLoaderBase$CombinedEnumeration.hasMoreElements(WebappClassLoaderBase.java:2686)
>   at java.util.ServiceLoader$LazyIterator.hasNextService(Unknown Source)
>   at java.util.ServiceLoader$LazyIterator.hasNext(Unknown Source)
>   at java.util.ServiceLoader$1.hasNext(Unknown Source)
>   at javax.xml.parsers.FactoryFinder$1.run(Unknown Source)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at javax.xml.parsers.FactoryFinder.findServiceProvider(Unknown Source)
>   at javax.xml.parsers.FactoryFinder.find(Unknown Source)
>   at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
>   at com.sun.faces.util.Util.createSAXParserFactory(Util.java:297)
>   at 
> com.sun.faces.facelets.compiler.SAXCompiler.createSAXParser(SAXCompiler.java:527)
>   at 
> com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:463)
>   at 
> com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:440)
>   at com.sun.faces.facelets.compiler.Compiler.compile(Compiler.java:124)
>   at 
> com.sun.faces.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:481)
>   at 
> com.sun.faces.facelets.impl.DefaultFaceletFactory.access$100(DefaultFaceletFactory.java:106)
>   at 
> com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:199)
>   at 
> com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:197)
>   at 
> com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:86)
>   at 
> com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:81)
>   at 
> com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99)
> 
> 
> 
> 
> -
> 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: Apache Tomcat 8.5.49 - StackOverflowError when getting static resources

2019-11-27 Thread jan.atos



On 27/11/2019 13:14:02, ma...@apache.org wrote:


>On 27/11/2019 06:27, jan.a...@seznam.cz wrote:
>
>
>
>> "On 26/11/2019 16:34, Mark Thomas wrote:
>
>>> I don't think so. More likely this is another instance of
>
>>> https://bz.apache.org/bugzilla/show_bug.cgi?id=63964
>
>>
>
>> I think I have a fix for this. Are you able to build from source to test
>
>> this once I commit the fix? If you aren't able to build from source, 
>
>> would it help if I provided a binary build?
>
>>
>
>> Mark
>
>>
>
>> Thank you for you answers. 
>
>>
>
>> @Mark: It would help if you provide binary build, I'll test it.
>
>
>
>Thanks great. Thanks.
>
>
>
>You can pick up a 9.0.30-dev build from:
>
>http://people.apache.org/~markt/dev/v9.0.30-dev/
>
>
>
>Note: This is just to enable this fix to be tested. It isn't a formal
>
>release. Use it at your own risk. If you machine catches fire don't
>
>blame me
>
>
>
>Thanks,
>
>
>
>Mark
>
>
>
>-
>
>To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>
>For additional commands, e-mail: users-h...@tomcat.apache.org

Many thanks Mark. It seems fix works correctly.

Because I observed the issue on version 8.5.49 and your build is version 9.0
I installed Apache Tomcat/9.0.29 and observed not the same error but very 
similar. It was also StackOverflow and contained recursive 
DefaultFaceletContext.includeFacelet() method calls.
So I installed your build and got to login page without issue.
Thanks for your fast reaction and solution.
Will be this fix also for 8.5.50 release version?

Jan

For info there is snipet of 9.0.29 log error:

Caused by: java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader$3.next(Unknown Source)
at java.net.URLClassLoader$3.hasMoreElements(Unknown Source)
at sun.misc.CompoundEnumeration.next(Unknown Source)
at sun.misc.CompoundEnumeration.hasMoreElements(Unknown Source)
at sun.misc.CompoundEnumeration.next(Unknown Source)
at sun.misc.CompoundEnumeration.hasMoreElements(Unknown Source)
at sun.misc.CompoundEnumeration.next(Unknown Source)
at sun.misc.CompoundEnumeration.hasMoreElements(Unknown Source)
at 
org.apache.catalina.loader.WebappClassLoaderBase$CombinedEnumeration.inc(WebappClassLoaderBase.java:2701)
at 
org.apache.catalina.loader.WebappClassLoaderBase$CombinedEnumeration.hasMoreElements(WebappClassLoaderBase.java:2686)
at java.util.ServiceLoader$LazyIterator.hasNextService(Unknown Source)
at java.util.ServiceLoader$LazyIterator.hasNext(Unknown Source)
at java.util.ServiceLoader$1.hasNext(Unknown Source)
at javax.xml.parsers.FactoryFinder$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.xml.parsers.FactoryFinder.findServiceProvider(Unknown Source)
at javax.xml.parsers.FactoryFinder.find(Unknown Source)
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
at com.sun.faces.util.Util.createSAXParserFactory(Util.java:297)
at 
com.sun.faces.facelets.compiler.SAXCompiler.createSAXParser(SAXCompiler.java:527)
at 
com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:463)
at 
com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:440)
at com.sun.faces.facelets.compiler.Compiler.compile(Compiler.java:124)
at 
com.sun.faces.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:481)
at 
com.sun.faces.facelets.impl.DefaultFaceletFactory.access$100(DefaultFaceletFactory.java:106)
at 
com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:199)
at 
com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:197)
at 
com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:86)
at 
com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:81)
at 
com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99)




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



Re: Apache Tomcat 8.5.49 - StackOverflowError when getting static resources

2019-11-27 Thread Mark Thomas
On 27/11/2019 06:27, jan.a...@seznam.cz wrote:

> "On 26/11/2019 16:34, Mark Thomas wrote: 
>> I don't think so. More likely this is another instance of 
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=63964 
> 
> I think I have a fix for this. Are you able to build from source to test 
> this once I commit the fix? If you aren't able to build from source, 
> would it help if I provided a binary build? 
> 
> Mark 
> 
> Thank you for you answers. 
> 
> @Mark: It would help if you provide binary build, I'll test it.

Thanks great. Thanks.

You can pick up a 9.0.30-dev build from:
http://people.apache.org/~markt/dev/v9.0.30-dev/

Note: This is just to enable this fix to be tested. It isn't a formal
release. Use it at your own risk. If you machine catches fire don't
blame me

Thanks,

Mark

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



Re: Apache Tomcat 8.5.49 - StackOverflowError when getting static resources

2019-11-26 Thread jan.atos

"On 26/11/2019 16:34, Mark Thomas wrote:
>> Jan,
>>
>> On 11/26/19 09:20, jan.a...@seznam.cz wrote:
>>> with update of Tomcat to version 8.5.49 we observed issue in our
>>> application when accessing login page.
>>
>> Sounds suspiciously familiar:
>> https://markmail.org/message/7xfg5x7mllrki3hd
>>
>> This was for a recent Tomcat 9.0 release, not 8.5, but it:
>>
>> 1. Is a stack overflow
>> 2. Involves MyFaces
>>
>>> Application log contains StackOverflowError. There is recursive
>>> call of CompositionHandler.apply() method.
>>
>> Note that MyFaces is not a Tomcat artifact, though it does come from 
>> Apache.
>>
>>> It seems that issue is connected with resource caching because when 
>>> I set resources attribute cachingAllowed="false" in application
>>> xml, issue disappears.
>>
>> That is very good information.
>>
>>> Could it be caused by fix of Bug 63872?
>
> I don't think so. More likely this is another instance of
> https://bz.apache.org/bugzilla/show_bug.cgi?id=63964

I think I have a fix for this. Are you able to build from source to test 
this once I commit the fix? If you aren't able to build from source,
would it help if I provided a binary build?

Mark


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



Thank you for you answers. 

@Mark: It would help if you provide binary build, I'll test it.
"
"

Re: Apache Tomcat 8.5.49 - StackOverflowError when getting static resources

2019-11-26 Thread Mark Thomas
On 26/11/2019 16:34, Mark Thomas wrote:
>> Jan,
>>
>> On 11/26/19 09:20, jan.a...@seznam.cz wrote:
>>> with update of Tomcat to version 8.5.49 we observed issue in our
>>> application when accessing login page.
>>
>> Sounds suspiciously familiar:
>> https://markmail.org/message/7xfg5x7mllrki3hd
>>
>> This was for a recent Tomcat 9.0 release, not 8.5, but it:
>>
>> 1. Is a stack overflow
>> 2. Involves MyFaces
>>
>>> Application log contains StackOverflowError. There is recursive
>>> call of CompositionHandler.apply() method.
>>
>> Note that MyFaces is not a Tomcat artifact, though it does come from
>> Apache.
>>
>>> It seems that issue is connected with resource caching because when
>>> I set resources attribute cachingAllowed="false" in application
>>> xml, issue disappears.
>>
>> That is very good information.
>>
>>> Could it be caused by fix of Bug 63872?
> 
> I don't think so. More likely this is another instance of
> https://bz.apache.org/bugzilla/show_bug.cgi?id=63964

I think I have a fix for this. Are you able to build from source to test
this once I commit the fix? If you aren't able to build from source,
would it help if I provided a binary build?

Mark


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



Re: Apache Tomcat 8.5.49 - StackOverflowError when getting static resources

2019-11-26 Thread Mark Thomas
> Jan,
> 
> On 11/26/19 09:20, jan.a...@seznam.cz wrote:
>> with update of Tomcat to version 8.5.49 we observed issue in our
>> application when accessing login page.
> 
> Sounds suspiciously familiar:
> https://markmail.org/message/7xfg5x7mllrki3hd
> 
> This was for a recent Tomcat 9.0 release, not 8.5, but it:
> 
> 1. Is a stack overflow
> 2. Involves MyFaces
> 
>> Application log contains StackOverflowError. There is recursive
>> call of CompositionHandler.apply() method.
> 
> Note that MyFaces is not a Tomcat artifact, though it does come from
> Apache.
> 
>> It seems that issue is connected with resource caching because when
>> I set resources attribute cachingAllowed="false" in application
>> xml, issue disappears.
> 
> That is very good information.
> 
>> Could it be caused by fix of Bug 63872?

I don't think so. More likely this is another instance of
https://bz.apache.org/bugzilla/show_bug.cgi?id=63964

Mark

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



Re: Apache Tomcat 8.5.49 - StackOverflowError when getting static resources

2019-11-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jan,

On 11/26/19 09:20, jan.a...@seznam.cz wrote:
> with update of Tomcat to version 8.5.49 we observed issue in our
> application when accessing login page.

Sounds suspiciously familiar:
https://markmail.org/message/7xfg5x7mllrki3hd

This was for a recent Tomcat 9.0 release, not 8.5, but it:

1. Is a stack overflow
2. Involves MyFaces

> Application log contains StackOverflowError. There is recursive
> call of CompositionHandler.apply() method.

Note that MyFaces is not a Tomcat artifact, though it does come from
Apache.

> It seems that issue is connected with resource caching because when
> I set resources attribute cachingAllowed="false" in application
> xml, issue disappears.

That is very good information.

> Could it be caused by fix of Bug 63872?
> 
> Application was working with previous 8.5.* tomcat versions without
> issues.
> 
> Application uses javax.faces library version 2.2.17

Thanks for the version information.

- -chris

> -- LOG snippet
> 
> Caused by: java.lang.StackOverflowError
> 
> at java.net.URL.(Unknown Source)
> 
> at java.net.URL.(Unknown Source)
> 
> at sun.misc.URLClassPath$FileLoader.getResource(Unknown Source)
> 
> at sun.misc.URLClassPath$FileLoader.findResource(Unknown Source)
> 
> at sun.misc.URLClassPath$1.next(Unknown Source)
> 
> at sun.misc.URLClassPath$1.hasMoreElements(Unknown Source)
> 
> at java.net.URLClassLoader$3$1.run(Unknown Source)
> 
> at java.net.URLClassLoader$3$1.run(Unknown Source)
> 
> at java.security.AccessController.doPrivileged(Native Method)
> 
> at java.net.URLClassLoader$3.next(Unknown Source)
> 
> at java.net.URLClassLoader$3.hasMoreElements(Unknown Source)
> 
> at sun.misc.CompoundEnumeration.next(Unknown Source)
> 
> at sun.misc.CompoundEnumeration.hasMoreElements(Unknown Source)
> 
> at
> org.apache.catalina.loader.WebappClassLoaderBase$CombinedEnumeration.i
nc
>
> 
(WebappClassLoaderBase.java:2691)
> 
> at
> org.apache.catalina.loader.WebappClassLoaderBase$CombinedEnumeration.
>
> 
hasMoreElements(WebappClassLoaderBase.java:2676)
> 
> at java.util.ServiceLoader$LazyIterator.hasNextService(Unknown
> Source)
> 
> at java.util.ServiceLoader$LazyIterator.hasNext(Unknown Source)
> 
> at java.util.ServiceLoader$1.hasNext(Unknown Source)
> 
> at javax.xml.parsers.FactoryFinder$1.run(Unknown Source)
> 
> at java.security.AccessController.doPrivileged(Native Method)
> 
> at javax.xml.parsers.FactoryFinder.findServiceProvider(Unknown
> Source)
> 
> at javax.xml.parsers.FactoryFinder.find(Unknown Source)
> 
> at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
> 
> at com.sun.faces.util.Util.createSAXParserFactory(Util.java:297)
> 
> at
> com.sun.faces.facelets.compiler.SAXCompiler.createSAXParser(SAXCompile
r.
>
> 
java:527)
> 
> at
> com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java
:
>
> 
463)
> 
> at
> com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java
:
>
> 
440)
> 
> at
> com.sun.faces.facelets.compiler.Compiler.compile(Compiler.java:124)
>
>  at
> com.sun.faces.facelets.impl.DefaultFaceletFactory.createFacelet 
> (DefaultFaceletFactory.java:481)
> 
> at com.sun.faces.facelets.impl.DefaultFaceletFactory.access$100 
> (DefaultFaceletFactory.java:106)
> 
> at com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance 
> (DefaultFaceletFactory.java:199)
> 
> at com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance 
> (DefaultFaceletFactory.java:197)
> 
> at com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance 
> (DefaultFaceletCache.java:86)
> 
> at com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance 
> (DefaultFaceletCache.java:81)
> 
> at com.sun.faces.util.ExpiringConcurrentCache$1.call 
> (ExpiringConcurrentCache.java:99)
> 
> at java.util.concurrent.FutureTask.run(Unknown Source)
> 
> at
> com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache
.
>
> 
java:114)
> 
> at com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet 
> (DefaultFaceletCache.java:124)
> 
> at com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet 
> (DefaultFaceletCache.java:63)
> 
> at com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet 
> (DefaultFaceletFactory.java:295)
> 
> at
> com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java
:
>
> 
370)
> 
> at
> com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java
:
>
> 
350)
> 
> at
> com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet 
> (DefaultFaceletContext.java:199)
> 
> at com.sun.faces.facelets.tag.ui.CompositionHandler.apply 
> (CompositionHandler.java:174)
> 
> at
> com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandle
r.
>
> 
java:93)
> 
> at
> com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.
>
> 
java:87)
> 
> at
> com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java
:
>
> 
312)
> 
> at
> com.sun.faces.facelets.impl.DefaultFacelet.include(Defa