Peculiar problem (and solution) but WHY?

2017-11-04 Thread Ray Holme
We have a working application running under tomcat 8.5.13
I have been trying to reduce start up time and reduce TLD scanning which was 
taking too long.
By adding the jars in my .../WEB-INF/ lib to the NO scan line in the 
catalina.properties file I got this under control ( a couple minutes went down 
to 1 second or less).
However two libraries I use and added NEEDED to be removed from the exclusion 
list as they caused (on MAC not on Linux where the application worked fine - 
2nd weirdness) this problem:
org.apache.jasper.JasperException: The absolute uri: 
http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the 
jar files deployed with this application
The above problem caused a page to show as a white screen (it would not work).

i.e. THE JARS NEED TO BE SCANNED (at least by the MAC Tomcat)

These jars were: jstl-api-1.2.jar and jstl-impl-1.2.jar

Can anyone explain this? It makes no sense to me and I would feel better if 
there was a reason.


Re: Start embedded Tomcat 9.0.1 server from java code

2017-11-04 Thread Maxim Solodovnik
Maybe I can set breakpoint somewhere? and check what is wrong?
Could you point me to the correct class?

On Fri, Nov 3, 2017 at 5:26 PM, Maxim Solodovnik 
wrote:

> I'm OK to add missing code to my tests,
> but I'm not sure what need to be added :(
>
> On Fri, Nov 3, 2017 at 3:24 PM, Maxim Solodovnik 
> wrote:
>
>> I see no errors,
>> Using debugger I can see tomcat.server.state == STARTED
>>
>> Everything works as expected if I'm switching back to 8.5.23 without any
>> other changes
>>
>> nestat reports:
>> *netstat -an |grep 8080*
>> tcp6   0  0 :::8080 :::*
>>  LISTEN
>>
>> for 8.5.23
>>
>>
>> On Fri, Nov 3, 2017 at 3:08 PM, Mark Thomas  wrote:
>>
>>> On 03/11/17 04:51, Maxim Solodovnik wrote:
>>> > Hello,
>>> >
>>> > I recently migrated from Tomcat 8.5.23 to Tomcat 9.0.1
>>> > Everything works as expected except tests :(
>>> >
>>> > I'm using following code to start embedded Tomcat and test CXF web
>>> services [1].
>>> > With Tomcat 9.0.1 tests failed, netstat -an displays port 8080 is not
>>> > being listened
>>> > What need to be changed?
>>>
>>> If Tomcat isn't listening then there should be an exception or error
>>> message reported at some point. Do you see anything in the logs?
>>>
>>> Mark
>>>
>>>
>>> >
>>> >
>>> > [1] https://github.com/apache/openmeetings/blob/master/openmeeti
>>> ngs-web/src/test/java/org/apache/openmeetings/webservice/
>>> AbstractWebServiceTest.java#L98
>>> >
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>>
>>
>>
>> --
>> WBR
>> Maxim aka solomax
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax


Re: Fw: TomCat 8.5.23 application not responding

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

Darin,

On 11/3/17 5:17 PM, dbol...@dsginc.biz wrote:
> From:   Christopher Schultz  To:
> users@tomcat.apache.org Date:   11/02/2017 02:28 PM Subject:
> Re: TomCat 8.5.23 application not responding
> 
> 
> 
> Darin,
> 
> On 11/2/17 12:55 PM, dbol...@dsginc.biz wrote:
>> I have a TomCat 8.5.23 service running on a Windows 2008 R2.  It
>> is currently running a third party web commerce application.  It
>> will run great until randomly one day the application will stop 
>> responding.  When you try to go to the application URL it sits
>> and spins.  I look at the catalina log and found the below errors
>> at the time it stop responding. Is this a tomcat configuration
>> issue or application related.
> 
>> I see three specific warning/severe messages in Tomcat.
> 
>> Error one: 02-Nov-2017 10:03:23.787 WARNING 
>> [http-nio-9080-exec-402] 
>> com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getForComponent
>>
>> 
Unable to find component with ID searchPattern in view.
> 
>> Then right after there is a severe message error 2:
> 
>> 02-Nov-2017 10:03:23.896 SEVERE [http-nio-9080-exec-455] 
>> org.restlet.engine.http.adapter.ServerAdapter.commit An
>> exception occured writing the response entity 
>> org.apache.catalina.connector.ClientAbortException: 
>> java.io.IOException: An established connection was aborted by
>> the software in your host machine
> 
>> Then the warning messages constant all the way down until this
>> all the way down until we had to reboot the service because of
>> no response.
> 
>> 02-Nov-2017 10:03:23.896 WARNING [http-nio-9080-exec-455] 
>> org.restlet.engine.http.HttpServerHelper.handle Error while 
>> handling an HTTP server call: 02-Nov-2017 10:03:23.896 INFO 
>> [http-nio-9080-exec-455] 
>> org.restlet.engine.http.HttpServerHelper.handle Error while 
>> handling an HTTP server call java.lang.IllegalStateException: 
>> Cannot call sendError() after the response has been committed
> 
> Can you take some thread dumps to show what the Tomcat threads are 
> doing? One thread dump will probably be very long, but go ahead
> and post the whole thing to the list.
> 
> -chris
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> I have been unable to post the thread dump because of size no
> matter how much I send under the 1 MB rule.  Is there another way I
> can send it to you.  Thanks.
> 
> 
> I do see a lot of Blocked messages, see example.  I was not able to
> post the whole dump.
> 
> 
> "http-nio-9080-exec-305" #3888 daemon prio=5 os_prio=0 
> tid=0x1f445000 nid=0x230 waiting for monitor entry 
> [0x4341d000] java.lang.Thread.State: BLOCKED (on object
> monitor) at 
> com.mincron.api.restlet.dm.ProductDM.getCategoryItemList(Unknown
> Source) - waiting to lock <0x000696269dc0> (a java.lang.Class
> for com.mincron.api.restlet.dm.ProductDM) at 
> com.mincron.api.restlet.resource.CategoryItemListResource.retrieve(Unk
nown
>  Source)

Your own code is blocking on something -- whatever a ProductDM is. If
you recompile your code with "debug" symbols enabled, you can see line
numbers and you'll be able to find out exactly what's going on.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAln904YACgkQHPApP6U8
pFhQhQ//ep1OPpEP8GSCLKRxwO4Pd+cRc0AN+pj769dzMmEcLRIGxMRHNm0Em8Ig
GvmoLkoJ2wNsqZ7IDi3vGKj1unSNZ1RJ8IV7qtCf6AOoas1OELE6SY+Lwkmpa9xl
wz7iZLxuygcdLB6OsdQP1CzndJUUvBR9X2be+oPyEvKfHXciTsK6+ztownIPOxa1
dYWEPs9ruqFfxw8e+QnoT8ZGsETZcxWVnRVnaWMSxtvR2uLIrsC6p/JE19gVr1YL
rXIHJdbUVmx+C0ewOXAC7QzsBIV7DELcn8kczRmvPWaX+o0J8/ushCibdRqWlSn2
MzctyIgFiog68wyxBbJBmjsxMKk6O0OtVZHOtZKEiRRw5el8epC8cVNpefR6fAha
FFmV/ErkEQXzgqGyHOJIQpNiJxRJvzjphdETqWumzUT9E+ZiPfKhNdcwPf7Nmn5C
EApGDgGBAndh2ZpNdKQU69q/kmwCWHQxQ0XHXfQyJr0/9vU7B+4ahFbCprTz8jbB
/mLmIpcIoJ40gYONRbiLONAB22ocjsAXdNY/MoP6w/5DogYcsAUAv/Xt7Xvcy8ds
iaul2Ige1qlyVGwNYiIbBfDoRUsHypDWQ6tk3bFs3NYh1oHwJ3ooNEK4SDnZE4Ds
Ky9auBMznXit4MRsN02N8r+C8H4vqomP9/JlmtWJgYidOidoOKk=
=egb5
-END PGP SIGNATURE-

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



Re: security headers

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

Alejandro,

On 11/3/17 5:54 PM, Alejandro Vargas M. wrote:
> You can help with an example of this url-rewrite to add this
> header,

The url-rewrite user manual is quite comprehensive, including many
examples. I'm sure you can figure it out.

- -chris

> On 11/01/2017 02:03 PM, Christopher Schultz wrote: Alejandro,
> 
> On 11/1/17 3:37 PM, Alejandro Vargas M. wrote:
 Hello,
 
 I recently used on web.xml
 
  httpHeaderSecurity 
 org.apache.catalina.filters.HttpHeaderSecurityFilter<
/fi
>
 
lter-class>
 true 
 
 
 httpHeaderSecurity 
 /* 
 
 to enable some security headers, but it won't enable Content 
 Security Policy header. Is there anyway to enable Content
 Security Policy at top server level???
> What were you expecting that Filter to generate for you? A header 
> which disables everything? Not terribly useful.
> 
> My recommendation would be to use something like url-rewrite[1] to
> add headers to every outgoing response. url-rewrite has very
> similar capabilities to httpd's mod_headers (and much more, of
> course).
> 
> -chris
> 
> [1] http://tuckey.org/urlrewrite/
>> 
>> -
>>
>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>> 
> 
> --
> 
> 
> 
> 
> Alejandro Vargas Mayorga /*Gerente Desarrollo C.A. & C.*/ *Tel.
> 506- 7232-3366* *Email:**alejandro.var...@kymsolutions.com* 
> * 
> **www.kymsolutions.com* * Visite
> nuestra aula virtual! *
> 
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAln90yQACgkQHPApP6U8
pFiy9xAAyLtluQed3UzQBa6CkoQCAWAL8rQkXiD2CVPaGRrH+cl79M6JzOoZxDXw
L+9hmwVYZhDljctwmsmP4jzjJSib8A/VwLoGEakoz1T6XvECuBt6+E8vb98e63Lu
EAeZcLPUQnluGsDdZmi5hIyS55/1L0Pr0Ef/3ndhmg6a8wKnHcwTaep+idrS73aT
jUs7YQzY+x0+ZvSfpJMbuGP3aqaYA0D/BRKYY9PAfK1pZsYypyinyNljGDe1Ks2I
NHs+KPX7h2QwF/hGaW7ERB9urLCz76cO2Q0nWTvXDuO5GrBbw3ADzouPxRYC1JF2
z+x94gK22pP0eQP+P+SabyDwEbhZj2MUdlK0XsHsMnCDSExzxCIf1ZG/l/fZ6Dk0
2ru1frNEBOTO/W5jqAzRHijvkEmNXzRKQuoCRMI28ybLI795qHn21RqRnzmAvhxg
zyLqBrhq/Oyt3SUE+U0xYscABgjBV1a46lDyw4S3f/q4CK0lmgCTmftr+nfqodb6
75+RIL24jQYah0CQMryyS1tWP8zDprk1FO6zxam3owUoxOeB4YLz9t0Iv1UMVReT
vfhQBulADm7rECegoRoDvDGII9sYqaRPqn2VN8bpFPPtQJPLghisZC9+XRXOy8Qr
3mDPEkQNRSfkkmZD6yVNU0lHccfidrmAgpLm5nYU00R4pEPOxtI=
=USq0
-END PGP SIGNATURE-

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