tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Guillot - Genigraph" <pguil...@genigraph.fr>
Subject RE: Classpath issue *only* when starting tomcat 6 as a service
Date Fri, 10 Jun 2011 08:38:20 GMT
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[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

        <mailto:pguillot@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)


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message