Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 37FDC10847 for ; Wed, 2 Oct 2013 17:12:55 +0000 (UTC) Received: (qmail 31614 invoked by uid 500); 2 Oct 2013 17:12:43 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 31534 invoked by uid 500); 2 Oct 2013 17:12:37 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 31334 invoked by uid 99); 2 Oct 2013 17:12:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Oct 2013 17:12:35 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ravishankar356@gmail.com designates 209.85.220.46 as permitted sender) Received: from [209.85.220.46] (HELO mail-pa0-f46.google.com) (209.85.220.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Oct 2013 17:12:31 +0000 Received: by mail-pa0-f46.google.com with SMTP id fa1so1310025pad.33 for ; Wed, 02 Oct 2013 10:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Riz62cELXcUjxHFg3LvnXd6GUyXnOgfLteDGJDgWVgA=; b=dC9C137PKoePoF+fnLUGj9pGLgt6T9XexPOenqFe7BlvNpsXezP3HY2eGBxruvDGyJ ZXMNYVm1urGqQLSNshQZg4CFI4ImUHLvEp7jq0jAeSQl+xZp4BIUaDcTdvXBcJ5wMpv0 S7/sHIeRH3gDQRopzS8rj4jvPPLc0qDZKQN9MgtFtfP9bjs4ci8VZnZ6pgP8TToN6gfC VEPCuqvRTFie2MT+HtSnjiBOCRNWIm2rn1AMIFLoLwjTpGK5tJpAQH7W7U58Hnx/aYfv V04mFbInvc7xUIYHnfBIqQoKtqOlqOmH54CnnATGKwseRMdrCR1JOir3Ell5Q7DjRvW3 49iQ== X-Received: by 10.66.219.233 with SMTP id pr9mr4338018pac.45.1380733930288; Wed, 02 Oct 2013 10:12:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.70.63.70 with HTTP; Wed, 2 Oct 2013 10:11:50 -0700 (PDT) In-Reply-To: <1380689030.64096.YahooMailNeo@web120706.mail.ne1.yahoo.com> References: <1380689030.64096.YahooMailNeo@web120706.mail.ne1.yahoo.com> From: Ravi Shankar Date: Wed, 2 Oct 2013 11:11:50 -0600 Message-ID: Subject: Re: Fwd: unable to start web application in tomcat-solaris, same works in tomcat-windows To: Tomcat Users List , Mark Eggers Content-Type: multipart/alternative; boundary=047d7b5d58e471bdbf04e7c52be2 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d58e471bdbf04e7c52be2 Content-Type: text/plain; charset=ISO-8859-1 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:///client_app. Are there vast differences in the way we deploy tomcat applications in windows & in solaris environments? Request your suggestions. Thanks Rav >________________________________ > From: Ravi Shankar >To: users >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. *.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 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//v1.0/work//localhost/work_tomcat_] for context [/work/tomcat/] Oct 02, 2013 11:14:09 AM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/work/tomcat//current/webapps/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//current/webapps/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 SEVERE: The scratchDir you specified: /work/tomcat//v1.0/work//localhost/work_tomcat_ is unusable. Oct 02, 2013 11:14:11 AM org.apache.catalina.startup.HostConfig start SEVERE: Unable to create directory for deployment: /work/tomcat//v1.0/conf//localhost Oct 02, 2013 11:14:11 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory /work/tomcat//v1.0/webapps/web Oct 02, 2013 11:14:11 AM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/work/tomcat//current/webapps/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//current/webapps/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 SEVERE: The scratchDir you specified: /work/tomcat//v1.0/work//localhost/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 wrote: > >________________________________ > > From: Ravi Shankar > >To: users > >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 > > --047d7b5d58e471bdbf04e7c52be2--