You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brian <bb...@yahoo.com> on 2010/11/16 04:57:48 UTC

After manager says that there was a leak, how to use a profiler?

Hi,

 

After the Tomcat manager warns that there was a leak with one app what was
stopped or undeployed, how do I use the profiler to investigate that? I
mean, that is the starting point to analize that? What should I look for?

 

Brian

 

 


RE: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.
Thanks a lot for the info Konstantin. I will read it asap!

> -----Original Message-----
> From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> Sent: Monday, November 15, 2010 11:08 PM
> To: Tomcat Users List
> Subject: Re: After manager says that there was a leak, how to use a
profiler?
> 
> 2010/11/16 Brian <bb...@yahoo.com>:
> > Hi,
> >
> > After the Tomcat manager warns that there was a leak with one app what
> > was stopped or undeployed, how do I use the profiler to investigate
> > that? I mean, that is the starting point to analize that? What should I
look
> for?
> >
> 
> E.g., using Eclipse MAT,
> [1] http://www.eclipse.org/mat/
> [2] http://dev.eclipse.org/blogs/memoryanalyzer/2008/05/17/the-unknown-
> generation-perm/
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


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


Re: After manager says that there was a leak, how to use a profiler?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/11/16 Brian <bb...@yahoo.com>:
> Hi,
>
> After the Tomcat manager warns that there was a leak with one app what was
> stopped or undeployed, how do I use the profiler to investigate that? I
> mean, that is the starting point to analize that? What should I look for?
>

E.g., using Eclipse MAT,
[1] http://www.eclipse.org/mat/
[2] http://dev.eclipse.org/blogs/memoryanalyzer/2008/05/17/the-unknown-generation-perm/

Best regards,
Konstantin Kolinko

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


RE: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.

> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Friday, November 19, 2010 04:45 AM
> To: Tomcat Users List
> Subject: Re: After manager says that there was a leak, how to use a profiler?
> 
> On 19/11/2010 03:58, Brian wrote:
> > Hi Chris,
> >
> > I already took off the JARs from the shared/lib directory. So that is not an
> issue now.
> > I have just stopped my apps, and this is what I have found in my log:
> >
> >
> > Nov 18, 2010 10:22:57 PM org.apache.catalina.core.StandardWrapper
> > unload
> > INFO: Waiting for 1 instance(s) to be deallocated Nov 18, 2010
> > 10:22:58 PM org.apache.catalina.loader.WebappClassLoader
> > clearReferencesJdbc
> > SEVERE: The web application [] registered the JBDC driver
> [com.mysql.jdbc.Driver] but failed to unregister it when the web application
> was stopped. To prevent a memory leak, the JDBC Driver has been forcibly
> unregistered.
> 
> Tomcat fixed this one for you. You'll need to de-register the JDBC driver in a
> ServletContextListener to stop the message.


I tried. In the "contextDestroyed" method I placed a code that looks for the drivers and unregisters them. But the only driver found is "sun.jdbc.odbc.JdbcOdbcDriver", which is not even unregistered because  (driver.getClass().getClassLoader().equals(getClass().getClassLoader())) = false

 
> > Nov 18, 2010 10:22:58 PM org.apache.catalina.loader.WebappClassLoader
> > clearReferencesThreads
> > SEVERE: The web application [] appears to have started a thread named
> [MySQL Statement Cancellation Timer] but has failed to stop it. This is very
> likely to create a memory leak.
> 
> I thought someone mentioned this was fixed in the latest MySQL JDBC driver.


Thanks. I have downloaded to latest driver. Now lets see if that solves it.

 
> > Nov 18, 2010 10:22:58 PM org.apache.catalina.loader.WebappClassLoader
> > clearThreadLocalMap
> > SEVERE: The web application [] created a ThreadLocal with key of type
> [org.apache.commons.lang.builder.ReflectionToStringBuilder$1] (value
> [org.apache.commons.lang.builder.ReflectionToStringBuilder$1@1794040])
> and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when
> the web application was stopped. This is very likely to create a memory leak.
> 
> I think this one is https://issues.apache.org/jira/browse/LANG-586


 
Thanks. I have upgraded to the latest version of Commons Lang.


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


Re: After manager says that there was a leak, how to use a profiler?

Posted by Mark Thomas <ma...@apache.org>.
On 19/11/2010 03:58, Brian wrote:
> Hi Chris,
> 
> I already took off the JARs from the shared/lib directory. So that is not an issue now.
> I have just stopped my apps, and this is what I have found in my log:
> 
> 
> Nov 18, 2010 10:22:57 PM org.apache.catalina.core.StandardWrapper unload
> INFO: Waiting for 1 instance(s) to be deallocated
> Nov 18, 2010 10:22:58 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
> SEVERE: The web application [] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

Tomcat fixed this one for you. You'll need to de-register the JDBC
driver in a ServletContextListener to stop the message.

> Nov 18, 2010 10:22:58 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
> SEVERE: The web application [] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.

I thought someone mentioned this was fixed in the latest MySQL JDBC driver.

> Nov 18, 2010 10:22:58 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
> SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.commons.lang.builder.ReflectionToStringBuilder$1] (value [org.apache.commons.lang.builder.ReflectionToStringBuilder$1@1794040]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

I think this one is https://issues.apache.org/jira/browse/LANG-586

Mark

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


RE: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.
Hi Chris,

I already took off the JARs from the shared/lib directory. So that is not an issue now.
I have just stopped my apps, and this is what I have found in my log:


Nov 18, 2010 10:22:57 PM org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
Nov 18, 2010 10:22:58 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Nov 18, 2010 10:22:58 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak.
Nov 18, 2010 10:22:58 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.commons.lang.builder.ReflectionToStringBuilder$1] (value [org.apache.commons.lang.builder.ReflectionToStringBuilder$1@1794040]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.



> -----Original Message-----
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Sent: Tuesday, November 16, 2010 02:34 PM
> To: Tomcat Users List
> Subject: Re: After manager says that there was a leak, how to use a profiler?
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Brian,
> 
> On 11/16/2010 10:42 AM, Brian wrote:
> > If I choose
> > the report of "Paths from GC roots" from it, I see LOTS of items! And
> > all of them have the "<loader> of" indication. All the items are
> > classes programmed by me, so I guess I'm guilty, and not the people
> > that programmed Tomcat
> > ;-)  . They are DTOs, facades, Struts actionforms, etc.
> > Why are all these classes in the list?
> 
> If these are java.lang.Class objects, then you are looking at the list of classes
> loaded by the WebappClassLoader. These are the objects that make up the
> memory block that is unrecoverable. It's not the Class objects themselves that
> are holding onto references to the ClassLoader, it's the other way around.
> 
> > What should I check about them? Why are they still loaded?
> 
> The real problem is that there is an object that is still "live"
> somewhere whose Class has been loaded by your webapp's
> WebappClassLoader.
> 
> > I guess there is something missing in my programming. Maybe I should
> > do something about all the objects that are still alive that
> > correspond to all the loaded classes? Maybe I need to do something in the
> "contextDestroyed()"
> > method in the ServletContextListener in my app, in order to destroy
> > all the objects properly?
> 
> A basic rule is that anything you configure in a ServletContextListener's
> contextStarted method needs to be destroyed in the contextDestroyed
> method. Same thing for any Servlets that have
> init() methods -- use the destroy() method to clean-up those resources.
> 
> When you undeploy, there may be a "leak" message in catalina.out. If you
> post that, we might be able to help you.
> 



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


Re: After manager says that there was a leak, how to use a profiler?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian,

On 11/16/2010 10:42 AM, Brian wrote:
> If I choose
> the report of "Paths from GC roots" from it, I see LOTS of items! And all of
> them have the "<loader> of" indication. All the items are classes programmed
> by me, so I guess I'm guilty, and not the people that programmed Tomcat
> ;-)  . They are DTOs, facades, Struts actionforms, etc. 
> Why are all these classes in the list?

If these are java.lang.Class objects, then you are looking at the list
of classes loaded by the WebappClassLoader. These are the objects that
make up the memory block that is unrecoverable. It's not the Class
objects themselves that are holding onto references to the ClassLoader,
it's the other way around.

> What should I check about them? Why are they still loaded?

The real problem is that there is an object that is still "live"
somewhere whose Class has been loaded by your webapp's WebappClassLoader.

> I guess there is something missing in my programming. Maybe I should do
> something about all the objects that are still alive that correspond to all
> the loaded classes? Maybe I need to do something in the "contextDestroyed()"
> method in the ServletContextListener in my app, in order to destroy all the
> objects properly?  

A basic rule is that anything you configure in a
ServletContextListener's contextStarted method needs to be destroyed in
the contextDestroyed method. Same thing for any Servlets that have
init() methods -- use the destroy() method to clean-up those resources.

When you undeploy, there may be a "leak" message in catalina.out. If you
post that, we might be able to help you.

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

iEYEARECAAYFAkzi3KwACgkQ9CaO5/Lv0PC/AwCgg9xb+4vGGrhp1DCVVUDrj5fL
03sAoJ4WjGXllEuymrPPf3BpAXPyMGzI
=VNNp
-----END PGP SIGNATURE-----

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


RE: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.
Hi Mark,

I read your information, which I will quote here:


1. Find an app that you can't reload without OOME
2. Get a profiler - I like Yourkit
   Full disclosure: they give ASF committers a free copy
3. Reload you app once
4. Use the profiler to look for instances of WebappClassLoader
5. Look for the one with the started attribute == false
6. Trace the GC roots for this instance
7. Fix whatever is hanging on to references to the instance - there
should not be any



Well, I'm using Yourkit as well. I reloaded the app twice, and I found 4
instances of WebappClassLoader. Two of them correspond to my two running
apps, which is correct, and the other two correspond to the leaked apps.
Both of them have an instance that have the started attribute with a
"false". Great, so I guess I'm in the right path to find the problem. Now
I'm inspecting one of these objects with the "started=false". If I choose
the report of "Paths from GC roots" from it, I see LOTS of items! And all of
them have the "<loader> of" indication. All the items are classes programmed
by me, so I guess I'm guilty, and not the people that programmed Tomcat
;-)  . They are DTOs, facades, Struts actionforms, etc. 
Why are all these classes in the list? What should I check about them? Why
are they still loaded? 
I guess there is something missing in my programming. Maybe I should do
something about all the objects that are still alive that correspond to all
the loaded classes? Maybe I need to do something in the "contextDestroyed()"
method in the ServletContextListener in my app, in order to destroy all the
objects properly?  
 
Thanks a lot for your help!

Brian 



> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Tuesday, November 16, 2010 04:37 AM
> To: Tomcat Users List
> Subject: Re: After manager says that there was a leak, how to use a
profiler?
> 
> On 16/11/2010 04:12, Brian wrote:
> > Maybe my question sounded too vague and repetitive.
> > What I meant is something like this "Is the a class loader (or
> > something like that) than I should start analyzing? I mean, is there a
> > route I should follow in order to see which objects are stucked? If
> > the Tomcat Manager knows that something got stucked in the memory,
> how
> > does it know that? Is there a clue we should start?".
> 
> http://markmail.org/message/fcbvwapt6afyndxn
> 
> Mark
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


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


RE: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.
Hi Chuck,

> -----Original Message-----
> From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
> Sent: Wednesday, November 17, 2010 04:02 PM
> To: Tomcat Users List
> Subject: RE: After manager says that there was a leak, how to use a
profiler?
> 
> > From: Brian [mailto:bbprefix-mail@yahoo.com]
> > Subject: FW: After manager says that there was a leak, how to use a
> profiler?
> 
> > I moved my JARs from the ".../tomcat/shared/lib" directory to the
> > "web-inf/lib" directory in the app itself
> 
> It better be WEB-INF/lib; case matters (even on Windows).

Yes, it is, I forgot to use the shift key.
 
> > it seems that the JARs there are not being discovered by Tomcat.
> 
> Access permissions?  (Not likely if you're starting with a .war file.)

That is not the problem, because as you said there is the WAR file that
expands, and other files there (.jsp for example) are reachable
 
> Did you remove the jars from the shared library?  (You must.)

Yes, I did, even though I read somewhere that if the JAR files are found in
"WEB-INF/lib", they are read from there before the "..../shared/lib"
directory, if present at both places at the same time.
 
> What does your catalina.properties look like now?

Taking out the comments, now this is the content:
package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomca
t.,org.apache.jasper.,sun.beans.
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.ap
ache.tomcat.,org.apache.jasper.
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.hom
e}/lib,${catalina.home}/lib/*.jar
server.loader=
shared.loader=
tomcat.util.buf.StringCache.byte.enabled=true


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


RE: After manager says that there was a leak, how to use a profiler?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Brian [mailto:bbprefix-mail@yahoo.com] 
> Subject: FW: After manager says that there was a leak, how to use a profiler?

> I moved my JARs from the ".../tomcat/shared/lib" directory to the
> "web-inf/lib" directory in the app itself

It better be WEB-INF/lib; case matters (even on Windows).

> it seems that the JARs there are not being discovered by Tomcat.

Access permissions?  (Not likely if you're starting with a .war file.)

Did you remove the jars from the shared library?  (You must.)

What does your catalina.properties look like now?

 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: FW: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.
Solved: I had several contexts in my server, in each one was already a WAR
created days ago. I forgot about all these old WARs. Since I took off my
JARs from the shared/lib directory, all these old WARs could not work
because they didn't include the JARs inside. So basically I was trying to
run the new WAR and it worked, but I was still watching in the log the
output of the old WARs trying to deploy and work, but failing.

> -----Original Message-----
> From: Brian [mailto:bbprefix-mail@yahoo.com]
> Sent: Wednesday, November 17, 2010 11:35 PM
> To: 'Tomcat Users List'
> Subject: RE: FW: After manager says that there was a leak, how to use a
> profiler?
> 
> I have notices several weird things:
> 
> - Sometimes it runs, sometimes it doesn't
> - When I'm in Eclipse, if I already started the Tomcat server and it is
running, if
> I ask to run it again, it does without any error messages in the log
> 
> It looks like if it was a syncronization issue. Something like these: "If
nothing is
> running, it will wait when I ask it to start. But of something is already
running,
> maybe it will run. And if it did run before at least once, maybe it will
run next
> time I ask it". Makes sense?
> 
> 
> 
> 
> > -----Original Message-----
> > From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
> > Sent: Wednesday, November 17, 2010 06:46 PM
> > To: Tomcat Users List
> > Subject: RE: FW: After manager says that there was a leak, how to use
> > a profiler?
> >
> > > From: Brian [mailto:bbprefix-mail@yahoo.com]
> > > Subject: RE: FW: After manager says that there was a leak, how to
> > > use a
> > profiler?
> >
> > > It seems that the JARs inside "...WEB-INF/lib" are not being
> > > discovered or used.
> >
> > Hence the request to see your catalina.properties - which looks fine.
> What's
> > in the <Context> elements for your webapps?  If you're using anything
> other
> > than the default (and implicit) <Loader>, that might affect how class
> searching
> > is done.  Also, if you have anything in the system classpath at Tomcat
> startup,
> > that might also impact proceedings.
> >
> >  - 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-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


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


RE: FW: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.
I have notices several weird things:

- Sometimes it runs, sometimes it doesn't
- When I'm in Eclipse, if I already started the Tomcat server and it is
running, if I ask to run it again, it does without any error messages in the
log

It looks like if it was a syncronization issue. Something like these: "If
nothing is running, it will wait when I ask it to start. But of something is
already running, maybe it will run. And if it did run before at least once,
maybe it will run next time I ask it". Makes sense?




> -----Original Message-----
> From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
> Sent: Wednesday, November 17, 2010 06:46 PM
> To: Tomcat Users List
> Subject: RE: FW: After manager says that there was a leak, how to use a
> profiler?
> 
> > From: Brian [mailto:bbprefix-mail@yahoo.com]
> > Subject: RE: FW: After manager says that there was a leak, how to use a
> profiler?
> 
> > It seems that the JARs inside "...WEB-INF/lib" are not being
> > discovered or used.
> 
> Hence the request to see your catalina.properties - which looks fine.
What's
> in the <Context> elements for your webapps?  If you're using anything
other
> than the default (and implicit) <Loader>, that might affect how class
searching
> is done.  Also, if you have anything in the system classpath at Tomcat
startup,
> that might also impact proceedings.
> 
>  - 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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


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


RE: FW: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.

> -----Original Message-----
> From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
> Sent: Wednesday, November 17, 2010 06:46 PM
> To: Tomcat Users List
> Subject: RE: FW: After manager says that there was a leak, how to use a
> profiler?
> 
> > From: Brian [mailto:bbprefix-mail@yahoo.com]
> > Subject: RE: FW: After manager says that there was a leak, how to use a
> profiler?
> 
> > It seems that the JARs inside "...WEB-INF/lib" are not being
> > discovered or used.
> 
> Hence the request to see your catalina.properties - which looks fine.
What's
> in the <Context> elements for your webapps?  If you're using anything
other
> than the default (and implicit) <Loader>, that might affect how class
searching
> is done.  Also, if you have anything in the system classpath at Tomcat
startup,
> that might also impact proceedings.
 

Inside the <Context> there is nothing non-standard. Nothing about the loader
indeed. 
It doesn't work either in the Tomcat installation at my production server,
or the Tomcat local installation that my Eclipse uses when running the app.

One interesting thing is happening though. Now it is showing the error
messages in the log when I run it on Eclipse, but then IT WORKS!

This is the context that Eclipse generated for the app, that shows all the
error messages in the log:

  <?xml version="1.0" encoding="UTF-8" ?> 
  <Context docBase="C:\Tomcat\webapps\VistaControlador" reloadable="true"
source="org.eclipse.jst.jee.server:VistaControlador" />



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


RE: FW: After manager says that there was a leak, how to use a profiler?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Brian [mailto:bbprefix-mail@yahoo.com] 
> Subject: RE: FW: After manager says that there was a leak, how to use a profiler?

> It seems that the JARs inside "...WEB-INF/lib" are not 
> being discovered or used.

Hence the request to see your catalina.properties - which looks fine.  What's in the <Context> elements for your webapps?  If you're using anything other than the default (and implicit) <Loader>, that might affect how class searching is done.  Also, if you have anything in the system classpath at Tomcat startup, that might also impact proceedings.

 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: FW: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.
> -----Original Message-----
> From: Pid [mailto:pid@pidster.com]
> Sent: Wednesday, November 17, 2010 04:02 PM
> To: Tomcat Users List
> Subject: Re: FW: After manager says that there was a leak, how to use a
> profiler?
> 
> On 17/11/2010 20:56, Brian wrote:
> > I will have to swallow my pride with this question. I bet this is a
> > very easy issue, but for some reason I haven't found an answer.
> > I moved my JARs from the ".../tomcat/shared/lib" directory to the
> > "web-inf/lib" directory in the app itself, but it seems that the JARs
> > there are not being discovered by Tomcat. This is what the log says:
> 
> WEB-INF/lib or web-inf/lib?

The first one, I made a mistake when typing the email.

 
> > Nov 17, 2010 3:46:56 PM org.apache.catalina.startup.Catalina load
> > INFO: Initialization processed in 730 ms Nov 17, 2010 3:46:56 PM
> > org.apache.catalina.core.StandardService start
> > INFO: Starting service Catalina
> > Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardEngine start
> > INFO: Starting Servlet Engine: Apache Tomcat/6.0.29 Nov 17, 2010
> > 3:46:56 PM org.apache.catalina.startup.HostConfig deployWAR
> > INFO: Deploying web application archive ROOT.war Nov 17, 2010 3:46:56
> > PM org.apache.catalina.core.ApplicationContext log
> > INFO: Marking servlet action as unavailable Nov 17, 2010 3:46:56 PM
> > org.apache.catalina.core.ApplicationContext log
> > SEVERE: Error loading WebappClassLoader
> >   context:
> >   delegate: false
> >   repositories:
> >     /WEB-INF/classes/
> 
> A war is a zip.  You can open it using a zip util, or the jar command, to
check
> that the files are actually where you think they are.
> 
> E.g. jar -tf ROOT.war

I did. All the files are where they should be, even the JAR files that are
in "....WEB-INF/lib". The file expands correctly and all the files are being
placed where they should be.
It seems that the JARs inside "...WEB-INF/lib" are not being discovered or
used.


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


Re: FW: After manager says that there was a leak, how to use a profiler?

Posted by Pid <pi...@pidster.com>.
On 17/11/2010 20:56, Brian wrote:
> I will have to swallow my pride with this question. I bet this is a very
> easy issue, but for some reason I haven't found an answer.
> I moved my JARs from the ".../tomcat/shared/lib" directory to the
> "web-inf/lib" directory in the app itself, but it seems that the JARs there
> are not being discovered by Tomcat. This is what the log says:

WEB-INF/lib or web-inf/lib?

> Nov 17, 2010 3:46:56 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 730 ms
> Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
> Nov 17, 2010 3:46:56 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive ROOT.war
> Nov 17, 2010 3:46:56 PM org.apache.catalina.core.ApplicationContext log
> INFO: Marking servlet action as unavailable
> Nov 17, 2010 3:46:56 PM org.apache.catalina.core.ApplicationContext log
> SEVERE: Error loading WebappClassLoader
>   context: 
>   delegate: false
>   repositories:
>     /WEB-INF/classes/

A war is a zip.  You can open it using a zip util, or the jar command,
to check that the files are actually where you think they are.

E.g. jar -tf ROOT.war


p
> ----------> Parent Classloader:
> org.apache.catalina.loader.StandardClassLoader@2eb0a3f5
>  org.apache.struts.action.ActionServlet
> java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
> 	at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1645)
> 	at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1491)
> 	at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10
> 95)
> 	at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
> 	at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
> 4350)
> 	at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4659)
> 	at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
> 91)
> 	at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
> 	at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
> 	at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
> 	at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
> 	at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
> 	at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
> 	at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
> 	at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
> t.java:119)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
> 	at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> 	at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
> 	at
> org.apache.catalina.core.StandardService.start(StandardService.java:519)
> 	at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
> 	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:597)
> 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardContext
> loadOnStartup
> SEVERE: Servlet  threw load() exception
> java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
> 	at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1645)
> 	at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1491)
> 	at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10
> 95)
> 	at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
> 	at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
> 4350)
> 	at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4659)
> 	at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
> 91)
> 	at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
> 	at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
> 	at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
> 	at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
> 	at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
> 	at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
> 	at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
> 	at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
> t.java:119)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
> 	at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> 	at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
> 	at
> org.apache.catalina.core.StandardService.start(StandardService.java:519)
> 	at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
> 	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:597)
> 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Nov 17, 2010 3:46:56 PM org.apache.catalina.startup.HostConfig
> deployDescriptor
> INFO: Deploying configuration descriptor manager.xml
> Nov 17, 2010 3:46:56 PM org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive ROOT.war
> Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardContext
> listenerStart
> SEVERE: Exception sending context initialized event to listener instance of
> class com.manuals.vc.webapp.ApplicationListener
> java.lang.NoClassDefFoundError: org/apache/commons/dbcp/ConnectionFactory
> 	at
> com.manuals.vc.webapp.ApplicationListener.contextInitialized(ApplicationList
> ener.java:124)
> 	at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
> 4135)
> 	at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
> 	at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
> 91)
> 	at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
> 	at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
> 	at
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
> 	at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
> 	at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
> 	at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
> 	at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
> 	at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
> t.java:119)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
> 	at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
> 	at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> 	at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
> 	at
> org.apache.catalina.core.StandardService.start(StandardService.java:519)
> 	at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
> 	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:597)
> 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.commons.dbcp.ConnectionFactory
> 	at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1645)
> 	at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
> a:1491)
> 	... 25 more
> Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error listenerStart
> Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardContext start
> SEVERE: Context [] startup failed due to previous errors
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


FW: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.
I will have to swallow my pride with this question. I bet this is a very
easy issue, but for some reason I haven't found an answer.
I moved my JARs from the ".../tomcat/shared/lib" directory to the
"web-inf/lib" directory in the app itself, but it seems that the JARs there
are not being discovered by Tomcat. This is what the log says:


Nov 17, 2010 3:46:56 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 730 ms
Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Nov 17, 2010 3:46:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ROOT.war
Nov 17, 2010 3:46:56 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet action as unavailable
Nov 17, 2010 3:46:56 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Error loading WebappClassLoader
  context: 
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@2eb0a3f5
 org.apache.struts.action.ActionServlet
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1645)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1491)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10
95)
	at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
4350)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4659)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
91)
	at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
	at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
	at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
	at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
	at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at
org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:519)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardContext
loadOnStartup
SEVERE: Servlet  threw load() exception
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1645)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1491)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:10
95)
	at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
4350)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4659)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
91)
	at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
	at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
	at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
	at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
	at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at
org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:519)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Nov 17, 2010 3:46:56 PM org.apache.catalina.startup.HostConfig
deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Nov 17, 2010 3:46:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive ROOT.war
Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance of
class com.manuals.vc.webapp.ApplicationListener
java.lang.NoClassDefFoundError: org/apache/commons/dbcp/ConnectionFactory
	at
com.manuals.vc.webapp.ApplicationListener.contextInitialized(ApplicationList
ener.java:124)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
4135)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
91)
	at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
	at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
	at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
	at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740)
	at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
	at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
	at
org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
	at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
	at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
	at
org.apache.catalina.core.StandardService.start(StandardService.java:519)
	at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
	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:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.dbcp.ConnectionFactory
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1645)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1491)
	... 25 more
Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Nov 17, 2010 3:46:56 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [] startup failed due to previous errors


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


RE: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.
I'm doing it, thanks!

> -----Original Message-----
> From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com]
> Sent: Tuesday, November 16, 2010 04:27 PM
> To: Tomcat Users List
> Subject: RE: After manager says that there was a leak, how to use a
profiler?
> 
> > From: Brian [mailto:bbprefix-mail@yahoo.com]
> > Subject: RE: After manager says that there was a leak, how to use a
profiler?
> 
> > All my JARs are in the shared directory that Tomcat has.
> > Is that a problem?
> 
> Yes, that's a problem.  You very likely have some references in the shared
> classes that point to objects of one webapp or the other - and that will
> prevent their every being garbage collected.
> 
> Put the jars where they belong - in each webapp's WEB-INF/lib directory.
Disk
> is cheap, instability isn't.
> 
>  - 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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


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


RE: After manager says that there was a leak, how to use a profiler?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Brian [mailto:bbprefix-mail@yahoo.com] 
> Subject: RE: After manager says that there was a leak, how to use a profiler?

> All my JARs are in the shared directory that Tomcat has.
> Is that a problem?

Yes, that's a problem.  You very likely have some references in the shared classes that point to objects of one webapp or the other - and that will prevent their every being garbage collected.

Put the jars where they belong - in each webapp's WEB-INF/lib directory.  Disk is cheap, instability isn't.

 - 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.
All my JARs are in the shared directory that Tomcat has. I don't upload them
in the WAR everytime I deploye again my app.
Is that a problem? I have just read somewhere do it could actually be a
problem, that when they are shared among the apps, bad things happen.
I have basically two apps running, but are EXACTLY the same WAR, but they
run in different domain names. So they use the same JARs, and do exactly the
same. The other 20 WARs are just full of static HTML pages.



> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
> Sent: Tuesday, November 16, 2010 04:37 AM
> To: Tomcat Users List
> Subject: Re: After manager says that there was a leak, how to use a
profiler?
> 
> On 16/11/2010 04:12, Brian wrote:
> > Maybe my question sounded too vague and repetitive.
> > What I meant is something like this "Is the a class loader (or
> > something like that) than I should start analyzing? I mean, is there a
> > route I should follow in order to see which objects are stucked? If
> > the Tomcat Manager knows that something got stucked in the memory,
> how
> > does it know that? Is there a clue we should start?".
> 
> http://markmail.org/message/fcbvwapt6afyndxn
> 
> Mark
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


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


Re: After manager says that there was a leak, how to use a profiler?

Posted by Mark Thomas <ma...@apache.org>.
On 16/11/2010 04:12, Brian wrote:
> Maybe my question sounded too vague and repetitive.
> What I meant is something like this "Is the a class loader (or something
> like that) than I should start analyzing? I mean, is there a route I should
> follow in order to see which objects are stucked? If the Tomcat Manager
> knows that something got stucked in the memory, how does it know that? Is
> there a clue we should start?".

http://markmail.org/message/fcbvwapt6afyndxn

Mark


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


RE: After manager says that there was a leak, how to use a profiler?

Posted by Brian <bb...@yahoo.com>.
Maybe my question sounded too vague and repetitive.
What I meant is something like this "Is the a class loader (or something
like that) than I should start analyzing? I mean, is there a route I should
follow in order to see which objects are stucked? If the Tomcat Manager
knows that something got stucked in the memory, how does it know that? Is
there a clue we should start?". 

> -----Original Message-----
> From: Brian [mailto:bbprefix-mail@yahoo.com]
> Sent: Monday, November 15, 2010 10:58 PM
> To: users@tomcat.apache.org
> Subject: After manager says that there was a leak, how to use a profiler?
> 
> Hi,
> 
> 
> 
> After the Tomcat manager warns that there was a leak with one app what was
> stopped or undeployed, how do I use the profiler to investigate that? I
mean,
> that is the starting point to analize that? What should I look for?
> 
> 
> 
> Brian
> 
> 
> 
> 



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