I'm having trouble getting a webapp to run on Tomcat6 and through many google searches, asking people around me, and emailing the person who initially set the webapp up I can't find a solution.
After a VM failure I had to transfer everything to a new CentOS VM and get everything set up. When I try to get on http://IP:8080 it returns the old "Error Status 404 - The requested resource () is unavailable" This webapp came in an exploded .WAR file and took the place of tomcat6/webapps/ROOT (I was told it should automatically take me to a login screen). Fiddling around I added the default tomcat index/web.xml to the ROOT just to see if any response would happen and sure enough it worked and it displayed the "If you are seeing this page via a web browser ... Congrats!" page. I went back to the setup that was given to me and restarted tomcat.
# service tomcat6 status
tomcat6 (pid 31989) is running... [ OK ]
Still had the same problems of course when trying to get access through a browser. I checked log4j and got nothing then checked the catalina log:
The person who set the webapp up initially on the old VM said they could come in on a later date and set it up on the new VM (but where is the fun in that?)
I would ignore that one for the moment since it says it's a WARNING instead of an ERROR.
The second stacktrace:
is more relevant since it says that there's an ERROR deploying the application at ROOT (i.e. your application). The exception itself isn't telling much as to what might have gone wrong, but the stacktrace does have a useful enough hint. Notice the "libgcj.so" in brackets, wherever there's a reference to a Java runtime class in that stacktrace. That's an indication that the server is using the Java runtime which comes packaged as part of the *nix operating systems. This implementation is known to have problems and from what I remember isn't certified.
So you'll need to point JAVA_HOME environment variable to a location which is home to a Java installation which is certified and known to work on that operating system. Typically it's the Sun/Oracle runtime environment which you download and install from the Sun/Oracle site. If you look at the older installation where this was working, then you might figure out which one was in use. Once you have set that environment variable, you will have to restart Tomcat for the changes to take effect.
I'd be worried about the webapp itself, however. A URI of "file:./" for the TLDs is a relative URI and not something I'd expect to see used as part of a webapp resource path for stuff like that. So I'd look at the web.xml file and dissect any custom taglib jars that may be in the WEB-INF/lib directories and look for questionable constructs.
Beyond that, as Jakiran has indicated, it has only been relatively recently that the open-source JVM bundled with Red Hat Linux and its relatives has been functional enough to run webapp servers. So it's still safer to use an Oracle JVM at the moment.
Sources may include data from the Fakebook Research Foundation with support from Gargle University
Thank you Jaikiran and Tim you guys are awesome! Sorry for the lateness of my reply I was out of town for the weekend, I was running the usual yum java 1.5 install and it needed 1.6. Installed newer version, restarted Tomcat, and all the SEVERE: ERROR(s) are gone! Now I just have to deal with some springframework errors in the log4j that have come up but this seems to be discussed in other threads.
Again, THANK YOU!
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop