TomcatExpert

Apache/Tomcat 5.5 - Need someone who has good understanding of deploying war file/configuring context.xml

Current Products Installed - Windows 2008 SBS, Oracle 11d, Apache/Tomcat 5.5

3rd Party vendor came in, installed their package and it has been working for 8 months now, no installation notes available.

They sent an update which we are installing on a test backup server - this update patched Oracle Database schema, and put out an app.war file. I undeployed the old app and deployed the new one. It looks like it was successful but it is not, the application comes up and asks for username and password but says they are not valid, so I'm deducing that the database connector is incorrect.

I believe the issue has to do with the Tomcat Manager Deployment process. Either the web.xml and/or the context.xml needs close examination. If I could find out how the values in the live setup were specified in the original "deployment" or understand how to retrieve these values from the live system, then using the test system, put these values in the appropriate context.xml (seems like there is a hierarchical process of override). We are interested in working with someone technically competent in this process. Please contact us to discuss what kind of arrangement we can make to get this resolved quickly.

asked by it_jobcost.com

question

It is difficult to answer this question as there are still quite a few unknowns.  I'll will try to get you pointed in the right direction though.

First, when you say "It looks like it was successful but it is not", it is important to understand what is meant by "not successful".  Is the deployment failing?  For example, are you seeing any exceptions when the application is deployed? Any exceptions thrown during the deployment are major clues which would help you to understand what is wrong with the application.

Second, you mentioned that you are "deducing that the database connector is incorrect".  Again, it is important to understand what is incorrect about it?  Is the DataSource failing to connect to your Oracle database?  Are there any exceptions logged by the application?  Or is the query simply running, but not returning the expected result?  Some of these questions can be answered by looking at the log files, however it is also important to double check basics.  Is your database configuration is pointing to the right database?  Does that database contain valid data?  If that still does not help, try logging the queries that are being executed by the application.  Perhaps that can help to determine what is failing.

As for your additional questions...

Q.  If I could find out how the values in the live setup were specified in the original "deployment"
A.  You can simply look at your working installation.  The running web application would be deployed to the "webapps" directory.  The web.xml file would be located under "webapps/your-app-name/WEB-INF/web.xml".  The context.xml file is a little trickier as it could be located in a couple different spots.  The typical locactions would be "webapps/your-app-name/META-INF/context.xml", "conf/Catalina/localhost/your-app-name.xml" or just "conf/context.xml" (see below for more details).

Q.  understand how to retrieve these values from the live system
A.  If your live system is running with JMX enabled, you could connect to it with jconsole or jvisualvm and inspect the server and application's running configuration.

Q.  these values in the appropriate context.xml (seems like there is a hierarchical process of override)
A.  As I mentioned before, the "context.xml" file can live in a couple different places.  This is fully documented at the following link.

     https://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Introduction

Hope that helps to get you pointed in the right direction.

answer

answered by dmikusa on February 8, 2012 10:48 AM

Daniel Mikusa is a Software Support Engineer at Pivotal.  Daniel has been a user of Apache Tomcat for the past six years and is currently focused on providing enterprise-class support for Pivotal's Tomcat and tc Server customers. Daniel attended college at Kent State University and holds a bachelor's degree in Computer Science.

Comments

problems with my contexts in samba

Good afternoon,

I can not find where to create a new question so that I do here. If I have to run to another place I will fast.

my problem is as follows:
We have 2 servers suse 11 with a tomcat 5.5 instance on each. They work normally. At node 01 have installed a samba with 2 Filesystems (/ COMMON / DOC_REPOS) mounted locally that are synchronized with the node 02. Filesystem in / COMMON we shared contexts that use multiple applications that have installed. Specifically, we will discuss the docs.xml, styles.xml and images.xml. The problem arises when an application re-deployed in the two instances. the file is copied. war in both instances and disappear at node 02 three contexts mentioned above.
Can anyone throw some light, please?
I guess it is related to the samba but not sure.
thank you very much in advance.

regards

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.