LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Tomcat Deployment Issues (http://www.linuxquestions.org/questions/linux-server-73/tomcat-deployment-issues-674848/)

Tyler_H72 10-07-2008 01:09 PM

Tomcat Deployment Issues
 
I am having some issues with Tomcat. I am trying to use one of my servers for testing purposes, and am (eventually) going to have automatic deployments of the latest code submitted to my Subversion repository running on this server. I would also like to have an older, stable copy running at all times for customers to try out. For some reason, however, I am having problems deploying them both at the same time. I have created 2 war files, each named differently (one is myApp and one is developmentbuild). I think that the issue stems from the fact that they are the same app (and at this point the same version). I deployed myApp, and it worked fine. I deployed developmentbuild, and I got a 404 error from tomcat when I tried to go to it. I removed myApp, and I could get to developmentbuild just fine. What's more, I have a third war file (completely different application) running, which has no problems whatsoever no matter what other wars I have running. I have searched extensively and found no information that really helped at all. I checked my logs, and the only error that I found (other than one that I already fixed) was that there is some error regarding tld listeners, but from what I found on Google, that seemed to be trivial. If anyone has ANY information at all, I'd REALLY appreciate it, as this is stressing me out to no end- not 10 minutes ago, I had to be physically restrained from stabbing my monitor with a soldering iron. Please help!

Mega Man X 10-08-2008 03:42 PM

Quote:

Originally Posted by Tyler_H72 (Post 3303068)
I am having some issues with Tomcat. I am trying to use one of my servers for testing purposes, and am (eventually) going to have automatic deployments of the latest code submitted to my Subversion repository running on this server. I would also like to have an older, stable copy running at all times for customers to try out. For some reason, however, I am having problems deploying them both at the same time. I have created 2 war files, each named differently (one is myApp and one is developmentbuild). I think that the issue stems from the fact that they are the same app (and at this point the same version). I deployed myApp, and it worked fine. I deployed developmentbuild, and I got a 404 error from tomcat when I tried to go to it. I removed myApp, and I could get to developmentbuild just fine. What's more, I have a third war file (completely different application) running, which has no problems whatsoever no matter what other wars I have running. I have searched extensively and found no information that really helped at all. I checked my logs, and the only error that I found (other than one that I already fixed) was that there is some error regarding tld listeners, but from what I found on Google, that seemed to be trivial. If anyone has ANY information at all, I'd REALLY appreciate it, as this is stressing me out to no end- not 10 minutes ago, I had to be physically restrained from stabbing my monitor with a soldering iron. Please help!

The only thing I can think about, assuming that your Tomcat server is the exactly same version on both the Test and Production servers, is that whatever Action/JSP/Whatever that your should display first (ex: index.jsp) is not correctly mapped on your web.xml file. I'd start checking there for anything that appears to be wrong. Relative and absolute paths are a very common error.

Well, that is where I'd start looking at. A 404 error just says that the client hit the server fine, but the server was unable to return the request to the client.

X

Tyler_H72 10-08-2008 05:43 PM

Quote:

...your Tomcat server is the exactly same version on both the Test and Production servers...
I apologise- I was unclear before. Both deployments are running on the same server, on the same instance of Tomcat. There is not production release available as of yet- the "stable" version I will be running is solely for the benefit of the customer that we are building the site for.

Quote:

...whatever Action/JSP/Whatever that your should display first (ex: index.jsp) is not correctly mapped on your web.xml file...
This doesn't seem to be a problem, as the paths are all relative and seem to be correct- granted I don't know much about these things at all- although there is one thing that looked odd to me. I'm not sure what kind of problems this can cause, if any, but the <display-name> of each instance is the exact same. As I said, I don't know much about this topic, so I'm not sure what that parameter does, or if it even matters.

Quote:

A 404 error just says that the client hit the server fine, but the server was unable to return the request to the client.
An additional symptom (or at least something that struck me as odd)- in the 404 error, under description, it says "The requested resource () is not available." This seems strange, as in my admittedly limited experience with Tomcat I seem to remember all of my 404 errors listing an actual relative path here. Thanks for the help!

bathory 10-09-2008 03:04 AM

I'm not a tomcat expert either, but afaik you cannot deploy more applications to the same uri. You can deploy the 1st on /stable for example and the second on /develop and see they work together

Tyler_H72 10-09-2008 12:06 PM

Quote:

Originally Posted by bathory (Post 3304945)
I'm not a tomcat expert either, but afaik you cannot deploy more applications to the same uri. You can deploy the 1st on /stable for example and the second on /develop and see they work together

I'm actually trying to do exactly that- when I said I had them both on the server, I did not mean that I wanted them both on the same url, but rather that they are on the same machine and the same tomcat instance, and I would like to be able to reach them both at the same address with a directory appended to the end, e.g. 127.0.0.1:8080/myApp and 127.0.0.1:8080/testApp

Tyler_H72 10-09-2008 07:14 PM

I actually solved the problem myself. The problem involved one particular variable in the web.xml file that was identical in both deployments. Once I changed it (and increased the heap size), they worked fine. Thanks for all the suggestions!


All times are GMT -5. The time now is 12:51 AM.