tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <its_toas...@yahoo.com>
Subject Re: Fwd: unable to start web application in tomcat-solaris, same works in tomcat-windows
Date Wed, 02 Oct 2013 04:43:50 GMT
>________________________________
> From: Ravi Shankar <ravishankar356@gmail.com>
>To: users <users@tomcat.apache.org> 
>Sent: Tuesday, October 1, 2013 9:13 PM
>Subject: Fwd: unable to start web application in tomcat-solaris, same works in tomcat-windows
> 
>
>Hi there,
>Im developing web applications in tomcat ver 7 and running the same in my
>local machine which has windows xp OS. They seem to be running fine without
>issues.
>
>However client has provided their solaris servers and wanting me to deploy
>it in tomcat ver 7 installed on this server since due to high expected
>hits(whenever application is deployed to production) we were provided with
>solaris-tomcat servers.
>
>I tried to manually ftp (contents of application in webapps directory of
>windows) to solaris box and copied it to application folder created by
>client IT team. However when i start my application i get errors and my
>application does not seem to work as expected. Im sort of struggling on how
>to get this application working in solaris, which actually works in windows
>OS.
>
>Whenever i migrate from windows to solaris tomcat environment, are there
>any best practises i need to remember, and make sure they are in place so
>that there are no issues ?
>
>Appreciate your suggestions.
>
>Ravi



Ravi,

I don't have a lot of suggestions, but I do have a lot of questions.

1. What is the exact version of Tomcat 7?
2. What is the exact version of Java that you are running?
3. What are specific examples of some errors you are encountering?
   Please include actual log entries, and not summations.

The traditional way of deploying applications on Tomcat is through a WAR file. Please read
the following on how to deploy applications to Tomcat.

http://tomcat.apache.org/tomcat-7.0-doc/appdev/deployment.html


I'm a little suspicious of several things:

1. Creating a special directory on Solaris

Normally (unless you use contexts - see reference above), the web application should be placed
in the appBase directory as defined in server.xml. This is typically $CATALINA_BASE/webapps.

2. Runs on Windows but does not run on Solaris

Depending on the errors, this could be one of several things.

a) CLASSPATH issues
b) JNI libraries
c) JDBC drivers - if your application talks to a database
d) Permissions problems

Let's take these one at a time.

It's been my experience (and I'll probably get a talking-to for this) that Eclipse users tend
to mangle CLASSPATH settings in order to get web applications to work. All application resources
(except container managed resources) belong in one of two places:

WEB-INF/lib - for JAR files
WEB-INF/classes - for class files and other resources like log4j.xml

Eclipse in its normal settings will include these two directories on the build path, and copy
compiled classes to WEB-INF/classes. There should be no reason to alter the CLASSPATH.

JNI (Java Native Interface) is way to marry native code and Java code (loosely speaking).
Obviously native code compiled for Windows will not run on a Solaris system.

JDBC drivers enable your application to communicate with a database. If the database connection
is controlled by Tomcat (and you access it via a JNDI pooled connection - highly recommended),
you need to place the JDBC driver inside $CATALINA_BASE/lib. Otherwise, if you manage your
own database connections, the JAR containing the JDBC driver belongs with your other resources
- in WEB-INF/lib.

It's odd that the client's IT department created a special folder for your web application.
I wonder if the user running Tomcat has permissions to read the directory they created - and
that the permissions of the files you copied are proper as well.

If the above does not address your particular situation, then I'm afraid I'm at the end of
my crystal ball (mixed metaphors are fun). Please answer the questions posed at the beginning
of my reply, and hopefully others will have ideas.

. . . just my (procrastinating) 2 cents
/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message