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 35ACB49F8 for ; Fri, 10 Jun 2011 12:49:39 +0000 (UTC) Received: (qmail 76402 invoked by uid 500); 10 Jun 2011 12:49:35 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 76237 invoked by uid 500); 10 Jun 2011 12:49:35 -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 76228 invoked by uid 99); 10 Jun 2011 12:49:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 12:49:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 12:49:27 +0000 Received: from [192.168.245.129] (p549E8FC5.dip0.t-ipconnect.de [84.158.143.197]) by tor.combios.es (Postfix) with ESMTPA id 90EB5226097 for ; Fri, 10 Jun 2011 14:49:05 +0200 (CEST) Message-ID: <4DF212A5.8060307@ice-sa.com> Date: Fri, 10 Jun 2011 14:48:37 +0200 From: =?windows-1252?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Classpath issue *only* when starting tomcat 6 as a service References: <003601cc2749$c20512b0$460f3810$@genigraph.fr> <4DF1D979.7070009@pidster.com> <004e01cc274f$19780f20$4c682d60$@genigraph.fr> In-Reply-To: <004e01cc274f$19780f20$4c682d60$@genigraph.fr> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi. I don't really know if it is important here, I don't know Waffle, the type of error does not match, and it doesn't look below like you are using any network paths. That was the disclaimer of responsibility. One aspect that is different when you run Tomcat as a service, is (usuallly) the user-id under which it runs. As a service, the standard Tomcat installation will configure it to run as "LocalSystem", which is a special user having a lot of rights on the local machine, but /NO/ network acess rights in the Microsoft sense (no access to network shares, to other systems etc..). Even if you change that in order to run as "Administrator", this Administrator may still be a purely local account (as opposed to a Domain account). As mentioned before, I do not know Waffle in detail, but it offers a form of Windows Domain authentication, and to do that at some point it needs to be able to present itself as a Windows *domain* user, otherwise it will not have access to an authenticating server. Whether this account that it needs to use is configured separately, or is the same as the one Tomcat runs under, that I don't know. All of this to say that if you encounter some issues when running Tomcat as a service with Waffle enabled, and you do not have these same problems with Waffle disabled (or when running Tomcat+Waffle from a command window under *your* login account - presumably a domain account), there may be a link with the user-id. Patrick Guillot - Genigraph wrote: > Hello, > > Right. > I have used a script I made because I had several tomcat instances to set-up > (2x8). Attached is the script I used. I'm using multiple catalina_base (one > for each application). > At first, the "Java Classpath:" field of the Tomcat Service GUI only > contains : > bootsrap.jar and tomcat-juli.jar > > Since it did not work, I add the following in PR_CLASSPATH env. variable > which correspond to the "Java Options:" field of the Tomcat Service GUI > contained : > -Djava.class.path=D:\tomcat\lib\annotations-api.jar;D:\tomcat\lib\catalina-a > nt.jar;D:\tomcat\lib\catalina-ha.jar;D:\tomcat\lib\catalina-tribes.jar;D:\to > mcat\lib\catalina.jar;D:\tomcat\lib\el-api.jar;D:\tomcat\lib\jasper-el.jar;D > :\tomcat\lib\jasper-jdt.jar;D:\tomcat\lib\jasper.jar;D:\tomcat\lib\jsp-api.j > ar;D:\tomcat\lib\servlet-api.jar;D:\tomcat\lib\tomcat-coyote.jar;D:\tomcat\l > ib\tomcat-dbcp.jar;D:\tomcat\lib\tomcat-i18n-es.jar;D:\tomcat\lib\tomcat-i18 > n-fr.jar;D:\tomcat\lib\tomcat-i18n-ja.jar;D:\tomcat\lib\jna.jar;D:\tomcat\li > b\platform.jar;D:\tomcat\lib\waffle-jna.jar;D:\tomcat\lib\commons-logging-1. > 1.1.jar > > Being so desperate :-) I add all the jars to both "Java Classpath:" and > "Java Options:". > > I just made a test after cleaning things up. This gives the following > configuration : > > [2011-06-10 10:46:03] [447 javajni.c] [debug] Jvm Option[0] > -Dcatalina.home=D:\tomcat > [2011-06-10 10:46:03] [447 javajni.c] [debug] Jvm Option[1] > -Dcatalina.base=D:\tomcat\instances\06_crlj > [2011-06-10 10:46:03] [447 javajni.c] [debug] Jvm Option[2] > -Djava.endorsed.dirs=D:\tomcat\endorsed > [2011-06-10 10:46:03] [447 javajni.c] [debug] Jvm Option[3] > -Djava.io.tmpdir=D:\tomcat\instances\06_crlj\temp > [2011-06-10 10:46:03] [447 javajni.c] [debug] Jvm Option[4] > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager > [2011-06-10 10:46:03] [447 javajni.c] [debug] Jvm Option[5] > -Djava.util.logging.config.file=D:\tomcat\instances\06_crlj\conf\logging.pro > perties > [2011-06-10 10:46:03] [447 javajni.c] [debug] Jvm Option[6] > -XX:MaxPermSize=256M > [2011-06-10 10:46:03] [447 javajni.c] [debug] Jvm Option[7] > -Djava.class.path=D:\tomcat\bin\tomcat-juli.jar;D:\tomcat\bin\bootstrap.jar > [2011-06-10 10:46:03] [447 javajni.c] [debug] Jvm Option[8] vfprintf > [2011-06-10 10:46:03] [447 javajni.c] [debug] Jvm Option[9] -Xms256m > [2011-06-10 10:46:03] [447 javajni.c] [debug] Jvm Option[10] -Xmx512m > [2011-06-10 10:46:03] [629 javajni.c] [debug] argv[0] = start > > As far as I understand, line 7 contains what is set-up in the "Java > Classpath:" field of the Tomcat Service GUI. > It looks fine now, does it ? > > I still get the same error. > Thanks, > > Patrick > > -----Message d'origine----- > De : Pid [mailto:pid@pidster.com] > Envoy� : vendredi 10 juin 2011 10:45 > � : Tomcat Users List > Objet : Re: Classpath issue *only* when starting tomcat 6 as a service > > On 10/06/2011 09:38, Patrick Guillot - Genigraph wrote: >> Hi everybody, >> >> >> >> I�m driving mad with a classpath issue : >> >> >> >> My environment : >> >> - Tomcat 6.0.29 >> >> - Windows Server 2008 R2 Standard 64 bits >> >> - JDK 1.5.0_22 >> >> >> >> My webapp is using Waffle (Windows Authentication Framework) >> (http://waffle.codeplex.com/) to benefit from transparent authentication. >> >> >> >> It is working just fine when tomcat is started in console mode. But >> console mode is not suitable for production use. >> >> Therefore, I set-up Tomcat 6 as a service >> (http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html). >> >> >> >> In this mode, tomcat does not start properly and I get a classpath error : >> >> java.lang.NoClassDefFoundError: >> org/apache/catalina/authenticator/AuthenticatorBase >> >> If not using Waffle, the service mode is working fine as well. >> >> AuthenticatorBase is used by Waffle. >> >> >> >> I found that this class is located �catalina.jar�. >> >> �Catalina.jar� is located in D:\tomcat\lib\ (catalina.home\lib). >> >> So, I do have the right jar and it contains the right class (which >> again is found by tomcat when started in console mode). >> >> >> >> My guess was I had a service configuration error : I checked >> everything and can�t find any error � which does not mean there is no >> error ! ;-) >> >> Here is the service configuration logged by tomcat : >> >> >> >> Jvm Option[0] >> -Djava.class.path=D:\tomcat\bin\tomcat-juli.jar;D:\tomcat\bin\bootstra >> p.jar; >> D:\tomcat\lib\annotations-api.jar;D:\tomcat\lib\catalina-ant.jar;D:\to >> mcat\l >> > ib\catalina-ha.jar;D:\tomcat\lib\catalina-tribes.jar;D:\tomcat\lib\catalina. >> jar;D:\tomcat\lib\el-api.jar;D:\tomcat\lib\jasper-el.jar;D:\tomcat\lib >> \jaspe >> r-jdt.jar;D:\tomcat\lib\jasper.jar;D:\tomcat\lib\jsp-api.jar;D:\tomcat >> \lib\s >> ervlet-api.jar;D:\tomcat\lib\tomcat-coyote.jar;D:\tomcat\lib\tomcat-db >> cp.jar >> ;D:\tomcat\lib\tomcat-i18n-es.jar;D:\tomcat\lib\tomcat-i18n-fr.jar;D:\ >> tomcat >> \lib\tomcat-i18n-ja.jar;D:\tomcat\lib\jna.jar;D:\tomcat\lib\platform.j >> ar;D:\ >> tomcat\lib\waffle-jna.jar;D:\tomcat\lib\commons-logging-1.1.1.jar > > >> Jvm Option[7] -XX:MaxPermSize=256M >> >> Jvm Option[8] >> -Djava.class.path=D:\tomcat\bin\tomcat-juli.jar;D:\tomcat\bin\bootstra >> p.jar; >> D:\tomcat\lib\annotations-api.jar;D:\tomcat\lib\catalina-ant.jar;D:\to >> mcat\l >> > ib\catalina-ha.jar;D:\tomcat\lib\catalina-tribes.jar;D:\tomcat\lib\catalina. >> jar;D:\tomcat\lib\el-api.jar;D:\tomcat\lib\jasper-el.jar;D:\tomcat\lib >> \jaspe >> r-jdt.jar;D:\tomcat\lib\jasper.jar;D:\tomcat\lib\jsp-api.jar;D:\tomcat >> \lib\s >> ervlet-api.jar;D:\tomcat\lib\tomcat-coyote.jar;D:\tomcat\lib\tomcat-db >> cp.jar >> ;D:\tomcat\lib\tomcat-i18n-es.jar;D:\tomcat\lib\tomcat-i18n-fr.jar;D:\ >> tomcat >> \lib\tomcat-i18n-ja.jar;D:\tomcat\lib\jna.jar;D:\tomcat\lib\platform.j >> ar;D:\ >> tomcat\lib\waffle-jna.jar;D:\tomcat\lib\commons-logging-1.1.1.jar > > Also you're setting classpath twice. > > How did you install the service? Did you use service.bat? > > > p > > > > > ------------------------------------------------------------------------ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org