RE: Memory leak in Tomcat

2005-09-12 Thread Michael Oliver
Ingrid,

I am not on the tomcat developer committer list so my reply is just an FYI
from my own experience.

I saw unstable performance myself in a very similar deployment of Struts
applications similar to yours.  I too thought there was a memory leak and
there may be, but I don't think it is in the applications themselves.  The
behavior I saw, led me to think it was related to socket allocation as after
a period of time my system began to complain and slow down and other socket
related programs began to complain about timeouts, etc.

I found that my tomcat needed to use virtual memory to avoid out of memory
exceptions.  I added physical memory and the problems all but went away,
however it still occurs just less frequently.

I am using 

j2sdk1.4.2_09
Tomcat-5.0.28

On Windows XP Pro sp1
 


Michael Oliver
CTO
Alarius Systems LLC
6800 E. Lake Mead Blvd, #1096
Las Vegas, NV 89156
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]

-Original Message-
From: Ingrid Morterud Rosvall [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 12, 2005 1:00 PM
To: tomcat-user@jakarta.apache.org
Subject: Memory leak in Tomcat

Hello.

We are running an application on Tomcat 4.1.30, and java 1.4.2.

Our application is using the struts framework with jsp's, and cocoon to
render the xml's. 

There seems to be a major memory leak at startup - the application seems to
constantly be using between 40 - 45 mb of the memory. We also have some
memory leak during runtime, when users log on and starts using the
application.

So far we have not been able to find anything in our code review that will
explain these memory leaks, and when we monitor the memory used, there is no
obvious reason, nor is there any connection with how the users use our
application and the amount of memory being used. 

We would highly appreciate any help on this topic, and any tips and hints
you can provide us with. 

Ingrid and Tommy


--
I am using the free version of SPAMfighter for private users.
It has removed 4102 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: putting files with webdav

2005-09-05 Thread Michael Oliver
Look in the /webapps/webdav/WEB-INF/web.xml

You should see where you need to uncomment things to enable writing. 


Michael Oliver
CTO
Alarius Systems LLC
6800 E. Lake Mead Blvd, #1096
Las Vegas, NV 89156
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]

-Original Message-
From: Hugo Osorio [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 05, 2005 8:35 AM
To: tomcat-user@jakarta.apache.org
Subject: putting files with webdav

Hello everybody

looking for help, i need to use webdav component in Tomcat 5.0, i am using
FreeBSD 4.11 stable I have connected Dreamweaver, and DAV Explorer to the
http://192.X.X.X:8080/webdav it do retrieves content, and i can get files,
But.. I cannot put files on it.. it says the access is denied.. 

What do i have to do in order to change this so it permit me to transfer
files?

thank you


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: question about load-on-startup in web.xml

2005-05-12 Thread Michael Oliver
If I were doing it I would put a singleton class in the /common/lib/
that had a Hashtable and in my application's startup I would get the
singleton and have the first application I want to load put a string
loading (or whatever) in the Hashtable of the singleton with the key
webappY.  The second webappX get the singleton and look for
webappY/loading.  If it is still there sleep and check again later.
When webappY is finished starting it removes the 'loading' from the
Hashtable of the singleton and when webappX sees it is gone, it
continues. 

Michael Oliver
CTO
Alarius Systems LLC
6800 E. Lake Mead Blvd, #1096
Las Vegas, NV 89156
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]
-Original Message-
From: Annie Wang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 11, 2005 3:47 PM
To: Parsons Technical Services; Tomcat Users List
Subject: Re: question about load-on-startup in web.xml

i tried putting in a sleep in my servlet's init method, but
$CATALINA_HOME/logs/catalina.out seems to indicate that tomcat waits
for it to initalize..

in my catalina.out, i have:

May 11, 2005 2:12:06 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /webappX from URL
file:/jakarta-tomcat/webapps/webappX
***webappX***start init
***webappX***end init
May 11, 2005 2:12:06 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /webappY from URL
file:/jakarta-tomcat/webapps/webappY

any one know if there's a way to make webappY get installed before
webappX?  what determines the install order?  i thought it was
load-on-startup in the web.xml file, but maybe that affects the
ordering of servlet initalization within a web application (if the web
application has multiple servlets), but not the ordering of web
application installation on tomcat startup.

thanks.
-annie


On 5/10/05, Annie Wang [EMAIL PROTECTED] wrote:
 hi doug, yup, was thinking along similar lines.  just wasn't sure if
 there was some setting i wasn't aware of to do what i'm looking for.
 
 thanks.
 -annie
 
 On 5/10/05, Parsons Technical Services
[EMAIL PROTECTED] wrote:
  I may be off base on this one but I think that once Tomcat fires off
the
  init method it doesn't care or monitor the progress of the servlet.
Just
  think, some servlets may take several minutes to finish. If other
apps had
  to wait then it could take a long time to get the server started.
 
  Now as for a solution I am really speculating here (hopefully
someone can
  educate both of us). I would look at a wait statement in the init
method to
  pause the second app's servlet until the first one is done. Simply
time the
  first app's servlet and set it for a little more.
 
  Hopefully someone will set me straight if I am off base here.
 
  Doug
 
  - Original Message -
  From: Annie Wang [EMAIL PROTECTED]
  To: tomcat-user@jakarta.apache.org
  Sent: Tuesday, May 10, 2005 6:59 PM
  Subject: question about load-on-startup in web.xml
 
  hi,
 
  regarding the load-on-startup tag in web.xml:
 
  say i have 2 web apps (webapp1 and webapp2).  if i configure
webapp1's
  servlet to have load-on-startup1/load-on-startup and webapp2's
  servlet to have load-on-startup100/load-on-startup, does this
mean
  that tomcat will init webapp1's servlet first and once that's done,
  it'll init webapp2's servlet?
 
  basically, i want both web app's servlets to auto initialize on
tomcat
  startup, but i want webapp2's servlet to initialze only after
  webapp1's servlet has finished initialization.  when i use the above
  load-on-startup settings, webapp2's servlet seems to initialize
before
  webapp1's servlet has finished initialization.
 
  thanks.
  -annie
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



InvocationTargetException

2005-05-06 Thread Michael Oliver








I am running Tomcat 5 on XP and after
deploying a new war file, which worked, and was the only change I made, the
next time I rebooted the machine (after all it is XP) this is what I get:



156593 INFO [main]
core.StandardHostDeployer - Processing Context configuration file URL
file:C:\Program Files\Apache Software Foundation\Tomcat
5.0\conf\Catalina\localhost\balancer.xml

157015 ERROR [main]
modeler.Registry - Null component Catalina:type=JspMonitor,WebModule=//localhost/balancer,J2EEApplication=none,J2EEServer=none

157031 ERROR [main]
digester.Digester - End event threw exception

java.lang.reflect.InvocationTargetException

 at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

 at
java.lang.reflect.Method.invoke(Method.java:324)

 at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)

 at
org.apache.commons.digester.SetNextRule.end(SetNextRule.java:208)

 .

 .

 .

at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

Caused by:
java.lang.NoSuchMethodError: org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V

 at
org.apache.commons.logging.impl.Log4JCategoryLog.debug(Log4JCategoryLog.java:94)

 at
org.apache.catalina.session.ManagerBase.init(ManagerBase.java:633)

 at
org.apache.catalina.session.StandardManager.start(StandardManager.java:639)

 

and further down

158062 INFO [main]
core.StandardHostDeployer - Processing Context configuration file URL
file:C:\Program Files\Apache Software Foundation\Tomcat
5.0\conf\Catalina\localhost\manager.xml

158062 INFO [main]
core.StandardHostDeployer - Processing Context configuration file URL
file:C:\Program Files\Apache Software Foundation\Tomcat
5.0\conf\Catalina\localhost\manager.xml

158375 ERROR [main]
modeler.Registry - Null component Catalina:type=JspMonitor,WebModule=//localhost/manager,J2EEApplication=none,J2EEServer=none

158375 ERROR [main]
digester.Digester - End event threw exception

java.lang.reflect.InvocationTargetException

 at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

 .

 .

 .

 at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

Caused by:
java.lang.NoSuchMethodError: org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V

 at
org.apache.commons.logging.impl.Log4JCategoryLog.debug(Log4JCategoryLog.java:94)

 at
org.apache.catalina.session.ManagerBase.init(ManagerBase.java:633)

 at
org.apache.catalina.session.StandardManager.start(StandardManager.java:639)

 

Is this an issue with the version of
log4j.jar or a class loader issue or is there a corrupt jar I should replace?








 
  
  
   


 
  
  
   




Loosely Coupled

   
  
  
  
  
  
  
 
 
  
  
   

Mike Oliver
CTO 


Alarius Systems LLC
6800 E. Lake Mead Blvd
Apt 1096
Las Vegas, NV 89156 

   
   

[EMAIL PROTECTED]
[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
http://www.alariussystems.com/




 
  
  tel: 
  fax: 
  mobile: 
  
  
  (702)643-7425
  (702)974-0341
  (518)378-6154 
  
 



   
  
  
  
 






   
  
  
  
 
 
  
  
   

Add me to your address book...


Want a signature like
this?

   
  
  
  
 











Common vs. Shared

2005-05-05 Thread Michael Oliver








I am quite sure this has been asked and
answered but I googled a bunch of combinations and didnt find the
answer, so I am sure someone here will know and share.



What is the difference between the /common/
and /shared/ 



I understand this is a class loader issue, and
I have read the comments in catalina.properties.



What would go into common
that wouldnt go into shared and vice versa?



If a jar is in /common/lib/ and a different
version of that jar is in /shared/lib/ what will be the effect?



Similarly, if I modify catalina.properties
and add something to common that is already in shared,
etc.



Understanding the relationship between common
and shared and the intended use thereof should be of interest to
more than just me.



Ollie






 
  
  
   


 
  
  
   




Loosely Coupled

   
  
  
  
  
  
  
 
 
  
  
   

Mike Oliver
CTO 


Alarius Systems LLC
6800 E. Lake Mead Blvd
Apt 1096
Las Vegas, NV 89156 

   
   

[EMAIL PROTECTED]
[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
http://www.alariussystems.com/




 
  
  tel: 
  fax: 
  mobile: 
  
  
  (702)643-7425
  (702)974-0341
  (518)378-6154 
  
 



   
  
  
  
 






   
  
  
  
 
 
  
  
   

Add me to your address book...


Want a signature like
this?

   
  
  
  
 











RE: Common vs. Shared

2005-05-05 Thread Michael Oliver
Oh I completely agree it is bad practice, but alas I must deal with
applications that are not my design and dealing with these conflicts is
a royal pain in my non-royal ass.

Michael Oliver
CTO
Alarius Systems LLC
6800 E. Lake Mead Blvd, #1096
Las Vegas, NV 89156
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]
-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 05, 2005 1:29 PM
To: Tomcat Users List
Subject: RE: Common vs. Shared

 From: Michael Oliver [mailto:[EMAIL PROTECTED] 
 Subject: Common vs. Shared
 
 What is the difference between the /common/ and /shared/ 
 
 I understand this is a class loader issue, and I have read 
 the comments in catalina.properties.

But have you read the actual documentation?  In particular:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html
including this rather descriptive diagram:

  Bootstrap
  |
   System
  |
   Common
  /  \
 Catalina   Shared
 /   \
Webapp1  Webapp2 ... 

 If a jar is in /common/lib/ and a different version of that 
 jar is in /shared/lib/ what will be the effect?

Trouble, usually.  Anytime you have the same class files in multiple
places in a single path in the hierarchy, you run the risk of conflicts
and lots of NCDFE problems.  Very, very bad practice.

 - 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]