AW: Tomcat 7.0.2: Cannot stop thread started by web application

2010-12-16 Thread Näcker, Stephan (UIT)
You're right. The threads are being shutdown asynchronously.

Thanks,
Stephan

-Ursprüngliche Nachricht-
Von: Mark Thomas [mailto:ma...@apache.org] 
Gesendet: Mittwoch, 15. Dezember 2010 17:16
An: Tomcat Users List
Betreff: Re: Tomcat 7.0.2: Cannot stop thread started by web application

On 15/12/2010 15:41, Näcker, Stephan (UIT) wrote:
 Hey there,
 
 I 'm working on the following log file output:
 
 15.12.2010 15:37:51 org.apache.catalina.loader.WebappClassLoader 
 clearReferencesThreads
 SCHWERWIEGEND: The web application [/phoenix-webapp] appears to have started 
 a thread named [Replication Thread] but has failed to stop it. This is very 
 likely to create a memory leak.
 15.12.2010 15:37:51 org.apache.catalina.loader.WebappClassLoader 
 clearReferencesThreads
 SCHWERWIEGEND: The web application [/phoenix-webapp] appears to have started 
 a thread named [Replication Thread] but has failed to stop it. This is very 
 likely to create a memory leak.
 
 These are threads started by the EHCache cache manager. When undeploying the 
 web application, Tomcat fails to stop it.
 
 I implemented a web application predestroy listener, which is called while 
 undeployment and shuts down the cache. When monitoring the threads, JConsole 
 tells me that there are no replication threads left running.
 
 So, I 'm wondering if there is a serious problem leading to memory leaks? Or 
 does Tomcat stops the threads? Or does Tomcat collect running threads 
 information while EHCache has not yet finished shutting down? Has anyone any 
 idea?

Sounds like the threads are being shutdown asynchronously. Tomcat
triggers the ServletContextListeners before checking for leaks. If that
is the case you should be fine but in your shoes I'd want to confirm
that that is the case.

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



Tomcat Bug: JSP not found?

2010-12-16 Thread Jess Holle
Has anyone seen issues with JSPs that are present in an expanded web app 
directory (i.e. deployed with an XML file pointing to a directory in WAR 
layout rather than as a WAR) being found by Tomcat for a long time, 
weeks even, and then suddenly no longer being found thereafter?


I've received several reports of this now, primarily on Tomcat 6.0.20 
and one possibly on 6.0.26.  This is with an application that has been 
running fine on Tomcat for many years, but has also been evolving along 
the way.  I'm certainly hoping to get these parties to re-test with 
6.0.29, but I thought I should ask if these symptoms have been seen by 
others.


--
Jess Holle


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



Re: can't find jni.h compiling jsvc on Mac Os X

2010-12-16 Thread Mladen Turk

On 12/15/2010 09:47 PM, Edoardo Panfili wrote:

I am trying to install tomcat 7.0.5 on Mac os X 10.6.5



There is a binary available at:
http://commons.apache.org/daemon/download_daemon.cgi

Click on the Browse download area...
And navigate to binaries/1.0.4/darwin


Regards
--
^TM

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



Re: Tomcat Bug: JSP not found?

2010-12-16 Thread Konstantin Kolinko
2010/12/16 Jess Holle je...@ptc.com:
 Has anyone seen issues with JSPs that are present in an expanded web app
 directory (i.e. deployed with an XML file pointing to a directory in WAR
 layout rather than as a WAR) being found by Tomcat for a long time, weeks
 even, and then suddenly no longer being found thereafter?


What are the symptoms? just 404? class not found (500) ?

Tomcat 6 will return 404 if the webapp is unavailable (undeployed, stopped).
Maybe that is your cause?


In the changelog there is
When development mode is enabled and a JSP is deleted, ensure next
request for that JSP is consistent with the JSP having been removed.
in 6.0.21 (r832102)
http://www.mail-archive.com/dev@tomcat.apache.org/msg35608.html

Best regards,
Konstantin Kolinko

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



Re: can't find jni.h compiling jsvc on Mac Os X

2010-12-16 Thread Edoardo Panfili

On 16/12/10 13.51, Mladen Turk wrote:

On 12/15/2010 09:47 PM, Edoardo Panfili wrote:

I am trying to install tomcat 7.0.5 on Mac os X 10.6.5



There is a binary available at:
http://commons.apache.org/daemon/download_daemon.cgi

Click on the Browse download area...
And navigate to binaries/1.0.4/darwin

thank you for you answerf, I put the file in $CATALINA_BASE/bin but 
there is always some problem in catalina.err


Cannot dynamically link to 
/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib
dlopen(/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib, 
10): no suitable image found.  Did find:


/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib: 
mach-o, but wrong architecture
Service exit with a return value of 1


(tomcat works if I start it using bin/startup.sh)

Edoardo

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



Re: Tomcat Bug: JSP not found?

2010-12-16 Thread Pid
On 16/12/2010 12:08, Jess Holle wrote:
 Has anyone seen issues with JSPs that are present in an expanded web app
 directory (i.e. deployed with an XML file pointing to a directory in WAR
 layout rather than as a WAR) being found by Tomcat for a long time,
 weeks even, and then suddenly no longer being found thereafter?

Are the JSPs dynamically compiled, or pre-compiled?


p

 I've received several reports of this now, primarily on Tomcat 6.0.20
 and one possibly on 6.0.26.  This is with an application that has been
 running fine on Tomcat for many years, but has also been evolving along
 the way.  I'm certainly hoping to get these parties to re-test with
 6.0.29, but I thought I should ask if these symptoms have been seen by
 others.
 
 -- 
 Jess Holle
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: can't find jni.h compiling jsvc on Mac Os X

2010-12-16 Thread Mladen Turk

On 12/16/2010 02:34 PM, Edoardo Panfili wrote:

On 16/12/10 13.51, Mladen Turk wrote:

On 12/15/2010 09:47 PM, Edoardo Panfili wrote:

I am trying to install tomcat 7.0.5 on Mac os X 10.6.5



There is a binary available at:
http://commons.apache.org/daemon/download_daemon.cgi

Click on the Browse download area...
And navigate to binaries/1.0.4/darwin


thank you for you answerf, I put the file in $CATALINA_BASE/bin but there is 
always some problem in catalina.err

Cannot dynamically link to 
/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib
dlopen(/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib,
 10): no suitable image found. Did find:
/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib: 
mach-o, but wrong architecture
Service exit with a return value of 1




Right, it fails on mac cause default (client) jvm is 32-bit only.
Add '-jvm server' to the jsvc command lines and it should work.


Regards
--
^TM

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



Re: can't find jni.h compiling jsvc on Mac Os X

2010-12-16 Thread Mladen Turk

On 12/16/2010 04:20 PM, Mladen Turk wrote:

On 12/16/2010 02:34 PM, Edoardo Panfili wrote:

On 16/12/10 13.51, Mladen Turk wrote:

On 12/15/2010 09:47 PM, Edoardo Panfili wrote:

I am trying to install tomcat 7.0.5 on Mac os X 10.6.5



There is a binary available at:
http://commons.apache.org/daemon/download_daemon.cgi

Click on the Browse download area...
And navigate to binaries/1.0.4/darwin


thank you for you answerf, I put the file in $CATALINA_BASE/bin but there is 
always some problem in catalina.err

Cannot dynamically link to 
/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib
dlopen(/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib,
 10): no suitable image found. Did find:
/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib: 
mach-o, but wrong architecture
Service exit with a return value of 1




Right, it fails on mac cause default (client) jvm is 32-bit only.
Add '-jvm server' to the jsvc command lines and it should work.



Another option is to use
arch -arch i386 ./jsvc -jvm server ...
or
arch -arch x86_64 ./jsvc -jvm server ...

Think I'll add that to Tomcat daemon scripts


Regards
--
^TM

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



Re: can't find jni.h compiling jsvc on Mac Os X

2010-12-16 Thread Edoardo Panfili

On 16/12/10 16.20, Mladen Turk wrote:

On 12/16/2010 02:34 PM, Edoardo Panfili wrote:

On 16/12/10 13.51, Mladen Turk wrote:

On 12/15/2010 09:47 PM, Edoardo Panfili wrote:

I am trying to install tomcat 7.0.5 on Mac os X 10.6.5



There is a binary available at:
http://commons.apache.org/daemon/download_daemon.cgi

Click on the Browse download area...
And navigate to binaries/1.0.4/darwin


thank you for you answerf, I put the file in $CATALINA_BASE/bin but
there is always some problem in catalina.err

Cannot dynamically link to
/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib

dlopen(/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib,
10): no suitable image found. Did find:
/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib:
mach-o, but wrong architecture
Service exit with a return value of 1




Right, it fails on mac cause default (client) jvm is 32-bit only.
Add '-jvm server' to the jsvc command lines and it should work.


thank you! now it works,
the only change that I have made is on the class path:

-
-cp ./bin/bootstrap.jar
-
must become
-
-cp ./bin/bootstrap.jar:./bin/tomcat-juli.jar
-
when I launch jsvc.

Is it useful if I fill a bug report (for 
http://tomcat.apache.org/tomcat-7.0-doc/setup.html page, of jsvc 
compilation on mac?)


thank you again
Edoardo

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



Re: can't find jni.h compiling jsvc on Mac Os X

2010-12-16 Thread Mladen Turk

On 12/16/2010 04:48 PM, Edoardo Panfili wrote:

On 16/12/10 16.20, Mladen Turk wrote:

On 12/16/2010 02:34 PM, Edoardo Panfili wrote:

On 16/12/10 13.51, Mladen Turk wrote:

On 12/15/2010 09:47 PM, Edoardo Panfili wrote:

I am trying to install tomcat 7.0.5 on Mac os X 10.6.5



There is a binary available at:
http://commons.apache.org/daemon/download_daemon.cgi

Click on the Browse download area...
And navigate to binaries/1.0.4/darwin


thank you for you answerf, I put the file in $CATALINA_BASE/bin but
there is always some problem in catalina.err

Cannot dynamically link to
/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib

dlopen(/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib,
10): no suitable image found. Did find:
/System/Library/Frameworks/JavaVM.framework/Home/../Libraries/libclient.dylib:
mach-o, but wrong architecture
Service exit with a return value of 1




Right, it fails on mac cause default (client) jvm is 32-bit only.
Add '-jvm server' to the jsvc command lines and it should work.


thank you! now it works,
the only change that I have made is on the class path:

-
-cp ./bin/bootstrap.jar
-
must become
-
-cp ./bin/bootstrap.jar:./bin/tomcat-juli.jar
-
when I launch jsvc.

Is it useful if I fill a bug report (for 
http://tomcat.apache.org/tomcat-7.0-doc/setup.html page, of jsvc compilation on 
mac?)



Please do that, so we can track the progress.

Regards
--
^TM

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



Re: Tomcat Bug: JSP not found?

2010-12-16 Thread Jess Holle

The JSP has not been deleted and a stack trace is logged like:

org.apache.jasper.JasperException: Le fichier /xxx/yyy/zzz.jsp n'a pas été 
trouvé
at 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
at 
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
at 
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
at org.apache.jasper.compiler.JspUtil.getInputStream(JspUtil.java:849)
at org.apache.jasper.compiler.JspUtil.getReader(JspUtil.java:1084)
at 
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:250)
at 
org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:120)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:165)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

This particular example occurred on a system running in a French locale, 
but translates into The file ___ was not found.


Why a JSP that has already been compiled is being recompiled is another 
question I have...


--
Jess Holle

On 12/16/2010 7:08 AM, Konstantin Kolinko wrote:

2010/12/16 Jess Holleje...@ptc.com:

Has anyone seen issues with JSPs that are present in an expanded web app
directory (i.e. deployed with an XML file pointing to a directory in WAR
layout rather than as a WAR) being found by Tomcat for a long time, weeks
even, and then suddenly no longer being found thereafter?


What are the symptoms? just 404? class not found (500) ?

Tomcat 6 will return 404 if the webapp is unavailable (undeployed, stopped).
Maybe that is your cause?


In the changelog there is
When development mode is enabled and a JSP is deleted, ensure next
request for that JSP is consistent with the JSP having been removed.
in 6.0.21 (r832102)
http://www.mail-archive.com/dev@tomcat.apache.org/msg35608.html

Best regards,
Konstantin Kolinko

-
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 Bug: JSP not found?

2010-12-16 Thread Jess Holle

On 12/16/2010 7:49 AM, Pid wrote:

On 16/12/2010 12:08, Jess Holle wrote:

Has anyone seen issues with JSPs that are present in an expanded web app
directory (i.e. deployed with an XML file pointing to a directory in WAR
layout rather than as a WAR) being found by Tomcat for a long time,
weeks even, and then suddenly no longer being found thereafter?

Are the JSPs dynamically compiled, or pre-compiled?

Dynamically I believe.

--
Jess Holle


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



RE: Tomcat 6 not shutting down

2010-12-16 Thread April Easton
Chuck,
 Thank you greatly for the help.  I searched our code and found the timer 
in question.  I added a call to cancel this timer when the other thread dies 
and Tomcat now shuts down properly.

Thank you,
April

-Original Message-
From: April Easton 
Sent: Wednesday, December 15, 2010 3:58 PM
To: 'users@tomcat.apache.org'
Subject: Tomcat 6 not shutting down

Good day,
 I've been searching for information on how to determine what process is 
keeping Tomcat from shutting down properly.  From other posts, I've been able 
to determine that the threads started from an Axis2 1.5.3 servlet on Tomcat 
were still processing when the shutdown.sh command was issued.  I have worked 
on that issue and now the threads created are being terminated no more than 2 
minutes after the ServletContextListener executes the destroy method.  I don't 
see the threads that I created in this new dump file.  How do I determine what 
process is keeping Tomcat from shutting down properly?  Is it a problem if I'm 
not terminating the Axis2 threads immediately after the servlet is destroyed?  
I'm using Tomcat 6.0.18 on RHEL5 update 5 with Java 6 update 7.   I have 
included the dump file below.  Thank you in advance for your help.

2010-12-15 14:46:38
Full thread dump Java HotSpot(TM) 64-Bit Server VM (10.0-b23 mixed mode):

DestroyJavaVM prio=10 tid=0x51218400 nid=0x666e waiting on condition 
[0x..0x416a3d00]
   java.lang.Thread.State: RUNNABLE

http-8443-1 daemon prio=10 tid=0x50fd0c00 nid=0x677e in Object.wait() 
[0x40fcb000..0x40fcbb10]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x2aaade50fbf0 (a 
org.apache.tomcat.util.net.JIoEndpoint$Worker)
at java.lang.Object.wait(Object.java:485)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
- locked 0x2aaade50fbf0 (a 
org.apache.tomcat.util.net.JIoEndpoint$Worker)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
at java.lang.Thread.run(Thread.java:619)

http-8088-1 daemon prio=10 tid=0x50cd7800 nid=0x677d in Object.wait() 
[0x40b71000..0x40b71c90]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x2aaadff4b5a8 (a 
org.apache.tomcat.util.net.JIoEndpoint$Worker)
at java.lang.Object.wait(Object.java:485)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
- locked 0x2aaadff4b5a8 (a 
org.apache.tomcat.util.net.JIoEndpoint$Worker)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
at java.lang.Thread.run(Thread.java:619)

TP-Processor4 daemon prio=10 tid=0x5127c800 nid=0x66ce in 
Object.wait() [0x41f5..0x41f50d90]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x2aaaed3fa590 (a org.apache.jk.common.ChannelSocket)
at java.lang.Object.wait(Object.java:485)
at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:300)
- locked 0x2aaaed3fa590 (a org.apache.jk.common.ChannelSocket)
at 
org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:660)
at 
org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:870)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)

http-8443-Acceptor-0 daemon prio=10 tid=0x509ac000 nid=0x66ca waiting 
on condition [0x41d4e000..0x41d4eb90]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at 
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:302)
at java.lang.Thread.run(Thread.java:619)

http-8088-Acceptor-0 daemon prio=10 tid=0x517c9c00 nid=0x66c7 waiting 
on condition [0x41aa7000..0x41aa7b10]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at 
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:302)
at java.lang.Thread.run(Thread.java:619)

Thread-6 daemon prio=10 tid=0x2aaaf89d6800 nid=0x66a2 waiting on 
condition [0x40dc9000..0x40dc9c90]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at 
oracle.jdbc.pool.OracleImplicitConnectionCacheThread.run(OracleImplicitConnectionCacheThread.java:87)

Timer-2 prio=10 tid=0x50b72800 nid=0x6697 in Object.wait() 
[0x4096f000..0x4096fd10]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on 0x2aaab3e20cf0 (a 

Re: http-tomcat - AJP ilink receive failed - 500/503 errors

2010-12-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Shantanu,

On 12/15/2010 5:45 PM, Shantanu Pavgi wrote:
 There was a firewall between two systems (distinct from CentOS
 iptables), which dropped (idle) connections after some time. Not sure
 about exact firewall config here. The Apache web server would throw
 an 500/503 error when it tried to reuse an open connection which
 firewall had already closed.  The issue was resolved by using
 disablereuse parameter in ProxyPass directive.
 http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass

mod_jk (and therefore AJP) supports a ping operation in order to keep
the channels open but validate them (and re-connect if necessary) before
using them. You might want to look for those options in mod_proxy_ajp to
improve performance.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0Kbn4ACgkQ9CaO5/Lv0PBZGACfVg8rodAPEAn7bhqm3OGJrifC
SrkAoIeWVDqZ+3Q0i4g8hcJ/10HXLrxY
=9H2n
-END PGP SIGNATURE-

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



Re: [OT] JVM http.proxyHost param is not activated

2010-12-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Noriyo,

On 12/15/2010 2:38 PM, Noriyo Koyama wrote:
 Can you confirm that the JVM is reading them properly and using the
 values you expect?

 System.getProperty(http.proxyHost); could return the expected value.
 So I think the JVM has its value set.

Okay, does proxy-out resolve to anything on your server?

 What code are you using to access the external network?
 Using HttpClient and there is no programatic logic to use the proxy.

Google has a pretty good answer for httpclient proxy:

http://softwarecarnival.blogspot.com/2008/03/apache-http-client-and-proxy-settings.html

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0KbZAACgkQ9CaO5/Lv0PA5MQCgk3g5OBkFxI4vph/DyL5pYWcT
CQAAmwXV0Q5iBoV2QRYAsoD6ZaH88bR3
=LDix
-END PGP SIGNATURE-

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



Re: Where does my stderr go?

2010-12-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thomas,

On 12/16/2010 2:52 AM, Thomas Kloeber wrote:
 thanx for your helpful answer. Believe me, before I post on a mailing
 list or forum I spent a long time trying to fix my problems.
 In this case I ran out of ideas, so I was hoping I would find some
 expertise on this mailing list...
 
 I tried your suggestion and guess what, it didn't make any difference.

Care to be specific? We can't tell what you did, or what happened when
you did it. All we know is that you did something and it didn't change
anything from the previous behavior (which you didn't really describe,
either).

How about posting your entire configuration, then the contents of all
the logs that are generated when you start Tomcat fresh (and delete the
log files, just for good measure). Then maybe we can start figuring out
what's going on.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0Kb4kACgkQ9CaO5/Lv0PAJnwCgjNl48apmoSCxH8l8LUdVB5Ou
eg0An2mGeQ59s/rawggBLjwWdt7Qx/mQ
=cwFR
-END PGP SIGNATURE-

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



Re: Tomcat Bug: JSP not found?

2010-12-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jess,

On 12/16/2010 11:56 AM, Jess Holle wrote:
 The JSP has not been deleted and a stack trace is logged like:
 
 org.apache.jasper.JasperException: Le fichier /xxx/yyy/zzz.jsp n'a pas
 été trouvé
 at
 org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
 
 at
 org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
 
 at
 org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
 
 at org.apache.jasper.compiler.JspUtil.getInputStream(JspUtil.java:849)
 at org.apache.jasper.compiler.JspUtil.getReader(JspUtil.java:1084)
 at
 org.apache.jasper.compiler.ParserController.doParse(ParserController.java:250)
 
 at
 org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:120)
 
 at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:165)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
 at
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
 
 at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
 
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 
 This particular example occurred on a system running in a French locale,
 but translates into The file ___ was not found.
 
 Why a JSP that has already been compiled is being recompiled is another
 question I have...

What environment is this webapp in? Any network fileshares or anything
like that? Does this happen any time related to daylight saving time? We
had someone report recently that, in their environment, DST changeovers
result in seriously crazy behavior at the OS level which really confuses
Tomcat when timestamps are concerned.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0KcyUACgkQ9CaO5/Lv0PChdQCaAzkc1lJEbRrTZmEpLzYJmU9N
LAoAn2QaaEqFu96X6U/hK1Q7UfXCHO0d
=5/6I
-END PGP SIGNATURE-

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



how/where to put the application patch on tomcat ?

2010-12-16 Thread Fang Zhu





Does anyone has a idea --
 
how/where to put appPatch.jar to the tomcat, so tomcat can load this 
appPatch.jar first,
before those jars under /WEB-INF/lib/*.jar ?
 
according to the document, we can specify the -Xbootclasspath/p appPatch.jar, 
but 
I have no idea how to make it work.
 
Any help will highly appreicated!
 
We start the tomcat this way:
 
$JAVA_HOME/bin/java -Xms16m -Xmx32m 
-Djava.endorsed.dirs=/opt/apache-tomcat-5.5.26/common/endorsed 
-Duser.dir=/opt/apache-tomcat-5.5.26/servers/sandiego-dev1 -classpath 
/opt/apache-tomcat-5.5.26/bin/bootstrap.jar:/opt/apache-tomcat-5.5.26/bin/commons-logging-api.jar
 -Dcatalina.base=/opt/apache-tomcat-5.5.26/servers/sandiego-dev1 
-Dcatalina.home=/opt/apache-tomcat-5.5.26 
-Djava.io.tmpdir=/opt/apache-tomcat-5.5.26/temp 
org.apache.catalina.startup.Bootstrap start
  

Re: how/where to put the application patch on tomcat ?

2010-12-16 Thread André Warnier

Fang Zhu wrote:





Does anyone has a idea --
 
how/where to put appPatch.jar to the tomcat, so tomcat can load this appPatch.jar first,

before those jars under /WEB-INF/lib/*.jar ?
 
according to the document, we can specify the -Xbootclasspath/p appPatch.jar, but 
I have no idea how to make it work.
 
Any help will highly appreicated!
 
We start the tomcat this way:
 
$JAVA_HOME/bin/java -Xms16m -Xmx32m -Djava.endorsed.dirs=/opt/apache-tomcat-5.5.26/common/endorsed -Duser.dir=/opt/apache-tomcat-5.5.26/servers/sandiego-dev1 -classpath /opt/apache-tomcat-5.5.26/bin/bootstrap.jar:/opt/apache-tomcat-5.5.26/bin/commons-logging-api.jar -Dcatalina.base=/opt/apache-tomcat-5.5.26/servers/sandiego-dev1 -Dcatalina.home=/opt/apache-tomcat-5.5.26 -Djava.io.tmpdir=/opt/apache-tomcat-5.5.26/temp org.apache.catalina.startup.Bootstrap start
 		 	   		  


It may be good to mention /why/ you want to have it loaded first.

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



Re: how/where to put the application patch on tomcat ?

2010-12-16 Thread Saurabh Makol
Put  it in the lib folder of tomcat directory.

On Thu, Dec 16, 2010 at 2:11 PM, Fang Zhu zhufan...@hotmail.com wrote:






 Does anyone has a idea --

 how/where to put appPatch.jar to the tomcat, so tomcat can load this
 appPatch.jar first,
 before those jars under /WEB-INF/lib/*.jar ?

 according to the document, we can specify the -Xbootclasspath/p
 appPatch.jar, but
 I have no idea how to make it work.

 Any help will highly appreicated!

 We start the tomcat this way:

 $JAVA_HOME/bin/java -Xms16m -Xmx32m
 -Djava.endorsed.dirs=/opt/apache-tomcat-5.5.26/common/endorsed
 -Duser.dir=/opt/apache-tomcat-5.5.26/servers/sandiego-dev1 -classpath
 /opt/apache-tomcat-5.5.26/bin/bootstrap.jar:/opt/apache-tomcat-5.5.26/bin/commons-logging-api.jar
 -Dcatalina.base=/opt/apache-tomcat-5.5.26/servers/sandiego-dev1
 -Dcatalina.home=/opt/apache-tomcat-5.5.26
 -Djava.io.tmpdir=/opt/apache-tomcat-5.5.26/temp
 org.apache.catalina.startup.Bootstrap start



Re: [OT] JVM http.proxyHost param is not activated

2010-12-16 Thread Noriyo Koyama
Thanks Chris,

Yes , I also googled and see some post like that describes to use the
proxy with programmatic code.
And with the test code such as below could work in my environment
without problem. But question is why it used to work without
programmatic code but with JVM param. This probably more relates to
the JVM spec. so I'll investigate bit further and share this if I find
something. Thanks a lot for the clues.

--snippet
/*
 * This is to use the proxy setting.
 */
private static final String proxyHost = System.getProperty(proxyHost);
//proxy port number
private static final String proxyPort = System.getProperty(proxyPort);
private static int proxyPortNumber = -1;
static{
if(proxyHost!=null  proxyPort !=null){

try{
proxyPortNumber = Integer.valueOf(proxyPort);
// Using proxy access
LogService.logInfo(RSSParserImpl.class, Using 
proxy |
proxyHost:+proxyHost +   proxyPort:+proxyPort);
}catch (NumberFormatException ex){
LogService.logError(RSSParserImpl.class, proxy 
port number should
be numeric:  , ex);
}
}

}

--
//Using proxy access to retrieve the contents
if(proxyHost!=null  proxyPortNumber  -1){
client.getHostConfiguration().setProxy(proxyHost,proxyPortNumber);
}
--

- Nori

On Thu, Dec 16, 2010 at 8:50 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Noriyo,

 On 12/15/2010 2:38 PM, Noriyo Koyama wrote:
 Can you confirm that the JVM is reading them properly and using the
 values you expect?

 System.getProperty(http.proxyHost); could return the expected value.
 So I think the JVM has its value set.

 Okay, does proxy-out resolve to anything on your server?

 What code are you using to access the external network?
 Using HttpClient and there is no programatic logic to use the proxy.

 Google has a pretty good answer for httpclient proxy:

 http://softwarecarnival.blogspot.com/2008/03/apache-http-client-and-proxy-settings.html

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk0KbZAACgkQ9CaO5/Lv0PA5MQCgk3g5OBkFxI4vph/DyL5pYWcT
 CQAAmwXV0Q5iBoV2QRYAsoD6ZaH88bR3
 =LDix
 -END PGP SIGNATURE-

 -
 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: how/where to put the application patch on tomcat ?

2010-12-16 Thread Mark Thomas
On 16/12/2010 22:47, Saurabh Makol wrote:
 Put  it in the lib folder of tomcat directory.

Nope. Wrong.

Mark

 
 On Thu, Dec 16, 2010 at 2:11 PM, Fang Zhu zhufan...@hotmail.com wrote:
 





 Does anyone has a idea --

 how/where to put appPatch.jar to the tomcat, so tomcat can load this
 appPatch.jar first,
 before those jars under /WEB-INF/lib/*.jar ?

 according to the document, we can specify the -Xbootclasspath/p
 appPatch.jar, but
 I have no idea how to make it work.

 Any help will highly appreicated!

 We start the tomcat this way:

 $JAVA_HOME/bin/java -Xms16m -Xmx32m
 -Djava.endorsed.dirs=/opt/apache-tomcat-5.5.26/common/endorsed
 -Duser.dir=/opt/apache-tomcat-5.5.26/servers/sandiego-dev1 -classpath
 /opt/apache-tomcat-5.5.26/bin/bootstrap.jar:/opt/apache-tomcat-5.5.26/bin/commons-logging-api.jar
 -Dcatalina.base=/opt/apache-tomcat-5.5.26/servers/sandiego-dev1
 -Dcatalina.home=/opt/apache-tomcat-5.5.26
 -Djava.io.tmpdir=/opt/apache-tomcat-5.5.26/temp
 org.apache.catalina.startup.Bootstrap start

 


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



RE: how/where to put the application patch on tomcat ?

2010-12-16 Thread Caldarale, Charles R
 From: Fang Zhu [mailto:zhufan...@hotmail.com] 
 Subject: how/where to put the application patch on tomcat ?

 how/where to put appPatch.jar to the tomcat, so tomcat 
 can load this appPatch.jar first, before those jars under
 /WEB-INF/lib/*.jar ?

If this is a patch to the application classes, why not just replace the classes 
in the original jar with the new ones?  Why do you want to do things the hard 
way?

 according to the document, we can specify the 
 -Xbootclasspath/p appPatch.jar

Unless you're modifying the JRE itself, don't ever, ever do that.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


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



Authentication and roles (RFE)

2010-12-16 Thread Steve Mitchell
I would like my Tomcat instance to authenticate different roles differently.  
E.g., admins must use SSL client auth, while regular users use HTTP basic 
authentication over SSL.  This seems like a routine requirement, but it's 
unsupported in Tomcat 6 (or 7).

I have a workaround -- use an Apache reverse proxy for authentication.  The 
disadvantages are that Tomcat roles are unavailable, and admin users and 
regular users connect to the same resource with different URLs.  

The ideal solution would be to use SSL with selectable client authentication.  
In this mode, HTTP basic authentication would be skipped if the client had 
already presented a valid SSL client certificate.  Can Tomcat be made to do 
this?

  --Steve



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



Re: Authentication and roles (RFE)

2010-12-16 Thread Pid *
On 17 Dec 2010, at 00:37, Steve Mitchell mitch...@intertrust.com wrote:

 I would like my Tomcat instance to authenticate different roles differently.  
 E.g., admins must use SSL client auth, while regular users use HTTP basic 
 authentication over SSL.  This seems like a routine requirement, but it's 
 unsupported in Tomcat 6 (or 7).

Look at the MultiRealm in the docs/svn.


p


 I have a workaround -- use an Apache reverse proxy for authentication.  The 
 disadvantages are that Tomcat roles are unavailable, and admin users and 
 regular users connect to the same resource with different URLs.

 The ideal solution would be to use SSL with selectable client authentication. 
  In this mode, HTTP basic authentication would be skipped if the client had 
 already presented a valid SSL client certificate.  Can Tomcat be made to do 
 this?

  --Steve



 -
 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: Where does my stderr go?

2010-12-16 Thread Thomas Kloeber
hmmm, I'm not sure if the attachment of my last post got through. How 
can I post files on the list?


I just got the following message:

nad...@zycus.com wrote on 17.12.2010 08:36:

.


The scanned document was QUARANTINED.


Violation Information:
The filename extension of attachment logs.zip violated the content
filtering rule zip files blocked.


--
Intelligent Communication Software Vertriebs GmbH
Firmensitz: Kistlerhof Str. 111, 81379 München
Registergericht: Amtsgericht München, HRB 88283
Geschäftsführer: Albert Fuss



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