You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Patrick Guillot - Genigraph <pg...@genigraph.fr> on 2011/06/10 10:38:20 UTC
RE: Classpath issue *only* when starting tomcat 6 as a service
Hi everybody,
Im 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
cant 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\bootstrap.jar;
D:\tomcat\lib\annotations-api.jar;D:\tomcat\lib\catalina-ant.jar;D:\tomcat\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-dbcp.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.jar;D:\
tomcat\lib\waffle-jna.jar;D:\tomcat\lib\commons-logging-1.1.1.jar
Jvm Option[1] -Dcatalina.home=D:\tomcat
Jvm Option[2] -Dcatalina.base=D:\tomcat\instances\06_crlj
Jvm Option[3] -Djava.endorsed.dirs=D:\tomcat\endorsed
Jvm Option[4] -Djava.io.tmpdir=D:\tomcat\instances\06_crlj\temp
Jvm Option[5]
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Jvm Option[6]
-Djava.util.logging.config.file=D:\tomcat\instances\06_crlj\conf\logging.pro
perties
Jvm Option[7] -XX:MaxPermSize=256M
Jvm Option[8]
-Djava.class.path=D:\tomcat\bin\tomcat-juli.jar;D:\tomcat\bin\bootstrap.jar;
D:\tomcat\lib\annotations-api.jar;D:\tomcat\lib\catalina-ant.jar;D:\tomcat\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-dbcp.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.jar;D:\
tomcat\lib\waffle-jna.jar;D:\tomcat\lib\commons-logging-1.1.1.jar
Jvm Option[9] vfprintf
Jvm Option[10] -Xms256m
Jvm Option[11] -Xmx512m
As you can see : java.class.path do include catalina.jar.
I tried copying around catalina.jar and waffle libs around (lib dirs.,
endorsed dirs., etc.), but no luck.
Thanks in advance for any help you can provide.
Kin regards,
Patrick Guillot
Genigraph
<ma...@genigraph.fr> pguillot@genigraph.fr
Full stack trace
------------------
INFO: Déploiement du descripteur de configuration waffle-mixed.xml
10 juin 2011 09:24:35 org.apache.tomcat.util.digester.Digester startElement
GRAVE: Begin event threw error
java.lang.NoClassDefFoundError:
org/apache/catalina/authenticator/AuthenticatorBase
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at
java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:892)
at java.lang.ClassLoader.loadClass(ClassLoader.java:302)
at java.lang.ClassLoader.loadClass(ClassLoader.java:300)
at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java
:205)
at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
at
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1356)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Ab
stractSAXParser.java:533)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyEl
ement(AbstractXMLDocumentParser.java:220)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanS
tartElement(XMLDocumentFragmentScannerImpl.java:872)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$Fragm
entContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanD
ocument(XMLDocumentFragmentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Con
figuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Con
figuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:14
8)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractS
AXParser.java:1242)
at
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1642)
at
org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig
.java:793)
at
org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:7
36)
at
org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:1018)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:
279)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
at
org.apache.catalina.core.StandardContext.init(StandardContext.java:5602)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4378)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
91)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563
)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:119)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at
org.apache.catalina.core.StandardService.start(StandardService.java:519)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at
org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Re: Classpath issue *only* when starting tomcat 6 as a service
Posted by Pid <pi...@pidster.com>.
On 10/06/2011 09:38, Patrick Guillot - Genigraph wrote:
> Jvm Option[8]
> -Djava.class.path=D:\tomcat\bin\tomcat-juli.jar;D:\tomcat\bin\bootstrap.jar;
> D:\tomcat\lib\annotations-api.jar;D:\tomcat\lib\catalina-ant.jar;D:\tomcat\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-dbcp.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.jar;D:\
> tomcat\lib\waffle-jna.jar;D:\tomcat\lib\commons-logging-1.1.1.jar
>
> Jvm Option[9] vfprintf
>
> Jvm Option[10] -Xms256m
>
> Jvm Option[11] -Xmx512m
>
>
>
> As you can see : java.class.path do include “catalina.jar”.
Don't set the classpath. Tomcat does that itself.
p
Re: Classpath issue *only* when starting tomcat 6 as a service
Posted by David kerber <dc...@verizon.net>.
On 6/10/2011 8:15 AM, Patrick Guillot - Genigraph wrote:
> Hi Martin,
>
> It does start as administrator already: The tomcat service GUI used to start
> the service is executed via the "Run as administrator" contextual menu
> command.
That doesn't mean the service itself is using the administrator acct.
You need to set that explicitly in the service manager. Open the
properties of the tomcat service, and go to the "Log On" tab. What is
set there? Unless you changed it, it's probably set as Local System.
D
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Classpath issue *only* when starting tomcat 6 as a service
Posted by Patrick Guillot - Genigraph <pg...@genigraph.fr>.
Hi Martin,
It does start as administrator already: The tomcat service GUI used to start
the service is executed via the "Run as administrator" contextual menu
command.
Unfortunately this does not solve the problem.
Thanks.
Regards,
Patrick
pguillot@genigraph.fr
Téléphone : +33 (0)9 51 17 44 24
http://www.genigraph.fr
Avant d'imprimer cet email et les pièces jointes, pensez à l'environnement.
-----Message d'origine-----
De : Martin Gainty [mailto:mgainty@hotmail.com]
Envoyé : vendredi 10 juin 2011 13:24
À : Tomcat Users List
Objet : RE: Classpath issue *only* when starting tomcat 6 as a service
Just as Unix contains different configurations for each .profile and .bashrc
you may have different (JVM and or CLASSPATH) configurations for each
username in Windows Authentication Framework.
from what i know Windows service has different capabilities depending on the
authentication credentials you supply
if you start your service as Administrator does the problem go away e.g?
runas /u:administrator "net start Tomcat"
Bon Chance,
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ce
message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
de ceci est interdite. Ce message sert à l'information seulement et n'aura
pas n'importe quel effet légalement obligatoire. Étant donné que les email
peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
aucune responsabilité pour le contenu fourni.
From: pguillot@genigraph.fr
To: users@tomcat.apache.org
Subject: RE: Classpath issue *only* when starting tomcat 6 as a service
Date: Fri, 10 Jun 2011 11:16:36 +0200
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,
>
>
>
> Im 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 cant 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
RE: Classpath issue *only* when starting tomcat 6 as a service
Posted by Martin Gainty <mg...@hotmail.com>.
Just as Unix contains different configurations for each .profile and .bashrc
you may have different (JVM and or CLASSPATH) configurations for each username in Windows Authentication Framework.
from what i know Windows service has different capabilities depending on the authentication credentials you supply
if you start your service as Administrator does the problem go away e.g?
runas /u:administrator "net start Tomcat"
Bon Chance,
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
From: pguillot@genigraph.fr
To: users@tomcat.apache.org
Subject: RE: Classpath issue *only* when starting tomcat 6 as a service
Date: Fri, 10 Jun 2011 11:16:36 +0200
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
RE: Classpath issue *only* when starting tomcat 6 as a service
Posted by Patrick Guillot - Genigraph <pg...@genigraph.fr>.
Hi all,
I finally managed to make it work with my multiple tomcat homes
installations.
I deleted the "lib" dir in tomcat instances, set-up waffle lib in the common
tomcat lib dir, clean-up the services properties (i.e. classpath, to match
tomcat default service configuration), removed "endorsed" dir.
Thanks a bunch everybody for your responsiveness and dedication to solving
issues of unknown people like me.
I really appreciate ;-)
Best regards,
Patrick
pguillot@genigraph.fr
Téléphone : +33 (0)9 51 17 44 24
http://www.genigraph.fr
Avant d'imprimer cet email et les pièces jointes, pensez à l'environnement.
-----Message d'origine-----
De : Mark Thomas [mailto:markt@apache.org]
Envoyé : jeudi 16 juin 2011 20:45
À : Tomcat Users List
Objet : Re: Classpath issue *only* when starting tomcat 6 as a service
On 16/06/2011 18:07, Patrick Guillot - Genigraph wrote:
> Hi all,
>
> Back on this issue.
I suspect I know what is happening.
Waffle provides it's own implementation of Tomcat's Authenticator interface
and does this by extending Tomcat's AuthenticatorBase.
Therefore, the Authenticator Interface and the AuthenticatorBase class have
to be visible to the class loader loading Waffle.
If you place Waffle in the endorsed dir then it can't see the
AuthenticatorBase (look at the class loader docs for Tomcat). The short
version is Waffle has to be placed in Tomcat's lib directory.
Mark
---------------------------------------------------------------------
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
Re: Classpath issue *only* when starting tomcat 6 as a service
Posted by Mark Thomas <ma...@apache.org>.
On 16/06/2011 18:07, Patrick Guillot - Genigraph wrote:
> Hi all,
>
> Back on this issue.
I suspect I know what is happening.
Waffle provides it's own implementation of Tomcat's Authenticator
interface and does this by extending Tomcat's AuthenticatorBase.
Therefore, the Authenticator Interface and the AuthenticatorBase class
have to be visible to the class loader loading Waffle.
If you place Waffle in the endorsed dir then it can't see the
AuthenticatorBase (look at the class loader docs for Tomcat). The short
version is Waffle has to be placed in Tomcat's lib directory.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Classpath issue *only* when starting tomcat 6 as a service
Posted by Patrick Guillot - Genigraph <pg...@genigraph.fr>.
Hi all,
Back on this issue.
I have a new machine as a sand-box.
This is a brand-new machine. Nothing but the operating system was installed
before I began (Microsoft Windows 2008 Server R2).
Step 1:
I Installed tomcat using the installer "apache-tomcat-6.0.29.exe"(including
Tomcat service and native library).
The service has been set-up automatically by the installer.
I did no modification at all on the service set-up. So, I use the "out of
the box" tomcat set-up.
As a consequence, I haven't had to use "service.bat" since the installer did
the job itself. I only had to check the box "service" in the component list
of the installer.
I put Waffle webapps in the "webapps" directory, and waffle libs in
"endorsed". I have had to create the "endorsed" directory by myself. This
directory is referenced in the service configuration automatically set-up by
the tomcat installer (-Djava.endorsed.dirs=C:\Outils\Tomcat 6.0\endorsed).
I'm still seeing the very same error :
java.lang.NoClassDefFoundError:
org/apache/catalina/authenticator/AuthenticatorBase
Step 2:
In uninstalled tomcat, and reinstall it using
"apache-tomcat-6.0.29-windows-x64.zip". In other words, I just unzipped the
archive in "c:\tomcat" directory.
Then I:
- put Waffle webapps in "webapps";
- create "C:\endorsed\" directory;
- put Waffle libs in "C:\endorsed\";
- updated "startup.bat" to let it know about Java home (I could have set-up
an env. variable, but...):
set JAVA_HOME=C:\Outils\Java\jdk1.5.0_22
- started tomcat using "startup.bat".
Still seeing the error :
java.lang.NoClassDefFoundError:
org/apache/catalina/authenticator/AuthenticatorBase
Step 3:
Reusing the same set-up as step 2, but put the waffle libs in tomcat's lib
directory directly - not in endorsed dir.
==> fine : no more error!
Step 4:
Reinstalled Tomcat as a service with Waffle libs in Tomcat's lib directory.
==> fine : no more error!
So really, it seems I have to put Waffle libs in tomcat lib directory to
make it work.
I really do not like this since as far as I know this is not a good
practice. But obviously, I don't have any other choice, do I?
I will now try to make this work on my multiple tomcat instances
installation.
Thanks all for your inputs.
Kind regards,
Patrick
pguillot@genigraph.fr
Téléphone : +33 (0)9 51 17 44 24
http://www.genigraph.fr
Avant d'imprimer cet email et les pièces jointes, pensez à l'environnement.
-----Message d'origine-----
De : André Warnier [mailto:aw@ice-sa.com]
Envoyé : vendredi 10 juin 2011 17:43
À : Tomcat Users List
Objet : Re: Classpath issue *only* when starting tomcat 6 as a service
> -----Message d'origine-----
> De : Pid [mailto:pid@pidster.com]
> Envoyé : vendredi 10 juin 2011 16:35
> À : Tomcat Users List
> Objet : Re: Classpath issue *only* when starting tomcat 6 as a service
>
> On 10/06/2011 10:16, Patrick Guillot - Genigraph wrote:
>> 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).
>
> Please uninstall all Tomcat services.
> Now install Tomcat using service.bat - just once.
>
> http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html
>
>
> Does Tomcat work now?
>
>
> 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
Re: Classpath issue *only* when starting tomcat 6 as a service
Posted by André Warnier <aw...@ice-sa.com>.
Patrick Guillot - Genigraph wrote:
> Hi all,
>
> Thanks for your inputs.
> I tried starting Tomcat via local administrator account, but it does not
> start at all (no log file produce for tomcat and got error 1069), neither
> via the GUI nor via command line.
Probably because now it does not have the permission to overwrite one of the existing
logfiles, belonging to the previous user-id.
And since it can't write to the logfile, it can't tell you.
> I have asked my customer to set-up a new virtual machine to do what you
> suggest pid (we just cannot uninstall all existing tomcat install which are
> currently being used for test/validation purpose).
> I'll test this next week when the new environment will be ready and let you
> know.
> Thanks again.
> Have a nice week-end.
> Kind regards,
> Patrick
>
> -----Message d'origine-----
> De : Pid [mailto:pid@pidster.com]
> Envoyé : vendredi 10 juin 2011 16:35
> À : Tomcat Users List
> Objet : Re: Classpath issue *only* when starting tomcat 6 as a service
>
> On 10/06/2011 10:16, Patrick Guillot - Genigraph wrote:
>> 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).
>
> Please uninstall all Tomcat services.
> Now install Tomcat using service.bat - just once.
>
> http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html
>
>
> Does Tomcat work now?
>
>
> 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
RE: Classpath issue *only* when starting tomcat 6 as a service
Posted by Patrick Guillot - Genigraph <pg...@genigraph.fr>.
Hi all,
Thanks for your inputs.
I tried starting Tomcat via local administrator account, but it does not
start at all (no log file produce for tomcat and got error 1069), neither
via the GUI nor via command line.
I have asked my customer to set-up a new virtual machine to do what you
suggest pid (we just cannot uninstall all existing tomcat install which are
currently being used for test/validation purpose).
I'll test this next week when the new environment will be ready and let you
know.
Thanks again.
Have a nice week-end.
Kind regards,
Patrick
-----Message d'origine-----
De : Pid [mailto:pid@pidster.com]
Envoyé : vendredi 10 juin 2011 16:35
À : Tomcat Users List
Objet : Re: Classpath issue *only* when starting tomcat 6 as a service
On 10/06/2011 10:16, Patrick Guillot - Genigraph wrote:
> 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).
Please uninstall all Tomcat services.
Now install Tomcat using service.bat - just once.
http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html
Does Tomcat work now?
p
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Classpath issue *only* when starting tomcat 6 as a service
Posted by Pid <pi...@pidster.com>.
On 10/06/2011 10:16, Patrick Guillot - Genigraph wrote:
> 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).
Please uninstall all Tomcat services.
Now install Tomcat using service.bat - just once.
http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html
Does Tomcat work now?
p
Re: Classpath issue *only* when starting tomcat 6 as a service
Posted by André Warnier <aw...@ice-sa.com>.
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
RE: Classpath issue *only* when starting tomcat 6 as a service
Posted by Patrick Guillot - Genigraph <pg...@genigraph.fr>.
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,
>
>
>
> Im 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 cant 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
Re: Classpath issue *only* when starting tomcat 6 as a service
Posted by Pid <pi...@pidster.com>.
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\bootstrap.jar;
> D:\tomcat\lib\annotations-api.jar;D:\tomcat\lib\catalina-ant.jar;D:\tomcat\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-dbcp.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.jar;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\bootstrap.jar;
> D:\tomcat\lib\annotations-api.jar;D:\tomcat\lib\catalina-ant.jar;D:\tomcat\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-dbcp.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.jar;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