Hi there,
Please find my responses below.

Additionally after I start tomcat7 for application, jar files does not seem
to get loaded per *log* file contents & additionally im unable to access
application @ 
http://<ipaddress:port#>/client_app<http://10.52.32.102:25170/svuivr>.


Are there vast differences in the way we deploy tomcat applications in
windows & in solaris environments?

Request your suggestions.

Thanks
Rav


>________________________________
> From: Ravi Shankar <ravishankar356ATgmail.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
[Quoted text hidden]
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?
7.0.26

2. What is the exact version of Java that you are running?
*# java -version*
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01)
Java HotSpot(TM) Server VM (build 20.14-b01, mixed mode)

3. What are specific examples of some errors you are encountering?
   Please include actual log entries, and not summations.

i tried to deploy .WAR files to my windows tomcat and ftp'ed the contents
of webapps folder(client_application) into application directory in solaris
and started tomcat application, and i get below errors on .out log file.

*<logfile>.out details below:*

Oct 02, 2013 11:14:08 AM org.apache.catalina.startup.SetAllPropertiesRule
begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'maxSpareThreads' to '64' did not find a matching property.
Oct 02, 2013 11:14:08 AM org.apache.tomcat.util.digester.SetPropertiesRule
begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'debug' to '0' did not find a matching property.
Oct 02, 2013 11:14:09 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-25170"]
Oct 02, 2013 11:14:09 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1127 ms
Oct 02, 2013 11:14:09 AM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service <client_app>
Oct 02, 2013 11:14:09 AM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
Oct 02, 2013 11:14:09 AM org.apache.catalina.core.StandardContext
postWorkDirectory
WARNING: Failed to create work directory
[/work/tomcat/<client_app>/v1.0/work/<client_app>/localhost/work_tomcat_<client_app>]
for context [/work/tomcat/<client_app>]
Oct 02, 2013 11:14:09 AM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(/work/tomcat/<client_app>/current/webapps/<client_app>web/WEB-INF/lib/servlet-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
Oct 02, 2013 11:14:10 AM org.apache.catalina.util.SessionIdGenerator
createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using
[SHA1PRNG] took [219] milliseconds.
Initializing Data Sourcedata/conf/db.properties
Initializing DB connection pool
DB Configuration file path :
/work/tomcat/<client_app>/current/webapps/<client_app>web/data/conf/db.properties
dbClass : net.sourceforge.jtds.jdbc.Driver
Enter
Enter
Data Source created successfully
Initializing Application Parameters
Oct 02, 2013 11:14:11 AM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified:
/work/tomcat/<client_app>/v1.0/work/<client_app>/localhost/work_tomcat_<client_app>
is unusable.
Oct 02, 2013 11:14:11 AM org.apache.catalina.startup.HostConfig start
SEVERE: Unable to create directory for deployment:
/work/tomcat/<client_app>/v1.0/conf/<client_app>/localhost
Oct 02, 2013 11:14:11 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/work/tomcat/<client_app>/v1.0/webapps/<client_app>web
Oct 02, 2013 11:14:11 AM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(/work/tomcat/<client_app>/current/webapps/<client_app>web/WEB-INF/lib/servlet-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
Initializing Data Sourcedata/conf/db.properties
Initializing DB connection pool
DB Configuration file path :
/work/tomcat/<client_app>/current/webapps/<client_app>web/data/conf/db.properties
dbClass : net.sourceforge.jtds.jdbc.Driver
Enter
Enter
Data Source created successfully
Initializing Application Parameters
Oct 02, 2013 11:14:12 AM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified:
/work/tomcat/<client_app>/v1.0/work/<client_app>/localhost/<client_app>web
is unusable.
Oct 02, 2013 11:14:12 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-25170"]
Oct 02, 2013 11:14:12 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3073 ms



4) OS version
*SunOS wpsun1000 5.10 Generic_147147-26 sun4v sparc sun4v*


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/


On Tue, Oct 1, 2013 at 10:43 PM, Mark Eggers <its_toas...@yahoo.com> wrote:

> >________________________________
> > From: Ravi Shankar <ravishankar...@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-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to