aspose file tools*
The moose likes Tomcat and the fly likes Issues with Apache / Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Issues with Apache / Tomcat" Watch "Issues with Apache / Tomcat" New topic
Author

Issues with Apache / Tomcat

Bryan Baas
Greenhorn

Joined: Nov 16, 2004
Posts: 2
Any help with this would be greatly appreciated.

I am running Apache Tomcat/4.1.27-13 on Linux. The servlets directory /servlets is specfied as a Context in Server.xml and when I point a browser at http//foo.bar/servlets Tomcat does the right thing. Each servlet in /servlets is mapped in web.xml and when I point a browser at some small servlet http//foo.bar/servlets/HelloWorld Tomcat again does the right thing. For some larger servlets, however, I sometimes get the following:

HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception java.lang.NullPointerException... <rest of stack trace>

Sometimes the servlets run correctly and other times they crash as above. Each time the top of the exception stack contains a NullPointerException, but it's not always in the same place.

Many of the servlets depend upon an RMI server, but I've ruled RMI out as the problem.

I've also noticed that when the servlets die they leave two zombie child processes:
tomcat 21379 0.0 0.0 0 0 ? Z 09:10 0:00 [c++filt] <defunct>
tomcat 21380 0.0 0.0 0 0 ? Z 09:10 0:00 [addr2line] <defunct>
Ive looked these processes up: c++filt is a name demangler and addr2line converts between addresses and file names/offsets.

Someone suggested that it may be a heap problem, but I think that I would have gotten an OutOfMemoryException and not a NullPointerException if that were the case (??). I also considered that it might be some sort of timeout somewhere among Tomcat, Apache and Java. If this is the case, where might I begin looking for settings to adjust. I've tried settings in Server.xml and that did not seem to do the trick.

Any suggestion would be greatly appreciated.

Thanks,


Bryan
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Welcome at the Ranch, Bryan!

Your question doesn't really sound like a performance question. I guess they can give you better help in the Apache/Tomcat forum. Moving...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5278
    
  13

Originally posted by Bryan Baas:
Someone suggested that it may be a heap problem, but I think that I would have gotten an OutOfMemoryException and not a NullPointerException if that were the case (??). I also considered that it might be some sort of timeout somewhere among Tomcat, Apache and Java. If this is the case, where might I begin looking for settings to adjust. I've tried settings in Server.xml and that did not seem to do the trick.

Any suggestion would be greatly appreciated.

Thanks,


Bryan


To rule out if it is a OutOfMemoryException: you can adjust the JVM parameters to let Java use more then the standard 64 Kb, e.g. 512MB with -Xmx512
check here if it runs as a service.
check here if it doens't run as a service.

hope it helps.


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Issues with Apache / Tomcat