Re: Aid: Tomcat/Apache redirect (or forwarding).

2008-12-19 Thread TiredMan



Hassan Schroeder-2 wrote:
 
 On Tue, Dec 16, 2008 at 9:59 AM, TiredMan soulscaven...@gmail.com wrote:
 
 The page cannot be found message in IE when i go to
 http://webdomain.com
 
 You would be better off using Firefox with the Web Developer and
 Firebug plugins to get better error messages, but...
 
 As for httpd logs, i not sure they are configured, because i just have
 next
 files in logs dir:
 
 Should i enable it somehow?
 
 ? Logs appear to be enabled -- what do you find in them?
 
 And again, does your configuration check pass?
 
 -- 
 Hassan Schroeder  hassan.schroe...@gmail.com
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

Hassan, i just want to say THANK YOU a lot your invaluable help! I done with
it and my finish config for http so:
VirtualHost *:80
ProxyPreserveHost On
ProxyPass / http://localdomain.com:3001/
ProxyPassReverse / http://localdomain.com:3001/
ServerName webdomain.com
/VirtualHost *:80

IT JUST WORKS.

and another virt.host for reverse proxy with SSL:
VirtualHost *:443
SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile conf/ssl/mycert.cert
SSLCertificateKeyFile conf/ssl/mykey.key
SSLProxyEngine On
ProxyPreserveHost On
ProxyPass / https://localdomain.com/
ProxyPassReverse / https://localdomain.com/
ServerName webdomain.com
/VirtualHost

Thank you a million and I wish you good luck in all your deeds. 
-- 
View this message in context: 
http://www.nabble.com/Aid%3A-Tomcat-Apache-redirect-%28or-forwarding%29.-tp21031384p21088154.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Installation apache tomcat

2008-12-19 Thread Peter Crowther
 From: Vida Luz Arista [mailto:vida.ari...@ideay.net.ni]
 I downloaded the version apache-tomcat-6.0.18-src, I follow
 step by step the
 instructions, when I executed ant download, the following erro occur



 BUILD FAILED

 /opt/apache-tomcat-6.0.18-src/build.xml:701: The following
 error occurred
 while executing this line:

 /opt/apache-tomcat-6.0.18-src/build.xml:771: Compile failed; see the
 compiler error output for details.

OK... so what does the compiler error output say?

Taking a step back, why are you compiling from source rather than downloading a 
binary?  Tomcat is pure Java, so provided you're running a decent Java virtual 
machine (the Sun one - *don't* use gcj to run Tomcat) the binary should work on 
your platform.

- Peter

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



Re: Problem with security permissions and access denied page for ldap users

2008-12-19 Thread an...@iguanait.com
Any suggestions about my problem?


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



Re: [SECURITY] CVE-2008-2938 - Apache Tomcat information disclosure vulnerability - Update 2

2008-12-19 Thread Mark Thomas
Gregor Schneider wrote:
 Hi Mark,
 
 that means, if I haven't set
 
 URIEncoding and useBodyEncodingForURI within my connectors at all,
 I'm well off since the defaults are ISO-8859-1 and false, correct?

Correct. With those settings you have nothing to worry about (for this
vulnerability anyway ;)

Mark



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



how to invalidate old sessions when new user access appl on same machine

2008-12-19 Thread Vishnu Vardhana Reddy

hi all,

I am using Mozilla browser to access my web application.User one access my
application using his credentials .but i left that browser open.after that I
am opening the another Mozilla window and accessing my application using
different credentials ex:user2 credentials .user 2 also can access my
application.but when i open the first browser ..am automatically getting
second user session.how can we avoid this problem.

Application is using session identifier(jSessionID) as the URL parameter for
session management.

is it possible to invalidate the old session when new user access on same
machine.

thanks,
Vishnu 
-- 
View this message in context: 
http://www.nabble.com/how-to-invalidate-old-sessions-when-new-user-access-appl-on-same-machine-tp21090090p21090090.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Optimized memory Parameter in Tomcat.

2008-12-19 Thread kashif_tomcat

Hi All,

Hope all are fine and enjoying best of health... thats good to know :D

Here is my question.

our Tomcat 6 server is running on a RHL machine with 4 GB Ram. 

i have adjusted memory parameters as 

JAVA_OPTS=$JAVA_OPTS -Xms1024M -Xmx2048M -XX:PermSize=128m
-XX:MaxPermSize=128m

server is working fine with these parameters but i wnt to know that are
these parameters fine with my application or i need to change them for
better performance?

my server is running a Spring Framework mvc based application. 

with these parameters most of time i get following stats when i execute free
-m command on server in peak hours (or something like that).

[r...@vopium ~]# free -m
 total   used   free sharedbuffers cached
Mem:  4050   3622428  0385   2335


NOTE: only apache and tomcat is running on this machine. no other heavy
service running on this server.

Regards,
newbi
-- 
View this message in context: 
http://www.nabble.com/Optimized-memory-Parameter-in-Tomcat.-tp21090101p21090101.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: how to invalidate old sessions when new user access appl on same machine

2008-12-19 Thread André Warnier

Vishnu Vardhana Reddy wrote:

hi all,

I am using Mozilla browser to access my web application.User one access my
application using his credentials .but i left that browser open.after that I
am opening the another Mozilla window and accessing my application using
different credentials ex:user2 credentials .user 2 also can access my
application.but when i open the first browser ..am automatically getting
second user session.how can we avoid this problem.

Well, user1 should not leave his window open when he goes off to drink a 
coffee.  That's basic security.  After all, you do not leave your 
bank-card in the cash machine for the next user, or do you ?




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



Re: how to invalidate old sessions when new user access appl on same machine

2008-12-19 Thread Vishnu Vardhana Reddy

well .that true but we cant say it to customer ..they do how they like .but
we have to restrict it ..
thats is i want ..if user forgot to logout ..that case ..

awarnier wrote:
 
 Vishnu Vardhana Reddy wrote:
 hi all,
 
 I am using Mozilla browser to access my web application.User one access
 my
 application using his credentials .but i left that browser open.after
 that I
 am opening the another Mozilla window and accessing my application using
 different credentials ex:user2 credentials .user 2 also can access my
 application.but when i open the first browser ..am automatically getting
 second user session.how can we avoid this problem.
 
 Well, user1 should not leave his window open when he goes off to drink a 
 coffee.  That's basic security.  After all, you do not leave your 
 bank-card in the cash machine for the next user, or do you ?
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/how-to-invalidate-old-sessions-when-new-user-access-appl-on-same-machine-tp21090090p21090313.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Optimized memory Parameter in Tomcat.

2008-12-19 Thread Ronald Klop

This totally depends on what your application does.
So nobody on this list can say something about it based the information you 
give.

2GB is quite a lot of memory, so I think your application has plenty of memory 
unless it is a very memory hungry program.
On 32 bits machines 2GB is a maximum amount per process for java code + native 
code, so  giving java 2GB leaves no room for native code and makes your java 
crash with out-of-memory if the application uses a lot of memory for java 
objects. On 64 bits machines this limit is a lot higher than 2GB.

You can also use jstat to few the realtime memory usage of your jvm.
jps gives the process-id's of the java processes
jstat -gc process-id 1000
gives the memory usage every 1000 miliseconds. See the documentation for more 
info about jstat.

Greetings,

Ronald.


Op vrijdag, 19 december 2008 om 12:55 uur schreef Tomcat Users List 
users@tomcat.apache.org:


 


Hi All,

Hope all are fine and enjoying best of health... thats good to know :D

Here is my question.

our Tomcat 6 server is running on a RHL machine with 4 GB Ram. 

i have adjusted memory parameters as 


JAVA_OPTS=$JAVA_OPTS -Xms1024M -Xmx2048M -XX:PermSize=128m
-XX:MaxPermSize=128m

server is working fine with these parameters but i wnt to know that are
these parameters fine with my application or i need to change them for
better performance?

my server is running a Spring Framework mvc based application. 


with these parameters most of time i get following stats when i execute free
-m command on server in peak hours (or something like that).

[r...@vopium ~]# free -m
 total   used   free sharedbuffers cached
Mem:  4050   3622428  0385   2335


NOTE: only apache and tomcat is running on this machine. no other heavy
service running on this server.

Regards,
newbi
--
View this message in context: 
http://www.nabble.com/Optimized-memory-Parameter-in-Tomcat.-tp21090101p21090101.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

 








RE: Optimized memory Parameter in Tomcat.

2008-12-19 Thread Peter Crowther
 From: kashif_tomcat [mailto:kas...@vopium.com]
 our Tomcat 6 server is running on a RHL machine with 4 GB Ram.

32-bit or 64-bit OS?

 JAVA_OPTS=$JAVA_OPTS -Xms1024M -Xmx2048M -XX:PermSize=128m
 -XX:MaxPermSize=128m

You probably want to make -Xms and -Xmx the same.  There's no point fragmenting 
the heap if you don't need to.

 server is working fine with these parameters but i wnt to
 know that are
 these parameters fine with my application or i need to change them for
 better performance?

You are the only person who can answer that question, by monitoring and 
profiling your application.  Performance is often 1% Tomcat and 99% application.

 with these parameters most of time i get following stats when
 i execute free
 -m command on server in peak hours (or something like that).

 [r...@vopium ~]# free -m
  total   used   free shared
 buffers cached
 Mem:  4050   3622428  0
 385   2335

Looks healthy enough.

 NOTE: only apache and tomcat is running on this machine. no
 other heavy service running on this server.

Why are you running Apache httpd as well as Tomcat?  Because the book told me 
to or because you have a real need for it?

- Peter

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



RE: how to invalidate old sessions when new user access appl on same machine

2008-12-19 Thread Nicolas Romantzoff
Thats a problem in your server code...

Session is binded to a connection (browser session) basically, not a
machine.
If you open a second browser (or a second tab) you should get a different
session-id.
Don't use JSESSIONID in url parameters, but in session cookie (unless you
need to cross protocols like http - https)

For security, you will have to bind an 'ending' date to the session's
authentication.


Nicolas Romantzoff
General Manager
Tél.: (+33) 478 53 65 17 


-Original Message-
From: Vishnu Vardhana Reddy [mailto:vishnu...@gmail.com]
Sent: Friday, 19 December, 2008 12:55
To: users@tomcat.apache.org
Subject: how to invalidate old sessions when new user access appl on same
machine


hi all,

I am using Mozilla browser to access my web application.User one access my
application using his credentials .but i left that browser open.after that I
am opening the another Mozilla window and accessing my application using
different credentials ex:user2 credentials .user 2 also can access my
application.but when i open the first browser ..am automatically getting
second user session.how can we avoid this problem.

Application is using session identifier(jSessionID) as the URL parameter for
session management.

is it possible to invalidate the old session when new user access on same
machine.

thanks,
Vishnu
--
View this message in context:
http://www.nabble.com/how-to-invalidate-old-sessions-when-new-user-access-ap
pl-on-same-machine-tp21090090p21090090.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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




  _  

avast! Antivirus http://www.avast.com : Outbound message clean. 


Virus Database (VPS): 081218-0, 2008-12-18
Tested on: 2008-12-19 13:54:20
avast! - copyright (c) 1988-2008 ALWIL Software.




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



Re: how to invalidate old sessions when new user access appl on same machine

2008-12-19 Thread Ingmar Lötzsch
Hello,

you can use the Sevlet API. First call invalidate() on the actual
HttpSession instance and then getSession(true) on the request object
(HttpServletRequest) to start a new session.

Nicolas Romantzoff schrieb:
 Thats a problem in your server code...
 
 Session is binded to a connection (browser session) basically, not a
 machine.
 If you open a second browser (or a second tab) you should get a different
 session-id.

That's dependent on the browser and maybe the user settings. I'am using
Firefox and I'am happy, that Firefox uses the same session in all
windows for the same host.

 Don't use JSESSIONID in url parameters, but in session cookie (unless you
 need to cross protocols like http - https)

Shouldn't this be transparent to the developper?

 For security, you will have to bind an 'ending' date to the session's
 authentication.

Isn't the session timeout enough?

 Nicolas Romantzoff
 General Manager
 Tél.: (+33) 478 53 65 17 
 
 
 -Original Message-
 From: Vishnu Vardhana Reddy [mailto:vishnu...@gmail.com]
 Sent: Friday, 19 December, 2008 12:55
 To: users@tomcat.apache.org
 Subject: how to invalidate old sessions when new user access appl on same
 machine
 
 
 hi all,
 
 I am using Mozilla browser to access my web application.User one access my
 application using his credentials .but i left that browser open.after that I
 am opening the another Mozilla window and accessing my application using
 different credentials ex:user2 credentials .user 2 also can access my
 application.but when i open the first browser ..am automatically getting
 second user session.how can we avoid this problem.
 
 Application is using session identifier(jSessionID) as the URL parameter for
 session management.
 
 is it possible to invalidate the old session when new user access on same
 machine.
 
 thanks,
 Vishnu
 --
 View this message in context:
 http://www.nabble.com/how-to-invalidate-old-sessions-when-new-user-access-ap
 pl-on-same-machine-tp21090090p21090090.html
 Sent from the Tomcat - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
   _  
 
 avast! Antivirus http://www.avast.com : Outbound message clean. 
 
 
 Virus Database (VPS): 081218-0, 2008-12-18
 Tested on: 2008-12-19 13:54:20
 avast! - copyright (c) 1988-2008 ALWIL Software.
 
 
 
 
 -
 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 to invalidate old sessions when new user access appl on same machine

2008-12-19 Thread Mikolaj Rydzewski

André Warnier wrote:
Well, user1 should not leave his window open when he goes off to drink 
a coffee.

Unless he locks workstation when not in use.
No, not in the closet, e.g. with password protected screensaver ;-)

--
Mikolaj Rydzewski m...@ceti.pl


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



RE: Optimized memory Parameter in Tomcat.

2008-12-19 Thread kashif_tomcat

Peter,

System is 32 bit.

i want to change memory parameters. what i feel is that 1GB(min) and
2GB(max) is very high value. but i can't test it by hit and try coz its
our production server. i have used 5 times heavier application then this one
with 200mb (min) and 3.5G( maxm) parameters and it worked fine. therefore i
feel that i should fine tune these parameters...(low parameter value with
good result)

i am using apache coz front end is hosted in apache.

but i think i should use j consol or jstat like something...


Peter Crowther wrote:
 
 From: kashif_tomcat [mailto:kas...@vopium.com]
 our Tomcat 6 server is running on a RHL machine with 4 GB Ram.
 
 32-bit or 64-bit OS?
 
 JAVA_OPTS=$JAVA_OPTS -Xms1024M -Xmx2048M -XX:PermSize=128m
 -XX:MaxPermSize=128m
 
 You probably want to make -Xms and -Xmx the same.  There's no point
 fragmenting the heap if you don't need to.
 
 server is working fine with these parameters but i wnt to
 know that are
 these parameters fine with my application or i need to change them for
 better performance?
 
 You are the only person who can answer that question, by monitoring and
 profiling your application.  Performance is often 1% Tomcat and 99%
 application.
 
 with these parameters most of time i get following stats when
 i execute free
 -m command on server in peak hours (or something like that).

 [r...@vopium ~]# free -m
  total   used   free shared
 buffers cached
 Mem:  4050   3622428  0
 385   2335
 
 Looks healthy enough.
 
 NOTE: only apache and tomcat is running on this machine. no
 other heavy service running on this server.
 
 Why are you running Apache httpd as well as Tomcat?  Because the book
 told me to or because you have a real need for it?
 
 - Peter
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Optimized-memory-Parameter-in-Tomcat.-tp21090101p21091798.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Optimized memory Parameter in Tomcat.

2008-12-19 Thread kashif_tomcat

Peter,

System is 32 bit.

i want to change memory parameters. what i feel is that 1GB(min) and
2GB(max) is very high value. but i can't test it by hit and try coz its
our production server. i have used 5 times heavier application then this one
with 200mb (min) and 3.5G( maxm) parameters and it worked fine. therefore i
feel that i should fine tune these parameters...(low parameter value with
good result)

i am using apache coz front end is hosted in apache.

but i think i should use j consol or jstat like something...


Peter Crowther wrote:
 
 From: kashif_tomcat [mailto:kas...@vopium.com]
 our Tomcat 6 server is running on a RHL machine with 4 GB Ram.
 
 32-bit or 64-bit OS?
 
 JAVA_OPTS=$JAVA_OPTS -Xms1024M -Xmx2048M -XX:PermSize=128m
 -XX:MaxPermSize=128m
 
 You probably want to make -Xms and -Xmx the same.  There's no point
 fragmenting the heap if you don't need to.
 
 server is working fine with these parameters but i wnt to
 know that are
 these parameters fine with my application or i need to change them for
 better performance?
 
 You are the only person who can answer that question, by monitoring and
 profiling your application.  Performance is often 1% Tomcat and 99%
 application.
 
 with these parameters most of time i get following stats when
 i execute free
 -m command on server in peak hours (or something like that).

 [r...@localhost ~]# free -m
  total   used   free shared
 buffers cached
 Mem:  4050   3622428  0
 385   2335
 
 Looks healthy enough.
 
 NOTE: only apache and tomcat is running on this machine. no
 other heavy service running on this server.
 
 Why are you running Apache httpd as well as Tomcat?  Because the book
 told me to or because you have a real need for it?
 
 - Peter
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Optimized-memory-Parameter-in-Tomcat.-tp21090101p21091800.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



java.lang.NoClassDefFoundError: org.apache.catalina.mbeans.ServerLifecycleListener

2008-12-19 Thread Ole Ersoy

Hi,

I'm attempting to install Tomcat 6.0.18 on Linux.  Right now I'm getting this:

19-Dec-08 2:39:58 PM org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw error
java.lang.NoClassDefFoundError: 
org.apache.catalina.mbeans.ServerLifecycleListener
  at java.lang.Class.initializeClass(libgcj.so.9)
  at java.lang.Class.newInstance(libgcj.so.9)
  at 
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:206)
  at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
  at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)
  at gnu.xml.stream.SAXParser.parse(libgcj.so.9)
  at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)
  at org.apache.catalina.startup.Catalina.load(Catalina.java:516)
  at java.lang.reflect.Method.invoke(libgcj.so.9)
  at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
  at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:275)
  at java.lang.reflect.Method.invoke(libgcj.so.9)
  at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
Caused by: java.lang.ClassNotFoundException: 
javax.management.modelmbean.ModelMBeanNotificationBroadcaster not found in 
org.apache.catalina.loader.StandardClassLoader{urls=[file:/var/lib/tomcat/common/tomcat-i18n-fr.jar,file:/var/lib/tomcat/common/jsp-api.jar,file:/var/lib/tomcat/common/catalina-ant.jar,file:/var/lib/tomcat/common/tomcat-dbcp.jar,file:/var/lib/tomcat/common/annotations-api.jar,file:/var/lib/tomcat/common/tomcat-i18n-ja.jar,file:/var/lib/tomcat/common/jasper-el.jar,file:/var/lib/tomcat/common/tomcat-i18n-es.jar,file:/var/lib/tomcat/common/el-api.jar,file:/var/lib/tomcat/common/catalina-ha.jar,file:/var/lib/tomcat/common/catalina-tribes.jar,file:/var/lib/tomcat/common/servlet-api.jar,file:/var/lib/tomcat/common/jasper-jdt.jar,file:/var/lib/tomcat/common/tomcat-coyote.jar,file:/var/lib/tomcat/common/jasper.jar,file:/var/lib/tomcat/common/catalina.jar],
 
parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/lib/jvm/java/lib/tools.jar,file:/usr/share/tomcat/bin/
commons-daemon.jar,file:/usr/share/tomcat/bin/bootstrap.jar], 
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}

Looking at the above it seems like the class loader knows where all the 
libraries are.  And they really are there:

[r...@ole conf]# ls -la /var/lib/tomcat/common
total 4764
drwxr-xr-x 2 root root  4096 2008-12-19 12:37 .
drwxr-xr-x 4 root root  4096 2008-12-19 12:37 ..
-rw-r--r-- 1 root tomcat   10797 2008-12-19 12:36 annotations-api.jar
-rw-r--r-- 1 root tomcat   49175 2008-12-19 12:36 catalina-ant.jar
-rw-r--r-- 1 root tomcat  122848 2008-12-19 12:36 catalina-ha.jar
-rw-r--r-- 1 root tomcat 1127397 2008-12-19 12:37 catalina.jar
-rw-r--r-- 1 root tomcat  228193 2008-12-19 12:36 catalina-tribes.jar
-rw-r--r-- 1 root tomcat   27671 2008-12-19 12:36 el-api.jar
-rw-r--r-- 1 root tomcat  102174 2008-12-19 12:36 jasper-el.jar
-rw-r--r-- 1 root tomcat  510002 2008-12-19 12:37 jasper.jar
-rw-r--r-- 1 root tomcat 1385552 2008-12-19 12:36 jasper-jdt.jar
-rw-r--r-- 1 root tomcat   72089 2008-12-19 12:36 jsp-api.jar
-rw-r--r-- 1 root tomcat   83556 2008-12-19 12:36 servlet-api.jar
-rw-r--r-- 1 root tomcat  741071 2008-12-19 12:36 tomcat-coyote.jar
-rw-r--r-- 1 root tomcat  197325 2008-12-19 12:36 tomcat-dbcp.jar
-rw-r--r-- 1 root tomcat   45634 2008-12-19 12:36 tomcat-i18n-es.jar
-rw-r--r-- 1 root tomcat   42659 2008-12-19 12:36 tomcat-i18n-fr.jar
-rw-r--r-- 1 root tomcat   48579 2008-12-19 12:36 tomcat-i18n-ja.jar

Any ideas on what could be causing the exception?  I start tomcat with jsvc 
like so:

export LD_LIBRARY_PATH=/usr/local/apr/lib:
CATALINA_HOME=/usr/share/tomcat
JAVA_HOME=/usr/lib/jvm/java
DAEMON_LAUNCHER=$CATALINA_HOME/bin/jsvc
TOMCAT_USER=tomcat
TMP_DIR=/var/cache/tomcat/temp
CATALINA_OPTS=
CLASSPATH=$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/bin/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar

case $1 in
 start)
   #
   # Start Tomcat
   #
if [ -e /var/run/jsvc.pid ]
then
   echo Tomcat is running already
else
   echo -n Starting tomcat
   echo
   $DAEMON_LAUNCHER \
   -user $TOMCAT_USER \
   -home $JAVA_HOME \
   -Dcatalina.home=$CATALINA_HOME \
   -Djava.io.tmpdir=$TMP_DIR \
   -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
   -Djava.util.logging.config.file=$CATALINA_HOME/conf/logging.properties \
   -outfile /var/log/tomcat/catalina.out \
   -errfile '1' \
   $CATALINA_OPTS \
   -cp $CLASSPATH \
   org.apache.catalina.startup.Bootstrap
   touch /var/lock/subsys/apache-tomcat
   #
   # To get a verbose JVM
   #-verbose # To get a debug of jsvc.
   #-debug
fi
   ;;

My java version is this:

java version 1.6.0_0
IcedTea6 1.4 (fedora-7.b12.fc10-i386) Runtime Environment (build 1.6.0_0-b12)
OpenJDK Client VM (build 10.0-b19, mixed mode)

TIA,
- Ole

-
To unsubscribe, e-mail: 

RE: java.lang.NoClassDefFoundError: org.apache.catalina.mbeans.ServerLifecycleListener

2008-12-19 Thread Caldarale, Charles R
 From: Ole Ersoy [mailto:ole.er...@gmail.com]
 Subject: java.lang.NoClassDefFoundError:
 org.apache.catalina.mbeans.ServerLifecycleListener

 19-Dec-08 2:39:58 PM org.apache.tomcat.util.digester.Digester
 startElement
 SEVERE: Begin event threw error
 java.lang.NoClassDefFoundError:
 org.apache.catalina.mbeans.ServerLifecycleListener
at java.lang.Class.initializeClass(libgcj.so.9)
at java.lang.Class.newInstance(libgcj.so.9)

Use a real JVM (Sun, IBM, BEA); gcj is not suitable for serious applications, 
such as Tomcat.  Repost if you still have errors.

 - 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



HelloWorld servlet, or just about

2008-12-19 Thread André Warnier

Dear experts,

I love Tomcat, and I find all the people on this list kind, helpful, in 
short marvelous.


I have dabbled in servlet filters before, but I never wrote an actual 
servlet.  And now I need to write the tiniest of one.


It just needs to return, as plain text, not Hello World, but the 
result of request.getUserPrincipal.getName().

That's it.

Would anyone be as kind as to point me to a clean nice example, such 
that I could just replace Hello World by the above ?


Better yet (but I don't want to abuse your patience), just paste the 
code right here below :


(space intentionally left blank)









Thanks very much.
Angelica C.
Computer student
Italy
(well, close)

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



Re: HelloWorld servlet, or just about

2008-12-19 Thread Ken Bowen

Of course, Google is your friend:
 Results 1 - 10 of about 237,000 for hello world servlet. (0.23  
seconds)

:-)

On Dec 19, 2008, at 4:35 PM, André Warnier wrote:


Dear experts,

I love Tomcat, and I find all the people on this list kind, helpful,  
in short marvelous.


I have dabbled in servlet filters before, but I never wrote an  
actual servlet.  And now I need to write the tiniest of one.


It just needs to return, as plain text, not Hello World, but the  
result of request.getUserPrincipal.getName().

That's it.

Would anyone be as kind as to point me to a clean nice example, such  
that I could just replace Hello World by the above ?


Better yet (but I don't want to abuse your patience), just paste the  
code right here below :


(space intentionally left blank)









Thanks very much.
Angelica C.
Computer student
Italy
(well, close)

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





Re: HelloWorld servlet, or just about

2008-12-19 Thread Serge Fonville
On Fri, Dec 19, 2008 at 10:35 PM, André Warnier a...@ice-sa.com wrote:

 Dear experts,

 I love Tomcat, and I find all the people on this list kind, helpful, in
 short marvelous.

 I have dabbled in servlet filters before, but I never wrote an actual
 servlet.  And now I need to write the tiniest of one.

 It just needs to return, as plain text, not Hello World, but the result
 of request.getUserPrincipal.getName().
 That's it.

 Would anyone be as kind as to point me to a clean nice example, such that I
 could just replace Hello World by the above ?

 Better yet (but I don't want to abuse your patience), just paste the code
 right here below :

 (space intentionally left blank)


If you don't mind my asking, how much java experience do you have?

Regards,

Serge Fonville


Re: HelloWorld servlet, or just about

2008-12-19 Thread André Warnier

Ken Bowen wrote:

Of course, Google is your friend:
 Results 1 - 10 of about 237,000 for hello world servlet. (0.23 
seconds)

:-)


Yeah, I got that too.
That's the problem though : which one to choose ?

Never mind, and apologies, I think I'll use the first one :

package test;

import java.io.*;

import javax.servlet.http.*;
import javax.servlet.*;

public class HelloServlet extends HttpServlet {
  public void doGet (HttpServletRequest req,
 HttpServletResponse res)
throws ServletException, IOException
  {
PrintWriter out = res.getWriter();

out.println(Hello, world!);
out.close();
  }
}


But now, a trickier question :

I already have a servlet filter, in front of a servlet which I need anyway.
Can I, in the filter, and based on some characteristic of the request, 
return a response to the caller immediately, bypassing the servlet 
entirely ?





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



Re: HelloWorld servlet, or just about

2008-12-19 Thread Peter_Ford
Actually this is very easy; when you want to pass the request down the
chain (i.e. into the servlet) you call the chain.doFilter() method. When
you *don't* want the request passed on, your filter just sets up the
response (status, header, etc.) and returns.

André Warnier a...@ice-sa.com wrote on 12/19/2008 02:50:25 PM:

 Ken Bowen wrote:
  Of course, Google is your friend:
   Results 1 - 10 of about 237,000 for hello world servlet. (0.23
  seconds)
  :-)
 
 Yeah, I got that too.
 That's the problem though : which one to choose ?

 Never mind, and apologies, I think I'll use the first one :

 package test;

 import java.io.*;

 import javax.servlet.http.*;
 import javax.servlet.*;

 public class HelloServlet extends HttpServlet {
public void doGet (HttpServletRequest req,
   HttpServletResponse res)
  throws ServletException, IOException
{
  PrintWriter out = res.getWriter();

  out.println(Hello, world!);
  out.close();
}
 }


 But now, a trickier question :

 I already have a servlet filter, in front of a servlet which I need
anyway.
 Can I, in the filter, and based on some characteristic of the request,
 return a response to the caller immediately, bypassing the servlet
 entirely ?




 -
 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: HelloWorld servlet, or just about

2008-12-19 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: HelloWorld servlet, or just about

 Better yet (but I don't want to abuse your patience), just paste the
 code right here below :

package myPackage;

import java.io.IOException;
import java.io.PrintWriter;
import java.security.Principal;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public final class ShowUser extends HttpServlet {
  public void doGet(HttpServletRequest request, HttpServletResponse response)
  throws IOException, ServletException {
Principal user = request.getUserPrincipal();
String userName = user == null ?  : user.getName();
PrintWriter writer;

response.setContentType(text/html);
writer = response.getWriter();

writer.println(html);
writer.println(head);
writer.println(titleSample Servlet to display current 
Principal/title);
writer.println(/head);
writer.println(body);
writer.println(p);
writer.println(Current user is  + (userName.length() == 0 ? 
lt;nullgt; : userName));
writer.println(/p);
writer.println(/body);
writer.println(/html);
  }
}

In your web.xml, include the following:

servlet
servlet-nameUserServlet/servlet-name
servlet-classmyPackage.ShowUser/servlet-class
/servlet

servlet-mapping
servlet-nameUserServlet/servlet-name
url-pattern/showuser/url-pattern
/servlet-mapping

 - 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



Re: HelloWorld servlet, or just about

2008-12-19 Thread André Warnier

I'm sorry, but that does not match the specs AT ALL.
I specifically asked that the response should be plain text, and just 
the userid.

t.

;-)

Thanks, Chuck.

Caldarale, Charles R wrote:

From: André Warnier [mailto:a...@ice-sa.com]
Subject: HelloWorld servlet, or just about

Better yet (but I don't want to abuse your patience), just paste the
code right here below :


package myPackage;

import java.io.IOException;
import java.io.PrintWriter;
import java.security.Principal;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public final class ShowUser extends HttpServlet {
  public void doGet(HttpServletRequest request, HttpServletResponse response)
  throws IOException, ServletException {
Principal user = request.getUserPrincipal();
String userName = user == null ?  : user.getName();
PrintWriter writer;

response.setContentType(text/html);
writer = response.getWriter();

writer.println(html);
writer.println(head);
writer.println(titleSample Servlet to display current 
Principal/title);
writer.println(/head);
writer.println(body);
writer.println(p);
writer.println(Current user is  + (userName.length() == 0 ? 
lt;nullgt; : userName));
writer.println(/p);
writer.println(/body);
writer.println(/html);
  }
}

In your web.xml, include the following:

servlet
servlet-nameUserServlet/servlet-name
servlet-classmyPackage.ShowUser/servlet-class
/servlet

servlet-mapping
servlet-nameUserServlet/servlet-name
url-pattern/showuser/url-pattern
/servlet-mapping

 - 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





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



WIR MACHEN FERIEN

2008-12-19 Thread André Warnier

Am I the only one being subjected to this, or is it a general thing ?
Apparently someone has put the Tomcat list on his holiday auto-reply 
list, and I get a reply to each message I post on the list.


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



RE: HelloWorld servlet, or just about

2008-12-19 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: HelloWorld servlet, or just about

 I'm sorry, but that does not match the specs AT ALL.
 I specifically asked that the response should be
 plain text, and just the userid.

Hmmm... I think you're starting to believe your 11 rules...

 - 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



RE: WIR MACHEN FERIEN

2008-12-19 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: WIR MACHEN FERIEN

 Am I the only one being subjected to this, or is it a general thing ?

It's general.  Stupid bloody auto-responders.  Using one is often grounds for 
removal from the list, at least temporarily.

 - 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



Re: HelloWorld servlet, or just about

2008-12-19 Thread André Warnier

André Warnier wrote:
[...]
Ok, let me explain why I asked these simplistic questions, not that you 
would think me gaga.


I use a non-conventional database application, which wants a user-id as 
the content of a HTTP request header. Say

DBUID: johnsmith


To provide an SSO solution for that application, I previously wrote a 
servlet filter, which gets the authenticated user-id from tomcat, and 
transforms it into such a HTTP header, creates a wrapper for the 
request, to which it adds this header, then passes the wrapped request 
to the servlet that talks to the database.


When the source of the user-id is a Windows domain, I add another 
servlet filter from the Samba people (see http://jCIFS.samba.org), which 
performs the HTTP/NTML authentication and sets the Tomcat user-id to the 
user's Domain user-id.

Then my filter picks it up from Tomcat etc..

It all works very nice, and the jCIFS filter is easy to configure and 
just works.


But now I have another issue : in front of that Tomcat, is an Apache, 
with plenty of things done by Apache in mod_perl modules, and only a few 
passed on to Tomcat.
And I would need the user's Windows authentication to be done at the 
Apache level, so that it can be used more generally than for the links 
processed by Tomcat only.


There are several Apache modules that allow doing an NTLM authentication 
at the Apache level.  But either they do not work in some circumstances, 
or else they are complicated and really heavy to set up (for example, 
requiring Samba and winbind, which I don't otherwise need nor want).


So my idea was to implement, at the Apache level, a simple mod_perl 
authentication module which just passes a request to the back-end 
Tomcat, to get the user-id as negociated by jCIFS, retrieves the answer, 
and uses this user-id to authenticate at the Apache level.
The Apache user-id can then be passed on to Tomcat via mod_jk, for the 
requests that need Tomcat.


I could do this either by creating a tiny specific webapp wrapped into 
the JCIFS filter (the reason for my original posting), or else I could 
arrange for the filter which I already wrote above to respond to those 
special requests itself, and bypass the database servlet in that case.

(the reason for my secondary posting).

I mean, I have the Apache and mod_jk and Tomcat and jCIFS anyway, so I 
might as well use them, and not complexify the setup by introducing more 
software and modules, right ?


Now, from anyone who had the patience to follow up to here, any comments ?


Thanks
(and thanks for the previous answers also)

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



Re: HelloWorld servlet, or just about

2008-12-19 Thread André Warnier

peter_f...@blm.gov wrote:

Actually this is very easy; when you want to pass the request down the
chain (i.e. into the servlet) you call the chain.doFilter() method. When
you *don't* want the request passed on, your filter just sets up the
response (status, header, etc.) and returns.



Thanks, that is what I wasn't sure of.  I was wondering if one had to 
start dispatching the request somewhere else etc..




André Warnier a...@ice-sa.com wrote on 12/19/2008 02:50:25 PM:


But now, a trickier question :

I already have a servlet filter, in front of a servlet which I need

anyway.

Can I, in the filter, and based on some characteristic of the request,
return a response to the caller immediately, bypassing the servlet
entirely ?




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



Re: HelloWorld servlet, or just about

2008-12-19 Thread André Warnier

André Warnier wrote:

peter_f...@blm.gov wrote:

Actually this is very easy; when you want to pass the request down the
chain (i.e. into the servlet) you call the chain.doFilter() method. When
you *don't* want the request passed on, your filter just sets up the
response (status, header, etc.) and returns.




Actually, let me add another question, linked to my earlier explanation :

From a front-end Apache, I am issuing a request to Tomcat, with the 
only purpose of getting back a small string (a user-id).
I would imagine that for Tomcat generating a whole response (headers + 
body) is heavier than generating just a set of headers.
So can I, from the filter as before, generate a response consisting 
*only* of headers, among which one propietary one that would contain 
the string I want.


I would basically need only a response with

HTTP status line
MyHeader: johnsmith

(and no body)

At the limit, it could even be just the status line, with my return 
string in the message part.
I know that's pushing the HTTP protocol a bit, but this is a purely 
internal message, never sent back to a browser.




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



Tomcat 5.0 on IBM JVM 1.5

2008-12-19 Thread André Warnier

Hi.

On a customer Suse Enterprise Linux system I have inherited a Tomcat 
5.0, running on an IBM JVM 1.5.
It runs, but the Tomcat packagers of Suse seem to have even more delight 
with softlinks than the Debian ones. (The common/lib and shared/lib have 
several hundred of them, never mind the usual conf and work and other 
suspects).


For a couple of other Java applications, I had to install a Sun Java JDK 
1.6 on that same system.


Now I am wondering whether it is worth trying to fix the existing 
Tomcat 5.0 Suse package to have it use the Sun JDK 1.6, and get rid of 
the IBM JVM, or whether I should just leave well-enough alone and keep 
the two JVM's side-by-side.


Anyone with any experience with this kind of thing ?
Just as a general idea.



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



RE: HelloWorld servlet, or just about

2008-12-19 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Re: HelloWorld servlet, or just about

 I would basically need only a response with

 HTTP status line
 MyHeader: johnsmith

So take the code I posted, rip out all the HTML stuff, and just send the text 
of the userid.  Since it doesn't even have to be real HTTP, you don't even need 
a header, just the userid as a string.  You'll need some method of indicating 
an empty string, unless you know the session has *always* been authenticated.

package myPackage;

import java.io.IOException;
import java.io.PrintWriter;
import java.security.Principal;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public final class ShowUser extends HttpServlet {
  public void doGet(HttpServletRequest request, HttpServletResponse response)
  throws IOException, ServletException {
Principal user = request.getUserPrincipal();
String userName = user == null ?  : user.getName();
PrintWriter writer;

response.setContentType(text/plain);  // probably not necessary
writer = response.getWriter();

writer.println(userName.length() == 0 ? null : userName));
  }
}

 - 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



RE: Tomcat 5.0 on IBM JVM 1.5

2008-12-19 Thread Caldarale, Charles R
 From: André Warnier [mailto:a...@ice-sa.com]
 Subject: Tomcat 5.0 on IBM JVM 1.5

 Now I am wondering whether it is worth trying to fix the existing
 Tomcat 5.0 Suse package to have it use the Sun JDK 1.6, and get rid of
 the IBM JVM, or whether I should just leave well-enough alone and keep
 the two JVM's side-by-side.

Sounds like the real problem is the Tomcat installation, not the choice of JVM. 
 However, the IBM JVMs are extremely compatible with the Sun ones, so there 
shouldn't be a problem dumping the one from IBM.  The command line parameters 
may vary slightly, of course.

 - 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



Re: Problems with JK connector and IIS5 and tomcat 6

2008-12-19 Thread wyndrise


Bill Barker-2 wrote:
 
 The error is harmless (other than taking up disk space).  It just says
 that 
 the user aborted before the page was fully loaded.  
 

The error is not necessarily harmless. The connection is being broken before
the transaction is complete. Tomcat tries to write to what it thinks is a
live socket and the exception is thrown.

Which is as far as I've been able to get. I'm going nuts trying to figure
out why the connection is breaking and by which side - any insight on that
would be much appreciated. 

-- 
View this message in context: 
http://www.nabble.com/Problems-with-JK-connector-and-IIS5-and-tomcat-6-tp20866125p21101017.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Redeploy leaks

2008-12-19 Thread Adriano dos Santos Fernandes

Hi!

As I had having OutOfMemory exceptions (PermGen) when redeploying an 
application, I started to verify things using Eclipse Memory Analyzer.


I've discovered some real leaks, for example caused by the Java Disposer 
thread being instantiated using the Webapp classloader. After fix this, 
when I redeploy the application, Memory Analyzer shows that there are no 
non-weak/soft references to the undeployed classloader. But it (and the 
classes allocated by it) is never garbaged collected.


I've tried different VM switches (-XX:+CMS*) and none make the 
classloader be collected. Thinking about word Perm (permanent) and 
some sources, I've done non-web testing and there a custom classloader 
*is* garbaged collected.


So what could be the problem when running in Tomcat?

I'm using Tomcat 6.0.18, JDK 1.6.0-10 (Linux and Windows) and Apache 
Wicket. I've not put any libraries in tomcat/lib, they are all on the 
WEB-INF/lib. Wicket uses ThreadGlobals, but I don't think this may be a 
problem, because Eclipse Memory Analyzer seems to show references from 
them, but it didn't show any references in my case!


Increasing the permgen size is not something I'm looking for. I'd rather 
prefer to see unused memory being deallocated.



Adriano


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