Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it, follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!

Apache Tomcat is being an asshole, help!

Jimmy KingJimmy King Registered User regular
I have a web app I developed some time ago using Java that runs on Tomcat. It used to work just fine. A couple of months back I had to move to a new server and am just now setting Tomcat back up. It doesn't work anymore. The previous server was Debian 4 using Sun's Java since Tomcat hated gcj. This server is Debian 5 and is using gcj rather than Sun's implementation since Tomcat starts up with no issues using gcj this time. Both servers had Tomcat 5.5.

My app, of course, is exactly the same. I just copied the .war file and let her rip. Tomcat sees it, extracts it with no issues, etc. So I know everything is ok there. The server configuration is also the same. I had just backed up the old config files, so all I had to do was copy and paste the relevent bits of configuration. In case I missed something, I also tried just dropping the entire old server.xml in place.

Unfortunately, when I try to actually access the site, Tomcat is being a dick and says that it can't find my classes no matter what I do. Tomcat does not tell me any sort of local path where it's looking for my classes, just that it can't find the class. Is there any way I can make it tell me where it thinks my classes should be?

First load of a page I get an error like so as the root cause:
Spoiler:

After that, I get the standard Tomcat 404 error stating that the servlet is unavailable.

Server config stuff is as follows:

In my server.xml:
Spoiler:

As I said previously, Tomcat find the .war file in /home/justin/public_html/games.bash-shell.net/javaWARs and unpacks it properly to /home/justin/public_html/games.bash-shell.net/javaWARs/WebEngine/. All of the classes are there, the app's web.xml is there, etc. That's all in place and is exactly what worked on the old server with the same config.

Any ideas on what I may have missed? Is there a way I can tell Tomcat to tell me what local file path it's looking for my classes in?

Jimmy King on

Posts

  • Jimmy KingJimmy King Registered User regular
    edited February 2010
    Issue resolved. This can be locked.

    Here's the deal, in case anyone else goes through this.

    1) Debian tries to use gcj with Tomcat. It seems it still doesn't fucking work. It's just less broken since Tomcat will actually start up. Use the real Sun Java stuff.

    2) Once it's up and running, most Java libraries get stuck in /usr/share/java. Unfortunately, Tomcat can't find them there. You need to create symlinks to them in /usr/share/tomcat5.5

Sign In or Register to comment.