Diagnosing Tomcat memory usage

2007-10-10 Thread Andrew Hole
I've an java application running under tomcat and in the last week memory usage increase 50%, from 200M to 400M. I want to know exactly why this happens. Some suggestion? Thanks a lot - To start a new topic, e-mail:

Re: Diagnosing Tomcat memory usage

2007-10-10 Thread Lyallex
Try Lambda Probe as recommended by other contributors to this list. http://www.lambdaprobe.org/d/index.htm I'm no expert with this tool but it's straightforward to install and I think it may help you out a bit. The System Information/Memory Utilization thing is particularly fascinating although

How to write a custom realm?

2007-10-10 Thread quanxin zhu
Hi, Everyone, Where could I find the document of how to write a custom realm? Many Thanks! zhu

Re: OOME crushing tomcat

2007-10-10 Thread Rainer Jung
The nature of OOMEs is, that they can happen in every part of the code, that needs a new peace of memory. No one is able to write code in a way, that can handle memory allocation failures in all places new memory is needed. If you run into an OOME, it is very unwise to let the JVM run along,

How to share tomcat sessions across multiple IE windows

2007-10-10 Thread Adam Lipscombe
Folks, Apologies, this is not strictly a tomcat question but I wonder if anyone else has run into it and has a solution. My app spawns another window to display help, via the window.open() javascript call. The new window does not share the same session as the original, the session ID is

host-manager

2007-10-10 Thread ben short
Hi, I was trying out the host-manager last night and wanted to confirm what I was seeing is expected behaviour. I created a new virtual host and deployed a war to it. All when OK and when using the test.domain.com url I could access the war deployed to the virtual host. But after I restarted

problem with tomcat and odbc

2007-10-10 Thread Baptiste Lemarie
hi there, i have problem with tomcat5.5 When i want to install webbyfiles project in using jsp page (install.jsp), i have an error. [unixODBC][Driver Manager]Data source name not found, and no default driver specified but if i do this: $isql Default that's works I think it's a problem of

Native Library Not found

2007-10-10 Thread Arun
Hi , On starting my tomcat 6, it says INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:

Re: Native Library Not found

2007-10-10 Thread Arun
This is my full startup log. [EMAIL PROTECTED]:~# pkill -9 java [EMAIL PROTECTED]:~# catalina run Using CATALINA_BASE: /usr/local/bin/apache-tomcat-6.0.13 Using CATALINA_HOME: /usr/local/bin/apache-tomcat-6.0.13 Using CATALINA_TMPDIR: /usr/local/bin/apache-tomcat-6.0.13/temp Using JRE_HOME:

Re: How to share tomcat sessions across multiple IE windows

2007-10-10 Thread Mark Thomas
When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. This is known as thread hijacking and to many of the list archiving services and mail clients used by list subscribers this makes your new message

Re: Using RequestDispatcher.include() outside of Request/Response cycle.

2007-10-10 Thread Konstantin Kolinko
Hi, Andrei! You may consider looking at existing mock implementations of HttpServletRequest/Response that are available. For example, Spring Framework (http://springframework.org) has org.springframework.mock.web.MockHttpServletRequest, org.springframework.mock.web.MockHttpServletResponse Those

Re: Native Library Not found

2007-10-10 Thread Konstantin Kolinko
What is this. I am getting an outofmemory error on running QuartzScheduler. Does this has anything to do with that? No, Apache Tomcat Native library is not related to your out-of-memory errors. You may note, that the message shows even if you do not have your webapp deployed.

[OT] RE: How to share tomcat sessions across multiple IE windows

2007-10-10 Thread Peter Crowther
From: Adam Lipscombe [mailto:[EMAIL PROTECTED] My app spawns another window to display help, via the window.open() javascript call. The new window does not share the same session as the original, the session ID is always different. Occasionally the ID of the new window is that of a

RE: Very Long Full GC after Inactivity

2007-10-10 Thread Peter Crowther
From: Bill Clarke-Fields [mailto:[EMAIL PROTECTED] If it turns out to be so, is there anything I can do to force it to not page out the JVM heap? There's cheap and there's messy :-). The cheap way: Set up a job that runs overnight that exercises your app. It should keep the critical files

Re: How to share tomcat sessions across multiple IE windows

2007-10-10 Thread Adam Lipscombe
Sorry. My mistake Mark Thomas wrote: When starting a new thread (ie sending a message to the list about a new topic) please do not reply to an existing message and change the subject line. This is known as thread hijacking and to many of the list archiving services and mail clients used by list

Re: Native Library Not found

2007-10-10 Thread Arun
Ok, right. I want to fix this. Looks like it has something to do with tomcat performance as such. On 10/10/07, Konstantin Kolinko [EMAIL PROTECTED] wrote: What is this. I am getting an outofmemory error on running QuartzScheduler. Does this has anything to do with that? No, Apache

Re: Perl Permissions on Tomcat

2007-10-10 Thread Li Ye Chen
Yes, if you mean enabling the file server/lib/servlets-cgi.jar... -Original Message- Date: Mon Oct 09 18:25:12 EDT 2000 From: Martin Gainty [EMAIL PROTECTED] Subject: Re: Perl Permissions on Tomcat To: Tomcat Users List users@tomcat.apache.org I asked yesterday but didnt hear

Re: Perl Permissions on Tomcat

2007-10-10 Thread Li Ye Chen
I assume it's a permission problem since: 1) I'm trying to run script A (the script with the problem), and 2) script B ran with no problems at all, but 3) script A also ran with no problems if executed from the command line directly instead of in the browser via Tomcat server... both scripts A

Classloader - WEB-INF/lib

2007-10-10 Thread Albert Greinoecker
Hi, I have a problem concerning the classloader tomcat is using, When I try to load a class dynamically, which is located witihn a jar-archive under /WEB-INF/lib with class.forName(full_class_name), an exception is thrown. If the class is located at WEB-INF/classes, everything works fine. As

Re: Classloader - WEB-INF/lib

2007-10-10 Thread David Smith
Could you post more info -- e.g. tomcat version, jvm version, class package and name you are trying to load, any relevant stack traces in the logs, etc., ... --David Albert Greinoecker wrote: Hi, I have a problem concerning the classloader tomcat is using, When I try to load a class

Re: Setting up Tomcat instance ..HELP !!!

2007-10-10 Thread Bruno Vilardo
Naveen, First you need to download the Tomcat. Then you need to extract it on the directory you wish to install it. Then you will need to configure some configuration files, like Server.xml, Tomcat-Users.xml and so on. If you go to the Tomcat WebPage, you will find many documentation on how to

RE: Native Library Not found

2007-10-10 Thread Caldarale, Charles R
From: Arun [mailto:[EMAIL PROTECTED] Subject: Native Library Not found INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: That's just an informational message indicating that APR is not installed.

Setting up Tomcat instance ..HELP !!!

2007-10-10 Thread Quodras, Naveen
Could some body let me know how to go about setting upa Tomcat instance on linux

Re: Native Library Not found

2007-10-10 Thread Arun
I am running it on an unbunt machine. I do not get the OutOfMemory error on my development machine which is Windows. I think as somebody else has said that a profiler is a good way to start with. I am running my tomcat from a putty. Can you give me an idea of which profiler I can use. Will the

Re: Classloader - WEB-INF/lib

2007-10-10 Thread Albert Greinoecker
I'm sorry I just found out that the cause of the failure described below lies one step before the class.forName-statement. Before I'm trying to load the classes with ClassLoader cld [...] URL resource = cld.getResource('path/to/the/class/file.class'); so it's clear to me that this cannot work

RE: Classloader - WEB-INF/lib

2007-10-10 Thread Martin Gainty
Hi AlbertWhich classloader you want depends on where you loaded your jarTake a look at http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html HTH/Martin Gainty__Disclaimer and confidentiality noteEverything in this e-mail and any

Re: Anonymous access with Tomcat Authentication configured.

2007-10-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Barry, Propes, Barry L wrote: is the bottom line that he (Semen's) wanting certain areas protected by a role, and other areas protected/accessible only by another role? Sounds like he wants user-level authorization, which Tomcat just doesn't do.

Re: Very Long Full GC after Inactivity

2007-10-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, Peter Crowther wrote: The messy way: Run Tomcat as an admin (ick!) and make a JNI call to some native code that pins Tomcat's address space into RAM. Messy indeed. I have not tried this, don't know whether there's a correct JVM way of

Re: Classloader - WEB-INF/lib

2007-10-10 Thread David Smith
Can you post the actual relevant lines of code? Also, I suspect for classes, Class.forName() is enough -- no need to find the class first w/ Classloader.getResource( ... ). --David Albert Greinoecker wrote: I'm sorry I just found out that the cause of the failure described below lies one

Different jar version

2007-10-10 Thread Andrew Hole
What happens if I put different jar versions of same classes on WEB-INF/lib? Example: project.jar (new version) project_old.jar (old version) Tomcat load and use both? Could Tomcat be confused with this situation? Thanks a lot

Re: Native Library Not found

2007-10-10 Thread Arun
Why does my container thread gets shutdown.Is there anyway I can stop that. I tried using the profiler webapp(Lamda Probe). But Since the container shuts down I am not able to use that. On 10/10/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Arun [mailto:[EMAIL PROTECTED] Subject:

RE: Very Long Full GC after Inactivity

2007-10-10 Thread Peter Crowther
From: Christopher Schultz [mailto:[EMAIL PROTECTED] My experience with JNI is that you have to pin objects one at a time. To be clear: I wasn't talking about pinning Java objects to particular addresses in memory, instead pinning the entire process address space into memory using Win32 API

RE: Very Long Full GC after Inactivity

2007-10-10 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:[EMAIL PROTECTED] Subject: Re: Very Long Full GC after Inactivity My experience with JNI is that you have to pin objects one at a time. Peter's not talking about the JNI pin function, which only prevents objects from moving around in the JVM heap, not in

Re: How to write a custom realm?

2007-10-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zhu, quanxin zhu wrote: Where could I find the document of how to write a custom realm? Realm is just an interface: http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/Realm.html Fortunately, there's a RealmBase class

RE: Different jar version

2007-10-10 Thread Peter Crowther
From: Andrew Hole [mailto:[EMAIL PROTECTED] What happens if I put different jar versions of same classes on WEB-INF/lib? Example: project.jar (new version) project_old.jar (old version) Tomcat load and use both? Could Tomcat be confused with this situation? Each time a class is

Re: Different jar version

2007-10-10 Thread Tim Funk
It uses the first version of the class it finds when findClass is called. First version depends on which jar it looks in first. There is no defined order in which jars should be read first. So the behavior of Tomcat would be like any other java application - unknown. -Tim Andrew Hole wrote:

Re: Different jar version

2007-10-10 Thread David Delbecq
The question is better what happen if you have 2 classes with same name and package in the same classloader? Knowing which of both classes will be indeed loaded and used when need is undetermined. Only one of those classes will be used, but it there is no rule as to which will be used. This is

RE: Different jar version

2007-10-10 Thread Caldarale, Charles R
From: Andrew Hole [mailto:[EMAIL PROTECTED] Subject: Different jar version What happens if I put different jar versions of same classes on WEB-INF/lib? Really Bad Things. Could Tomcat be confused with this situation? Yes, as is the person who did such a thing. Depending on the order

RE: Native Library Not found

2007-10-10 Thread Martin Gainty
Hello ArunConfirm your environment is identical between 2Ubuntu has same jvm/jre, same JAVA_OPTS, same RAM as dev boxTake a look at Jprobe that chuck suggested earlier to determine which class/method is consuming memory without release

How do I run Tomcat as a non-root user?

2007-10-10 Thread Rob Tanner
Hi, How do I run Tomcat as a non-root user? I need to be able to bind to ports 80 443 which are privileged ports. I know that with straight Apache the user that it runs as is configured in httpd.conf. It starts up as root, binds to the ports and then drops its privileges. However, I'm

Re: Different jar version

2007-10-10 Thread Andrew Hole
I'm getting OutofMemoryError ... Could have some relationship having two different versions of jar and memory leak? Thanks On 10/10/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Andrew Hole [mailto:[EMAIL PROTECTED] Subject: Different jar version What happens if I put different

RE: Native Library Not found

2007-10-10 Thread Eric Fu
fsdfs -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: 2007年10月10日 23:12 To: Tomcat Users List Subject: RE: Native Library Not found Hello ArunConfirm your environment is identical between 2Ubuntu has same jvm/jre, same JAVA_OPTS, same RAM as dev boxTake a look at

RE: Tomcat connections not closing.

2007-10-10 Thread Roark, Mike
I did try this, but it didn't have an effect. I did notice that reads would timeout, but not writes. We were already using the default value of 6 (60 secs), but our problem is around the 15 minute mark (of writing). -Mike -Original Message- From: Roark, Mike

Re: How do I run Tomcat as a non-root user?

2007-10-10 Thread Alexey Solofnenko
Look there: http://wiki.apache.org/tomcat/HowTo#head-18d1c3f3fa702a1be769340784515eecce6e0ac9 . - Alexey. Rob Tanner wrote: Hi, How do I run Tomcat as a non-root user? I need to be able to bind to ports 80 443 which are privileged ports. I know that with straight Apache the user that

java.util.timer firing twice

2007-10-10 Thread David kerber
Running tomcat 5.5.15 on Sun JRE 1.5.0_12 I have a situation where a java.util.timer object scheduled to run once per day (by using .scheduleAtFixedRate) is firing two times at once, and it's driving me crazy trying to figure out why. The code excerpts below are my current attempt, but I

Re: Different jar version

2007-10-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, Andrew Hole wrote: I'm getting OutofMemoryError ... Could have some relationship having two different versions of jar and memory leak? It's very unlikely. As other posters have said, either one class gets loaded or the other one does, not

Re: How do I run Tomcat as a non-root user?

2007-10-10 Thread Markus Schönhaber
Rob Tanner schrieb: How do I run Tomcat as a non-root user? I need to be able to bind to ports 80 443 which are privileged ports. I know that with straight Apache the user that it runs as is configured in httpd.conf. It starts up as root, binds to the ports and then drops its

Re: How do I run Tomcat as a non-root user?

2007-10-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rob, Rob Tanner wrote: How do I run Tomcat as a non-root user? I need to be able to bind to ports 80 443 which are privileged ports. I know that with straight Apache the user that it runs as is configured in httpd.conf. It starts up as root,

RE: Problem with session

2007-10-10 Thread Alex79
Hi, I finally found out what the problem was. There is nothing stored in the session (I tried the SessionListener from tomcat 5.5.25 in my tomcat version, it worked - I saw contextInitialized entries in the standard context log) but I never saw any sessioncreated - nor destroyed - event. By

RE: Different jar version

2007-10-10 Thread Caldarale, Charles R
From: Andrew Hole [mailto:[EMAIL PROTECTED] Subject: Re: Different jar version I'm getting OutofMemoryError ... Could have some relationship having two different versions of jar and memory leak? Not likely, but it really depends on how your classes interact. Instead of indulging in rather

RE: Native Library Not found

2007-10-10 Thread Caldarale, Charles R
From: Arun [mailto:[EMAIL PROTECTED] Subject: Re: Native Library Not found Why does my container thread gets shutdown. Because it ran out of memory - that should be obvious. Is there anyway I can stop that. Fix your memory leak. I tried using the profiler webapp(Lamda Probe). Lambda

RE: java.util.timer firing twice

2007-10-10 Thread Caldarale, Charles R
From: David kerber [mailto:[EMAIL PROTECTED] Subject: java.util.timer firing twice I have a situation where a java.util.timer object scheduled to run once per day (by using .scheduleAtFixedRate) is firing two times at once Any chance your webapp has actually been deployed twice, causing

Re: Native Library Not found

2007-10-10 Thread Arun
Ok, Help!! I do not have an OutOfMemory erro when running tomcat from myeclipse. I am running JDK1.5 and tomcat6. But in my ubuntu I have jdk1.6 and tomcat6.0 and I have an OutOfMemory problem why? When the server starts up itself the contianer shuts down and logs the OutOfMemory error. But why

Re: Native Library Not found

2007-10-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Arun, Arun wrote: Ok, Help!! I do not have an OutOfMemory erro when running tomcat from myeclipse. I am running JDK1.5 and tomcat6. But in my ubuntu I have jdk1.6 and tomcat6.0 and I have an OutOfMemory problem why? Compare your memory

RE: java.util.timer firing twice

2007-10-10 Thread Caldarale, Charles R
From: David kerber [mailto:[EMAIL PROTECTED] Subject: Re: java.util.timer firing twice Now to come up with a workaround; I should be able to just check to see which context the timer is running under in the, and bail out if it's not the one I want, shouldn't I? Why don't you fix the real

Re: Tomcat connections not closing.

2007-10-10 Thread Filip Hanik - Dev Lists
Roark, Mike wrote: I did try this, but it didn't have an effect. I did notice that reads would timeout, but not writes. We were already using the default value of 6 (60 secs), but our if you are using defaults, then you are not using the correct settings, |disableUploadTimeout defaults

Re: java.util.timer firing twice

2007-10-10 Thread David kerber
That's got to be it; I have the app deployed (intentionally) both at its own context root, and as the ROOT context. It never crossed my mind that that would screw up my timers, though it certainly should have. Now to come up with a workaround; I should be able to just check to see which

Re: Native Library Not found

2007-10-10 Thread Arun
Chris, I do not have any additional memory add ons on JAVA_OPTS on both sides. My Quartz scheduler is a spring bean and works from inside the weapp on both sides. My app starts and works well in myeclipse' tomcat. I have given the start logs, at the beginning of the mail. Will put here once

Re: Native Library Not found

2007-10-10 Thread Arun
Chris, Let me try installing Jdk1.5 and make same version on both sides. But I need to use jdk1.6 as I need some of the features. On 10/10/07, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Arun, Arun wrote: Ok, Help!! I do not have an

RE: Native Library Not found

2007-10-10 Thread Caldarale, Charles R
From: Arun [mailto:[EMAIL PROTECTED] Subject: Re: Native Library Not found *Exception in thread DefaultQuartzScheduler_Worker-1 java.lang.OutOfMemoryError: PermGen space To quote from the Tomcat FAQ (http://tomcat.apache.org/faq/memory.html): If you have a lot of servlets or JSP's, you

Error createing context using Admin in Tomcat 5.5.25

2007-10-10 Thread David Zhao
Hi there, I used to be able to create context using Admin application by inputing the full path information in the docBase, and save and commit changes if I want this to survive server restart in Tomcat 5.5.15. However, I couldn't do the the same thing in my new tomcat server instance of 5.5.25,

placing jars in /server/lib - can cause oome?

2007-10-10 Thread A C
We've been experiencing horrendous OOMEs recently after deploying 40 clones of a vendor's .war file which encompasses their application/portal. The context is about 100MB Our customized piece of the puzzle is quite small. We place the jTDS jar for a quick database connection tha'ts made to

Re: How to write a custom realm?

2007-10-10 Thread Nicholas Sushkin
You can take a look at Tomcat's own realms in http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/ Also, take a look at my AccountLockoutDatasourceRealm at

RE: placing jars in /server/lib - can cause oome?

2007-10-10 Thread Caldarale, Charles R
From: A C [mailto:[EMAIL PROTECTED] Subject: placing jars in /server/lib - can cause oome? We've been experiencing horrendous OOMEs recently after deploying 40 clones of a vendor's .war file which encompasses their application/portal. You're a tad short on specifics: Tomcat version,

Re: Native Library Not found

2007-10-10 Thread Arun
See my localmachine's tomcat logs INFO: JK: ajp13 listening on /0.0.0.0:8009 Oct 10, 2007 10:39:06 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/60 config=null Oct 10, 2007 10:39:06 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 31934 ms Hibernate:

Re: How do I run Tomcat as a non-root user?

2007-10-10 Thread Rob Tanner
Marcus, I downloaded it and also applied the patch to eliminate the Cannot execute JSVC executor process error. But here's the catch, and maybe you know the answer. The machine and the OS (Fedora) are 64bit but the Java runtime is 32bit. In order for jsvc to make use of the shared libs,

Re: How do I run Tomcat as a non-root user?

2007-10-10 Thread Markus Schönhaber
Rob Tanner wrote: I downloaded it and also applied the patch to eliminate the Cannot execute JSVC executor process error. Why didn't you use the sources you already had? But here's the catch, and maybe you know the answer. The machine and the OS (Fedora) are 64bit but the Java

Re: placing jars in /server/lib - can cause oome?

2007-10-10 Thread Pid
Christopher Schultz wrote: A C, A C wrote: We've been experiencing horrendous OOMEs recently after deploying 40 clones of a vendor's .war file which encompasses their application/portal. The context is about 100MB Lesee... 100 MB times 40 instances .. mm... carry the 7 ... hey, that's

Re: Perl Permissions on Tomcat

2007-10-10 Thread Mark Thomas
Li Ye Chen wrote: Apparently, it may also be a speed issue, since there was once when I ran script A and after a while, I stopped the transmission -- there was actually a partial output from the script. How long does script A take to run? Mark

RE: Native Library Not found

2007-10-10 Thread Martin Gainty
send the following files (send as attachments) to me offline1)/WEB-INF/applicationContext.xml2)any files that are imported by applicationContext.xml3)any files that are imported from each of the imported files from step 24)the value clause for the configLocation property for hibernate.cfg.xml

Re: How do I run Tomcat as a non-root user?

2007-10-10 Thread Rob Tanner
Marcus, I was able to resolve the make by doing the last compile step manually. As far as why a 32 bit JVM or a 64 bit machine, that only applies to my development system (which is my desktop). Our production servers are 32 bit systems. The problem with a 64 bit JVM on my development box

Re: Native Library Not found

2007-10-10 Thread Filip Hanik - Dev Lists
java.lang.OutOfMemoryError: PermGen space just increase your permgen size -XX:MaxPermSize=256m Filip Arun wrote: Nope no use. Same error on JDk1.5 INFO: Server startup in 39569 ms Oct 10, 2007 11:05:31 PM org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler process SEVERE: Error

Re: How to write a custom realm?

2007-10-10 Thread Tim Funk
With any luck - this will be accurate enough: http://www.jroller.com/funkman/entry/howto_create_a_realm_in -Tim On Wednesday 10 October 2007, quanxin zhu wrote: Hi, Everyone, Where could I find the document of how to write a custom realm?

Re: Diagnosing Tomcat memory usage

2007-10-10 Thread Filip Hanik - Dev Lists
plug in a profiler, I use www.yourkit.com, you can get memory stats, like the ones you wish for, live. other profilers will do the job as well Filip Andrew Hole wrote: I've an java application running under tomcat and in the last week memory usage increase 50%, from 200M to 400M. I want to