Re: Release calendar of Apache Tomcat versions

2014-11-21 Thread Mark Thomas
On 20/11/2014 17:52, jieryn wrote:
 I guess it depends on how you view what a release is.

Release has a very specific definition at the ASF. [1]

 it's not like the tags are changed after the fact,

Tags can change. For example, if I tag 8.0.x/trunk to do a release and
discover a problem while building the release then I'll drop the tag,
fix the problem and re-tag. The informal rule we follow for when that is
OK is that as long as nothing built from the tag has made made available
to anyone (including the dev@ list) then it is OK.

Once something has been made available (e.g. for voting), the tag should
not change (although in some projects that have a different release
process it might get renamed).

 a new version is just cut for Apache Tomcat.
 The artifacts are still uploaded to a staging maven repository.

That is not a release.

 they are available for testing.

They are but at this point they have not been formally released.

 Finally, the dates actually do match up pretty closely, any variance
 is probably just the voting period.

Correct.

The 'official' release date is that date that the result of the release
vote is posted to the dev list (using the UTC time zone) assuming, of
course, that the release vote passed.

The biggest issue with using the tags is that not all of them were released.

For the record, I'm fairly sure some of the dates in the change log
might are a day or two out.

Mark


[1] http://www.apache.org/dev/release.html#what

 
 bash$ svn cat 
 http://svn.apache.org/repos/asf/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
 | grep 'section name=\Tomcat '
 section name=Tomcat 8.0.16 (markt)
 section name=Tomcat 8.0.15 (markt) rtext=2014-11-07
 section name=Tomcat 8.0.14 (markt) rtext=2014-09-29
 section name=Tomcat 8.0.13 (markt) rtext=not released
 section name=Tomcat 8.0.12 (markt) rtext=2014-09-03
 section name=Tomcat 8.0.11 (markt) rtext=2014-08-22
 section name=Tomcat 8.0.10 (markt) rtext=not released
 section name=Tomcat 8.0.9 (markt) rtext=2014-06-24
 section name=Tomcat 8.0.8 (markt) rtext=beta, 2014-05-21
 section name=Tomcat 8.0.7 (markt) rtext=not released
 section name=Tomcat 8.0.6 (markt) rtext=not released
 section name=Tomcat 8.0.5 (markt) rtext=beta, 2014-03-27
 section name=Tomcat 8.0.4 (markt) rtext=not released
 section name=Tomcat 8.0.3 (markt) rtext=beta, 2014-02-11
 section name=Tomcat 8.0.2 (markt) rtext=not released
 section name=Tomcat 8.0.1 (markt) rtext=beta, 2014-02-02
 section name=Tomcat 8.0.0 (markt) rtext=not released
 
 
 On Thu, Nov 20, 2014 at 12:07 PM, Mark Thomas ma...@apache.org wrote:
 On 20/11/2014 17:52, jieryn wrote:
 Wow, all I've seen are examples that are likely the least efficient
 way to do things. Just use the version control system itself:

 Tag date != release date.

 Mark



 bash$ svn ls -v http://svn.apache.org/repos/asf/tomcat/tc8.0.x/tags/
 1562629 markt Jan 29  2014 TOMCAT_8_0_0/
 1562630 markt Jan 29  2014 TOMCAT_8_0_1/
 1609435 markt Jul 10 06:22 TOMCAT_8_0_10/
 1618261 markt Aug 15 15:12 TOMCAT_8_0_11/
 1621315 markt Aug 29 10:38 TOMCAT_8_0_12/
 1627396 markt Sep 24 15:15 TOMCAT_8_0_13/
 1627408 markt Sep 24 15:59 TOMCAT_8_0_14/
 1636170 markt Nov 02 14:23 TOMCAT_8_0_15/
 1565426 markt Feb 06  2014 TOMCAT_8_0_2/
 1565729 markt Feb 07  2014 TOMCAT_8_0_3/
 1579364 markt Mar 19  2014 TOMCAT_8_0_4/
 1580930 markt Mar 24  2014 TOMCAT_8_0_5/
 1594516 markt May 14  2014 TOMCAT_8_0_6/
 1594945 markt May 15  2014 TOMCAT_8_0_7/
 1595294 markt May 16  2014 TOMCAT_8_0_8/
 1603862 markt Jun 19 08:42 TOMCAT_8_0_9/


 On Thu, Nov 20, 2014 at 7:00 AM, Iago Alonso Alonso infia...@udc.es wrote:
 I want to know where I can find the release calendar of the Apache Tomcat 
 versions in order to do an analysis of the project. I have been searching 
 in the Wiki, Google, etc but I don't found anything by the moment.

 Thanks.

 -
 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
 


-
To unsubscribe, 

Re: How to setup rewrite valve for angularjs

2014-11-21 Thread Daniel Mikusa
On Thu, Nov 20, 2014 at 9:08 PM, Tay Kai Yang kaiyang@gmail.com wrote:

 Hi
 I have been reading up tomcat 8's user doc. But I have some problems
 understanding the setup of rewrite valve. I think I should add the rewrite
 valve class name and XML settings to /conf/server.xml, but I am not sure
 what to do next. Where should I place my rewrite.config, how do I activate
 rewrite my war context only?


See the second option here...

http://tomcat.apache.org/tomcat-8.0-doc/rewrite.html#Configuration

It can also be in the context.xml of a webapp. The valve will then use a
rewrite.config file containing the rewrite directives, it must be placed in
the WEB-INF folder of the web application



 Have anyone written a tutorial or can point me to a source for how-to?


The docs seem pretty thorough but if you need a tutorial you could look for
a mod_rewrite tutorial.  This valve is designed to be similar to
mod_rewrite, so a tutorial for that should be mostly applicable here.

Dan


 I am trying to set a single page angularjs app to point
 /context/path/path/... To /context/index.jsp

 Any idea on how to do that?


 Thanks.
 Kai yang



server-status in text format

2014-11-21 Thread Jose Monreal
Is it possible to get the same information of html manger server status but
in text format?

Like this curl http://localhost:8080/manager/text/server-status

Best regards,
José


Problem with base directory in Resource

2014-11-21 Thread phiroc

Hello,

in my Apache 8 context.xml file, I have created the following resource:

Resources
PreResources 

className=org.apache.catalina.webresources.DirResourceSet
base=/mnt/mynfsserver_img/ 
webAppMount=/img 
internalPath=/img /
/Resources

where /mnt/mynfsserver_img is a mounted volume containing thousands of photos 
in sub-directories.

When I start Tomcat 8, I get the following error message:

-
Caused by: org.apache.catalina.LifecycleException: Failed to initialize 
component [org.apache.catalina.webresources.DirResourceSet@6649bfd3]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at 
org.apache.catalina.webresources.StandardRoot.initInternal(StandardRoot.java:647)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 14 more
Caused by: java.lang.IllegalArgumentException: TODO-i18n: base/internalPath is 
not a directory
at 
org.apache.catalina.webresources.DirResourceSet.checkType(DirResourceSet.java:247)
at 
org.apache.catalina.webresources.AbstractFileResourceSet.initInternal(AbstractFileResourceSet.java:134)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 16 more


What am I doing wrong?

Many thanks.

Cheers,

Philippe

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



Re: Problem with base directory in Resource

2014-11-21 Thread phiroc

I have solved the problem by replacing PostResources by PreResources (cf. 
http://mikusa.blogspot.fr/2014/07/tips-on-migrating-to-tomat-8-resources.html).

Now I need to figure out how to use the webAppMount. Any suggestions?

Philippe

 

- Mail original -
De: phi...@free.fr
À: users@tomcat.apache.org
Envoyé: Vendredi 21 Novembre 2014 15:38:57
Objet: Problem with base directory in Resource


Hello,

in my Apache 8 context.xml file, I have created the following resource:

Resources
PreResources 

className=org.apache.catalina.webresources.DirResourceSet
base=/mnt/mynfsserver_img/ 
webAppMount=/img 
internalPath=/img /
/Resources

where /mnt/mynfsserver_img is a mounted volume containing thousands of photos 
in sub-directories.

When I start Tomcat 8, I get the following error message:

-
Caused by: org.apache.catalina.LifecycleException: Failed to initialize 
component [org.apache.catalina.webresources.DirResourceSet@6649bfd3]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at 
org.apache.catalina.webresources.StandardRoot.initInternal(StandardRoot.java:647)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 14 more
Caused by: java.lang.IllegalArgumentException: TODO-i18n: base/internalPath is 
not a directory
at 
org.apache.catalina.webresources.DirResourceSet.checkType(DirResourceSet.java:247)
at 
org.apache.catalina.webresources.AbstractFileResourceSet.initInternal(AbstractFileResourceSet.java:134)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 16 more


What am I doing wrong?

Many thanks.

Cheers,

Philippe

-
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: Problem with base directory in Resource

2014-11-21 Thread phiroc

I figured it out.

Let say /mnt/mynfsserver_img/ contains an image called myimage.png.

If you create the below pre-resource in context.xml, you can access that image 
by typing http://localhost:8080/img/myimage.png.

Philippe

- Mail original -
De: phi...@free.fr
À: Tomcat Users List users@tomcat.apache.org
Envoyé: Vendredi 21 Novembre 2014 15:45:25
Objet: Re: Problem with base directory in Resource


I have solved the problem by replacing PostResources by PreResources (cf. 
http://mikusa.blogspot.fr/2014/07/tips-on-migrating-to-tomat-8-resources.html).

Now I need to figure out how to use the webAppMount. Any suggestions?

Philippe

 

- Mail original -
De: phi...@free.fr
À: users@tomcat.apache.org
Envoyé: Vendredi 21 Novembre 2014 15:38:57
Objet: Problem with base directory in Resource


Hello,

in my Apache 8 context.xml file, I have created the following resource:

Resources
PreResources 

className=org.apache.catalina.webresources.DirResourceSet
base=/mnt/mynfsserver_img/ 
webAppMount=/img 
internalPath=/img /
/Resources

where /mnt/mynfsserver_img is a mounted volume containing thousands of photos 
in sub-directories.

When I start Tomcat 8, I get the following error message:

-
Caused by: org.apache.catalina.LifecycleException: Failed to initialize 
component [org.apache.catalina.webresources.DirResourceSet@6649bfd3]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at 
org.apache.catalina.webresources.StandardRoot.initInternal(StandardRoot.java:647)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 14 more
Caused by: java.lang.IllegalArgumentException: TODO-i18n: base/internalPath is 
not a directory
at 
org.apache.catalina.webresources.DirResourceSet.checkType(DirResourceSet.java:247)
at 
org.apache.catalina.webresources.AbstractFileResourceSet.initInternal(AbstractFileResourceSet.java:134)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 16 more


What am I doing wrong?

Many thanks.

Cheers,

Philippe

-
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: server-status in text format

2014-11-21 Thread Jose Monreal
From the documentation it only says From this link, but it doesn't say if
its possible to get the info from the text manager.
Why it hasn't been developed?

Saludos cordiales,

José Ignacio Monreal Bailey  |  Ingeniero Civil en Computación



 *Cuidemos del medio ambiente. Por favor no imprimas este e-mail si no es
 necesario.*

On Fri, Nov 21, 2014 at 10:51 AM, Jose Monreal jmonr...@gmail.com wrote:

 Is it possible to get the same information of html manger server status
 but in text format?

 Like this curl http://localhost:8080/manager/text/server-status

 Best regards,
 José





catalina.out rotation in tomcat 7.0.56

2014-11-21 Thread Niranjan Babu Bommu
Hi

I’m working on a project migrating apps from jboss to tomcat, I’m running
into an issue that is catalina.out rotation, I’m using log4.properties.
Everything works fine, log rotation happening but not everyday midnight. I
‘m having difficult time to figure out. could some one help me out on this


I followed this document to setup.


http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j.


 log4j.properties in CATALINA_BASE/lib



log4j.rootLogger=INFO,catalina

log4j.appender.catalina=org.apache.log4j.DailyRollingFileAppender
log4j.appender.catalina.File=${catalina.base}/logs/catalina.out
log4j.appender.catalina.Append=true
log4j.appender.catalina.Encoding=UTF-8

# Roll-over the log once per day
log4j.appender.catalina.DatePattern='.'-MM-dd'.log'
log4j.appender.catalina.layout=org.apache.log4j.PatternLayout
log4j.appender.catalina.layout.ConversionPattern=%d [%t] %-5p %c- %m%n

-- 
*Thanks*
*Niranjan*


Re: catalina.properties and system properties

2014-11-21 Thread Igal @ getRailo.org
On 11/19/2014 9:44 AM, Igal @ getRailo.org wrote:
 hi,

 I don't have use for scanning the jars for tld files etc., so usually,
 in catalina.properties, I skip all jars by setting

 tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar

 I just noticed that I can set it via a system property, i.e.

 -Dtomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar

 1) does the system property override catalina.properties?

 2) can I use just * instead of *.jar?

 3) is it possible to set the common.loader from catalina.properties via
 a system property?
anyone?

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



Re: catalina.out rotation in tomcat 7.0.56

2014-11-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Niranjan,

On 11/21/14 10:38 AM, Niranjan Babu Bommu wrote:
 I’m working on a project migrating apps from jboss to tomcat, I’m
 running into an issue that is catalina.out rotation, I’m using
 log4.properties. Everything works fine, log rotation happening but
 not everyday midnight. I ‘m having difficult time to figure out.
 could some one help me out on this
 
 I followed this document to setup.
 
 http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j.
 
 log4j.properties in CATALINA_BASE/lib
 
 
 
 log4j.rootLogger=INFO,catalina
 
 log4j.appender.catalina=org.apache.log4j.DailyRollingFileAppender 
 log4j.appender.catalina.File=${catalina.base}/logs/catalina.out 
 log4j.appender.catalina.Append=true 
 log4j.appender.catalina.Encoding=UTF-8
 
 # Roll-over the log once per day 
 log4j.appender.catalina.DatePattern='.'-MM-dd'.log' 
 log4j.appender.catalina.layout=org.apache.log4j.PatternLayout 
 log4j.appender.catalina.layout.ConversionPattern=%d [%t] %-5p %c-
 %m%n

If you use ${catalina.base}/logs/catalina.out with log4j and you are
also using Tomcat's standard scripts to launch Tomcat, then you will
have a conflict because logs/catalina.out is used for redirection of
the stdout and stderr streams when the JVM launches.

Instead, use a different file with log4j, and minimize the amount of
stuff going to stdout/stderr so that it does not require any rotation
at all.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUb3PUAAoJEBzwKT+lPKRYRaoP/ijh53H4flvtl8uVTVxwRBXc
kt12tGfEfMgm8D6oneh6oZ4gNO6VnGKEWP8VHCEvKzZPCUgTwx2/VPTKi8lRdrKl
JghjfbzuuVHIF+VQi5ClzT6uNveiIhzi60oleyzMHiIjaCs1lSR6HJ7V2W67Mu2M
iEVz2j33/WA5BQzDPRwpbiJBFVzdJrfD2YTmUdIoIBaLLKYTBxgmGcLbamvUwsXg
qotuN5wWQRgcIiclE0O7Ko+F075tY3ec65llV6olIlzGLXIKqhzsj9Tg15cRx97A
RQCUAV9qH1MjFHhBnVfHOkte/6JqAetjHeN7Cf3rIWjp+CdC6fO0teLGJPtZHvAQ
6eeN0VntGy6OSe12r3nID+FvDTgBWe85UPAwk3hP1wXgMYaclOMRwfa5kD3zM4Tm
y2ZMrdQKMq6xfl1hSXCtYA5mYjMVxSELTarGv42V9hqErk+4BUxzm6v/71G1NCCj
8yQo6+X7Ei4QfjUuO/K9u+/aZP70n+39MxMVopSa/Ol95RlxzI+1bJJtIsjZFU/7
VgkZ6mHdHrLJMdgOIsjM3spfOZvbpKuIboo/bGLe5TnUfoccNTmnYml0KWKGWhqh
fLYTtc9Pl5JdYmpi3MqBTr2Yv3dGssC9yW1G0zDztNrv6qn3YXKFJ61gMj1rDhau
SaLFI4P3EQ4mWjKmI0j0
=O3bN
-END PGP SIGNATURE-

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



Re: catalina.properties and system properties

2014-11-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Igal,

On 11/21/14 11:50 AM, Igal @ getRailo.org wrote:
 On 11/19/2014 9:44 AM, Igal @ getRailo.org wrote:
 hi,
 
 I don't have use for scanning the jars for tld files etc., so
 usually, in catalina.properties, I skip all jars by setting
 
 tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar
 
 I just noticed that I can set it via a system property, i.e.
 
 -Dtomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar
 
 1) does the system property override catalina.properties?
 
 2) can I use just * instead of *.jar?
 
 3) is it possible to set the common.loader from
 catalina.properties via a system property?
 anyone?

Lot of folks are at ApacheCon Europe this week. Give it a bit more time.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUb3QdAAoJEBzwKT+lPKRYvpwP/2lqlGKGG4IH05iZEduETDlI
oXy6e3vTKZCzwnIcFaE/tjQnO4cwIGT/UUR7wmZ1T6rKZNODdqCWFMhlRtZoC/Nn
kl4URlHJGhzSmh/5whl+iCnmlErn8jUcCe6yG20Tg/L3M21ILNd3kgtnidtjLszy
KpErBXXYtynmHuFtyuJIbe+1OAKKjdmxD2prZLUd5kBrPlB774sFv58nIPQmQk4C
pv+UB1j+tc6FrfSAIr+jcJvhy34N9pQfY3kRf9P/aWoaFM98Ta/TxMTNOeyDhOpn
8m5WTWJOn5TfO/a5AabX8eSVglvPzUxAcxOy7PSuv56RvUXlalgQlBhJBa9E5khY
6MWNxFJNsMvJ2XM9LMizrsyb2R6lON06z/xufYwMeiyJNDwmbr/u7MmkPusNUBff
pgoYzTl99sEqtKDBbGIwdnwNxBPBiyhjJycSHXFhL7egHoeB2MdB2NXsQ7nPMnBL
o2pirxWucvaC+UHCBDgrTrfphEEGyhiuOGZT++4wvzl1JATSYZWtlUND7S0tqAT3
gySy7aYd+lotMbOfQZFWpQYRu5d9thSAuIWjW8f6E/8fuGM8gIal9kK4fUSpSai7
fuD7l9dqFtEhJ6PVFL0SRZnlRgaKmF5lKaeSw3dQwRhKAA/6VI/Qi+6ppxeYfbD2
7VJrUYf4YebklqrtlJmt
=k94A
-END PGP SIGNATURE-

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



Re: catalina.properties and system properties

2014-11-21 Thread Igal @ getRailo.org
On 11/21/2014 9:19 AM, Christopher Schultz wrote:
 Lot of folks are at ApacheCon Europe this week. Give it a bit more time.

 -chris
No problem.  Thanks Chris!


Igal

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



Re: [OT] Debugging a Webapp in Eclipse running Tomcat as a stand-alone JVM process

2014-11-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Glen,

On 11/20/14 3:31 PM, Glen Peterson wrote:
 I never looked into jsvc.  It sounds very interesting!  To use a  
 1024 port as a non-root user, I've always used iptables to
 redirect traffic to a higher-numbered port.  When experimenting
 with iptables on a remote server, I actually like to schedule a
 reboot for 10 or 15 minutes, so that if I lock myself out, I can
 just wait a bit, then get back in without bothering anyone.

Some systems have iptables-apply which will save the existing rules,
apply the new ones, and then pause for a predetermined amount of time
so you can check to see that you can at least ssh back into the
server. After that timeout, it will roll-back the new iptables rules
unless you affirm that the changes should be saved.

So you can avoid the reboot-schedule and then having to cancel it.
It's just a bit more convenient.

 I hope that helps.  I have no idea about the pros and cons of
 iptables vs. jsvc for this.  I just know we were using iptables for
 security already, so this was a convenient way around the root 
 1024 port restriction.

iptables does get you around the port number restrictions which is
most often the reason I hear of folks using jsvc.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUb3XIAAoJEBzwKT+lPKRYa2MP/jgGw1xG48kEB+/3/6B9QD1K
Dvf523PnOQA1GlnHIVnsABr7/LJmR/SCsOv3MPHt+il09JfA55XP76PO+ublNn5+
M09g/2xusRjK7F04O8g2wGYRBpVF3W6UIoR0xCzWo3TTVlTOxeJTi4QvGs4Hesmt
X1CnqXtgwZjZ0cXO+G+JKSFTG9zWckpI6s4Op4s+jBdo8Nw7mSOy3NNgIjfyZ0Xo
orc03eQnHfa2e0rYjB6lYZ2/tfiH0dZsP9qwAZmm63G1oGE+IAl9Z8VL2ze5G+xC
HDtBCCZQG2Ccly9iwlH8wdZPJD03uz9XrCk+Wvj6maDjMuskU5a8qLlOfpWZqPJo
Tg2i202pILY5YB/CJYBECqe7WK+8CUhyfiDnwNnmd3aolJylHj3imVweqbnbmtaQ
dgZGbIBNzw777dNKRv2yMkjhJ+TipcYOYuBDIIUoOHyYwNx8onq0IUqmpFVOH9ZA
+ZXtiII9co8EM5RMiXgXLvcbig56qilAsDrm6CoKCKZ0Y7juL0n5Oz2vfnT8AE88
bsAZzAOb9y4JvvH502H5YExxjLRna0IE+EZ3XsCHdEN8WjFGCe/fC4l/BWsmxE6Z
6BH+Tf+oK5bq14tU/VGtkk2VEA27E62weAGXu+PZei4roSvM4sGw6k8F6+jPgN75
3d5hACx4KQO/nifbdbzs
=8D0+
-END PGP SIGNATURE-

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



Re: Debugging a Webapp in Eclipse running Tomcat as a stand-alone JVM process

2014-11-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 11/20/14 4:09 PM, Mark Eggers wrote:
 
 Chris,
 
 On 11/20/2014 12:11 PM, Christopher Schultz wrote:
 Léa,
 
 On 11/20/14 1:21 PM, Léa Massiot wrote:
 Thank you for your answers.
 
 @MarkEggers Thank you very much for sharing.
 
 Christopher Schultz wrote There are reasons to use jsvc, but 
 the ability to run as a non-root uses is not one of them.
 
 What are these reasons according to you (apart from running 
 Tomcat as a daemon on Unix which was also one of my goals at
 the time)?
 
 Several I can think of without spending too much time:
 
 1. (by a large margin) Allows access to ports  1024
 
 This is not required. Use either su -c or runuser -c (if using 
 SELinux) to access ports  1024.

Run as root? No thanks. Perhaps SELinux will allow a non-root user to
bind to low ports, but normal Linux does not.

 2. Automatic re-start of JVM process if the JVM exits
 
 This is nice, especially for misbehaving web applications that
 cannot (or will not) be fixed.

True. But auto-restart is sometimes better than getting a page. ;)

 3. Control JVM process by sending signal to parent process
 
 This is also nice, but reasonably written init scripts will do most
 of what is needed.

+1

 4. Enable rotation of stdout/stderr files
 
 Without restarting, this is nice. There are several hacks you can
 do with logrotate that are useful, but they all have drawbacks.

+1

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUb3azAAoJEBzwKT+lPKRYw4oP/joQeMsxqkt7C5DBZnc1+cAE
uS4EKgN0Zua/BiJ+EwgUFYyH4wmZWz6piChdF9XUAszvKCpLK4PvW/ejcxq4sYh5
4W8tn6cnl6dZNXi8M/+fCRC+7BmBn6trlYgB38kAKrl2+WuhTycxS3hymiM5WduM
hhtlfY3C83IlvvZx0aTfjZLlRDzTA0v4w0/m1YKBtRMdOVpqtCZ78xXVyrAi8PFb
01XBPfVE6c9C5i9MIhgkB2ZykGnCOWOc4nEIS5oDS9n1tjrbOmLzwS4IvGIMPMDY
dXITCCf0byayMCJTYuEq2N5xIvmf0KYIvbaZ1EkjcoGWWT/8ZMOpxuHPlr1bhoXm
1ian4IxCX1KTMjONHcn18zEjkDspZVej/T3jfzU5Dkzy3C6jTHqQAMgco0tj6eg/
apCeouOMjMQLTO0rsBrjEHjs3PEJTdpIIPKZWJXwdIZqruObNZeagZy17/+P1Bw4
zbYtfNw8pOQDlELdFCJXXjRLS1GqsopNZn/LFfeRwXAwSniydiDMB34IATyj3/fB
mlcoCaXvl2ERUOvQmhRbS17JKaZx3NI8dW3BrjYVIPlrlmCtV28gTqHeYRTUeIdN
IUMUN9HVA4ludtAJW5i0Oy5/qE2GqZUBMQJ4/xttL33+zDiCW1xoR9XzTHnC4KzS
xeTab+/gvO/QeBZPoOfk
=1V0W
-END PGP SIGNATURE-

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



Re: catalina.properties and system properties

2014-11-21 Thread Konstantin Kolinko
2014-11-19 20:44 GMT+03:00 Igal @ getRailo.org i...@getrailo.org:
 hi,

 I don't have use for scanning the jars for tld files etc., so usually,
 in catalina.properties, I skip all jars by setting

 tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar

 I just noticed that I can set it via a system property, i.e.

 -Dtomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar

 1) does the system property override catalina.properties?

No.

Note that the source code is available

http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/CatalinaProperties.java?view=markup#l147

 2) can I use just * instead of *.jar?

Try it. I think that the answer is yes, as Tomcat currently uses
pattern matching code borrowed from Ant.

 3) is it possible to set the common.loader from catalina.properties via
 a system property?

I think the answer is yes, but you would better try it / read the code.

Note that common.loader can include references to other properties,
like it does with ${catalina.base} etc.

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



Re: server-status in text format

2014-11-21 Thread Konstantin Kolinko
2014-11-21 18:24 GMT+03:00 Jose Monreal jmonr...@gmail.com:
 From the documentation it only says From this link, but it doesn't say if
 its possible to get the info from the text manager.
 Why it hasn't been developed?

 Saludos cordiales,

 José Ignacio Monreal Bailey  |  Ingeniero Civil en Computación



  *Cuidemos del medio ambiente. Por favor no imprimas este e-mail si no es
  necesario.*

 On Fri, Nov 21, 2014 at 10:51 AM, Jose Monreal jmonr...@gmail.com wrote:

 Is it possible to get the same information of html manger server status
 but in text format?

 Like this curl http://localhost:8080/manager/text/server-status



1. Tomcat version = ?

2. Do not top-post
http://tomcat.apache.org/lists.html#tomcat-users
- 6.

3.
http://localhost:8080/manager/status
http://localhost:8080/manager/status/all
- gives status in HTML format

http://localhost:8080/manager/status?XML=true
http://localhost:8080/manager/status/all?XML=true
- gives status in XML format

You can apply XSLT to format it into text.

You need any one of manager-* roles to access the above page:
manager-gui, manager-script, manager-status, manager-jmx

Source code: o.a.c.manager.StatusManagerServlet.

Best regards,
Konstantin Kolinko

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



Re: server-status in text format

2014-11-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Jose,

On 11/21/14 10:24 AM, Jose Monreal wrote:
 Is it possible to get the same information of html manger server 
 status but in text format?
 
 Like this curl http://localhost:8080/manager/text/server-status
 
 From the documentation it only says From this link, but it doesn't 
 say if its possible to get the info from the text manager. Why it 
 hasn't been developed?

What information in particular are you missing in he text server status?

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUb4U6AAoJEBzwKT+lPKRYqL4P/2Z5mEmeblZTmHGhu5sCQlw5
j4JSvimQKhdGKPowcD2/FU3QLh4pD2HHrQHGOakt5IYgcc7+uMl+rB/UWj8uXUbe
0KDHXovx58E8lUnmyk4/ogrSjDMGqs5nHLNYniULncoLO6L9maudMCcz45q9YcFl
JYOcNp4iJqTl15u77f6y1goGHv+ac4YQZ0pNOU5mvpbvMHBQeqDifSwRilORV6jz
to8Jteqzwhp85JFGbEyDSKihRJ7044bEcISLs8kbVEG2xp17iEc3MQ9jB3TQjoCf
M9nh7YeIwvjs8P6ulPUtAZNTwcJ8FoZk44/XCMWMwloRGtItnhm+f4OPd2vcJSAe
YWwPU+oWjQfpBt+xl4BQa6j9ARmUYZGiPYDWM3vbwUug0aTOiWxxMdrcpTSfPneT
OK2bb4heqRE5oN133wd0hQnS/fmcy7Ob/s+irPYFNtwwAI9qXtgdtjQHB56Y+7sh
StHMb/ANCkMWG9Giz+4yLtKpbChZ3vUQx1p8DPPV76/yeCefrtksmEhy3qRzyTS7
wb/ST7nR0x1h5MJMnSe2vriMzFlknMA8gRfPLsTMJCqeTrDrHSvKum4GQbexKOSu
0ZeVO40+1HLGneGtPBYZpDHKwjX75vr9F17ky9QkYySwq3FHcVbkbASas/8UcPBW
L99TBiG73uW6LNjpJVjc
=U9EL
-END PGP SIGNATURE-

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



Re: catalina.properties and system properties

2014-11-21 Thread Igal @ getRailo.org
On 11/21/2014 9:36 AM, Konstantin Kolinko wrote:
 I think the answer is yes, but you would better try it / read the code.

 Note that common.loader can include references to other properties,
 like it does with ${catalina.base} etc.
Spasiba Konstantin!


Igal

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



Thread stucked at (java.net.SocketInputStream.socketRead0(Native Method))

2014-11-21 Thread Dhaval Jaiswal
Below thread stucked and increased the load.


 java.net.SocketInputStream.read(SocketInputStream.java:129)
 
org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145)
 
org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:114)
 
org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)
 org.postgresql.core.PGStream.ReceiveChar(PGStream.java:274)
 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1660)
 org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
 
org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
 
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332)
 
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
 
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:991)
 
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
 
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
 com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source)
 com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source)
 
com.eos.accounts.policies.PolicyManager.getAllPoliciesForUser(PolicyManager.java:62)
 com.eos.accounts.policies.Policies.loadAllPoliciesForUser(Policies.java:25)
 com.eos.accounts.data.User.createFromDataSet(User.java:3165)
 com.eos.accounts.data.User.getUserById(User.java:2878)
 
com.eos.b2c.beans.GenericProductBean.setDeliveryDetails(GenericProductBean.java:320)
 com.eos.b2c.ui.ResellerNavigation.doGet(ResellerNavigation.java:2362)
 com.eos.b2c.ui.ResellerNavigation.doPost(ResellerNavigation.java:579)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)



thread dump output


http-8080-2 daemon prio=10 tid=0x5335e000 nid=0x6d82 runnable
[0x2b8b9a5c9000..0x2b8b9a5caa90]
   java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at
org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145)
at
org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:114)
at
org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)
at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:274)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1660)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
- locked 0x2b881d689760 (a
org.postgresql.core.v3.QueryExecutorImpl)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
at
org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332)
at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:991)
at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at
com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source)
at
com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source)
at
com.eos.gds.util.GenericSearchQuery.executeQuery(GenericSearchQuery.java:191)


Re: Thread stucked at (java.net.SocketInputStream.socketRead0(Native Method))

2014-11-21 Thread Dhaval Jaiswal
Following thread stuck and increased the load.


 java.net.SocketInputStream.read(SocketInputStream.java:129)
 
org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145)
 
org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:114)
 
org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)
 org.postgresql.core.PGStream.ReceiveChar(PGStream.java:274)
 
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1660)
 org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
 
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
 
org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
 
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332)
 
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
 
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:991)
 
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
 
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
 com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source)
 com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source)
 
com.eos.accounts.policies.PolicyManager.getAllPoliciesForUser(PolicyManager.java:62)
 com.eos.accounts.policies.Policies.loadAllPoliciesForUser(Policies.java:25)
 com.eos.accounts.data.User.createFromDataSet(User.java:3165)
 com.eos.accounts.data.User.getUserById(User.java:2878)
 
com.eos.b2c.beans.GenericProductBean.setDeliveryDetails(GenericProductBean.java:320)
 com.eos.b2c.ui.ResellerNavigation.doGet(ResellerNavigation.java:2362)
 com.eos.b2c.ui.ResellerNavigation.doPost(ResellerNavigation.java:579)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)



thread dump


http-8080-2 daemon prio=10 tid=0x5335e000 nid=0x6d82 runnable
[0x2b8b9a5c9000..0x2b8b9a5caa90]
   java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at
org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145)
at
org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:114)
at
org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)
at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:274)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1660)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
- locked 0x2b881d689760 (a
org.postgresql.core.v3.QueryExecutorImpl)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
at
org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332)
at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:991)
at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at
com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source)
at
com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown Source)
at
com.eos.gds.util.GenericSearchQuery.executeQuery(GenericSearchQuery.java:191)



On Sat, Nov 22, 2014 at 12:26 AM, Dhaval Jaiswal dhaval.jais...@via.com
wrote:

 Below thread stucked and increased the load.


  java.net.SocketInputStream.read(SocketInputStream.java:129)

  
 org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145)

  
 

Re: catalina.out rotation in tomcat 7.0.56

2014-11-21 Thread Niranjan Babu Bommu
Hi Chris,

Thanks for your reply.

Actually I'm running multiple instances in tomcat, log-rotation works fine
for all the instances but they are not rotation midnight everyday,

'.'-MM-ddRollover at midnight each day.
Thanks
Niranjan

On Fri, Nov 21, 2014 at 12:18 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Niranjan,

 On 11/21/14 10:38 AM, Niranjan Babu Bommu wrote:
  I’m working on a project migrating apps from jboss to tomcat, I’m
  running into an issue that is catalina.out rotation, I’m using
  log4.properties. Everything works fine, log rotation happening but
  not everyday midnight. I ‘m having difficult time to figure out.
  could some one help me out on this
 
  I followed this document to setup.
 
  http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_Log4j.
 
  log4j.properties in CATALINA_BASE/lib
 
 
 
  log4j.rootLogger=INFO,catalina
 
  log4j.appender.catalina=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.catalina.File=${catalina.base}/logs/catalina.out
  log4j.appender.catalina.Append=true
  log4j.appender.catalina.Encoding=UTF-8
 
  # Roll-over the log once per day
  log4j.appender.catalina.DatePattern='.'-MM-dd'.log'
  log4j.appender.catalina.layout=org.apache.log4j.PatternLayout
  log4j.appender.catalina.layout.ConversionPattern=%d [%t] %-5p %c-
  %m%n

 If you use ${catalina.base}/logs/catalina.out with log4j and you are
 also using Tomcat's standard scripts to launch Tomcat, then you will
 have a conflict because logs/catalina.out is used for redirection of
 the stdout and stderr streams when the JVM launches.

 Instead, use a different file with log4j, and minimize the amount of
 stuff going to stdout/stderr so that it does not require any rotation
 at all.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1
 Comment: GPGTools - http://gpgtools.org

 iQIcBAEBCAAGBQJUb3PUAAoJEBzwKT+lPKRYRaoP/ijh53H4flvtl8uVTVxwRBXc
 kt12tGfEfMgm8D6oneh6oZ4gNO6VnGKEWP8VHCEvKzZPCUgTwx2/VPTKi8lRdrKl
 JghjfbzuuVHIF+VQi5ClzT6uNveiIhzi60oleyzMHiIjaCs1lSR6HJ7V2W67Mu2M
 iEVz2j33/WA5BQzDPRwpbiJBFVzdJrfD2YTmUdIoIBaLLKYTBxgmGcLbamvUwsXg
 qotuN5wWQRgcIiclE0O7Ko+F075tY3ec65llV6olIlzGLXIKqhzsj9Tg15cRx97A
 RQCUAV9qH1MjFHhBnVfHOkte/6JqAetjHeN7Cf3rIWjp+CdC6fO0teLGJPtZHvAQ
 6eeN0VntGy6OSe12r3nID+FvDTgBWe85UPAwk3hP1wXgMYaclOMRwfa5kD3zM4Tm
 y2ZMrdQKMq6xfl1hSXCtYA5mYjMVxSELTarGv42V9hqErk+4BUxzm6v/71G1NCCj
 8yQo6+X7Ei4QfjUuO/K9u+/aZP70n+39MxMVopSa/Ol95RlxzI+1bJJtIsjZFU/7
 VgkZ6mHdHrLJMdgOIsjM3spfOZvbpKuIboo/bGLe5TnUfoccNTmnYml0KWKGWhqh
 fLYTtc9Pl5JdYmpi3MqBTr2Yv3dGssC9yW1G0zDztNrv6qn3YXKFJ61gMj1rDhau
 SaLFI4P3EQ4mWjKmI0j0
 =O3bN
 -END PGP SIGNATURE-

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




-- 
*Thanks*
*Niranjan*
*+1 781.956.6900*


Re: Thread stucked at (java.net.SocketInputStream.socketRead0(Native Method))

2014-11-21 Thread Ameer Mawia
Jaiswal, what your exact question is?

Obviously in your application, you need a DB connection and if this is
thread which is stuck, stack trace tells that tomcat dbcp, is trying to get
you a connection, but stuck while reading the result of validate query
which it had run before returning you a valid connection.

Probably you can take a look at validation query, for now? Ideally it
should be a very simple query, returning just one row and column.

Regards,
Ameer Mawia

On Sat, Nov 22, 2014 at 12:30 AM, Dhaval Jaiswal dhaval.jais...@via.com
wrote:

 Following thread stuck and increased the load.


  java.net.SocketInputStream.read(SocketInputStream.java:129)

  
 org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145)

  
 org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:114)

  
 org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)
  org.postgresql.core.PGStream.ReceiveChar(PGStream.java:274)

  
 org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1660)

  org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)

  
 org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)

  
 org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)

  
 org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)

  
 org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)

  
 org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332)

  
 org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)

  
 org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:991)

  
 org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)

  
 org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)

  
 org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
  com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown
 Source)
  com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown
 Source)

  
 com.eos.accounts.policies.PolicyManager.getAllPoliciesForUser(PolicyManager.java:62)

  com.eos.accounts.policies.Policies.loadAllPoliciesForUser(Policies.java:25)
  com.eos.accounts.data.User.createFromDataSet(User.java:3165)
  com.eos.accounts.data.User.getUserById(User.java:2878)

  
 com.eos.b2c.beans.GenericProductBean.setDeliveryDetails(GenericProductBean.java:320)
  com.eos.b2c.ui.ResellerNavigation.doGet(ResellerNavigation.java:2362)
  com.eos.b2c.ui.ResellerNavigation.doPost(ResellerNavigation.java:579)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)



 thread dump


 http-8080-2 daemon prio=10 tid=0x5335e000 nid=0x6d82 runnable
 [0x2b8b9a5c9000..0x2b8b9a5caa90]
java.lang.Thread.State: RUNNABLE
 at java.net.SocketInputStream.socketRead0(Native Method)
 at java.net.SocketInputStream.read(SocketInputStream.java:129)
 at

 org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145)
 at

 org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:114)
 at

 org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)
 at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:274)
 at

 org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1660)
 at

 org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
 - locked 0x2b881d689760 (a
 org.postgresql.core.v3.QueryExecutorImpl)
 at

 org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
 at

 org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
 at

 org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
 at

 org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
 at

 org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332)
 at

 org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
 at

 org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:991)
 at

 org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
 at

 

Re: Problem with base directory in Resource

2014-11-21 Thread Konstantin Kolinko
That IllegalStateException means that  (new
File(/mnt/mynfsserver_img, /img)).isDirectory()  returned false.

In other words, the likely cause is that the path was not readable at
the time of the check.

Replacing PostResources by PreResources and vise versa will have no
effect on this.


2014-11-21 17:45 GMT+03:00  phi...@free.fr:

 I have solved the problem by replacing PostResources by PreResources (cf. 
 http://mikusa.blogspot.fr/2014/07/tips-on-migrating-to-tomat-8-resources.html).

 Now I need to figure out how to use the webAppMount. Any suggestions?

 Philippe



 - Mail original -
 De: phi...@free.fr
 À: users@tomcat.apache.org
 Envoyé: Vendredi 21 Novembre 2014 15:38:57
 Objet: Problem with base directory in Resource


 Hello,

 in my Apache 8 context.xml file, I have created the following resource:

 Resources
 PreResources
 
 className=org.apache.catalina.webresources.DirResourceSet
 base=/mnt/mynfsserver_img/
 webAppMount=/img
 internalPath=/img /
 /Resources

 where /mnt/mynfsserver_img is a mounted volume containing thousands of photos 
 in sub-directories.

 When I start Tomcat 8, I get the following error message:

 -
 Caused by: org.apache.catalina.LifecycleException: Failed to initialize 
 component [org.apache.catalina.webresources.DirResourceSet@6649bfd3]
 at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
 at 
 org.apache.catalina.webresources.StandardRoot.initInternal(StandardRoot.java:647)
 at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
 ... 14 more
 Caused by: java.lang.IllegalArgumentException: TODO-i18n: base/internalPath 
 is not a directory
 at 
 org.apache.catalina.webresources.DirResourceSet.checkType(DirResourceSet.java:247)
 at 
 org.apache.catalina.webresources.AbstractFileResourceSet.initInternal(AbstractFileResourceSet.java:134)
 at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
 ... 16 more
 

 What am I doing wrong?

 Many thanks.

 Cheers,

 Philippe


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



Re: Thread stucked at (java.net.SocketInputStream.socketRead0(Native Method))

2014-11-21 Thread Dhaval Jaiswal
yes. the thread is stucked and started increasing load of the server.

My configuration is as below. Query is fetching one row only.


Resource name=jdbc auth=Container type=javax.sql.DataSource
driverClassName=org.postgresql.Driver url=jdbc:postgresql
maxActive=100 maxIdle=20 maxWait=3
validationQuery=select 1 testOnBorrow=true
removeAbandoned=true removeAbandonedTimeout=120
logAbandoned=true /






On Sat, Nov 22, 2014 at 1:29 AM, Ameer Mawia ameer.ma...@gmail.com wrote:

 Jaiswal, what your exact question is?

 Obviously in your application, you need a DB connection and if this is
 thread which is stuck, stack trace tells that tomcat dbcp, is trying to get
 you a connection, but stuck while reading the result of validate query
 which it had run before returning you a valid connection.

 Probably you can take a look at validation query, for now? Ideally it
 should be a very simple query, returning just one row and column.

 Regards,
 Ameer Mawia

 On Sat, Nov 22, 2014 at 12:30 AM, Dhaval Jaiswal dhaval.jais...@via.com
 wrote:

  Following thread stuck and increased the load.
 
 
   java.net.SocketInputStream.read(SocketInputStream.java:129)
 
 
 org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145)
 
 
 org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:114)
 
 
 org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)
   org.postgresql.core.PGStream.ReceiveChar(PGStream.java:274)
 
 
 org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1660)
 
 
 org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
 
 
 org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
 
 
 org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
 
 
 org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
 
 
 org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
 
 
 org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:332)
 
 
 org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
 
 
 org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:991)
 
 
 org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
 
 
 org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
 
 
 org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
   com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown
  Source)
   com.eos.accounts.util.AccountsDatabaseManager.getConnection(Unknown
  Source)
 
 
 com.eos.accounts.policies.PolicyManager.getAllPoliciesForUser(PolicyManager.java:62)
 
 
 com.eos.accounts.policies.Policies.loadAllPoliciesForUser(Policies.java:25)
   com.eos.accounts.data.User.createFromDataSet(User.java:3165)
   com.eos.accounts.data.User.getUserById(User.java:2878)
 
 
 com.eos.b2c.beans.GenericProductBean.setDeliveryDetails(GenericProductBean.java:320)
   com.eos.b2c.ui.ResellerNavigation.doGet(ResellerNavigation.java:2362)
   com.eos.b2c.ui.ResellerNavigation.doPost(ResellerNavigation.java:579)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 
 
 
  thread dump
 
 
  http-8080-2 daemon prio=10 tid=0x5335e000 nid=0x6d82 runnable
  [0x2b8b9a5c9000..0x2b8b9a5caa90]
 java.lang.Thread.State: RUNNABLE
  at java.net.SocketInputStream.socketRead0(Native Method)
  at java.net.SocketInputStream.read(SocketInputStream.java:129)
  at
 
 
 org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:145)
  at
 
 
 org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:114)
  at
 
 
 org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)
  at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:274)
  at
 
 
 org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1660)
  at
 
 
 org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
  - locked 0x2b881d689760 (a
  org.postgresql.core.v3.QueryExecutorImpl)
  at
 
 
 org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
  at
 
 
 org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
  at
 
 
 org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
  at