By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,144 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,144 IT Pros & Developers. It's quick & easy.

Argh! Tomcat 5.5.3

P: n/a
I don't get it. First of all, it claims to run on a JRE. This is obviously
a fraud, it even says so when you attempt to start it: "The JAVA_HOME
variable should point to a JDK and not a JRE". I can accept that, being
new to it all and not really caring, but things are
going downhill rather fast from here. I'm installing a simple webapp
in the the the webapps folder, complete with a context.xml in the
conf folder. My servlet behaves just as expected in the browser, but the
log thinks otherwise:

java.lang.ClassNotFoundException:
org.apache.catalina.servlets.DefaultServlet

- even though I see it right there in the
server/lib/servlets-default.jar. Applying some StandardWrapper hotfix does
no good. So I fire up the manager application, thinking that maybe it
handles deployment more effectively. I try different scenarios:

1) Specify a /path and a file-URI. "OK - Installed application at context
path /test" claims the manager, but the app is not listed and upon restart
[in fact, upon restarting the computer, since interaction with the manager
apparently corrupts shutdown of the server] the log complains about a
missing xml file.
2) Specify a context.xml and a file-URI. "Invalid context path was
specified" even though it was supposed to retrieve this from the xml.
3) Specify both a /path, a context.xml and a file-URI. The application
gets installed "OK", but it doesn't display and it still doesn't work [as
I recall, it couldn't read the web.xml, which worked fine when installed
things manually]

So I switch to simple URL parameter installment mode. Again, everything is
installed "OK" but nothing displays on the application list and nothing
works. You'd think i didn't care, when after all the application worked
fine upon manual installment. But thing is, it cannot handle any javax
J2EE classes, only HttpServlet stuff, so something is obviously wrong.
Getting standard JRE DOM stuff compiled is also an appaling excercise. The
container runs on Tiger, but to use DOM features, Xerces has to be added
anyway; and to use DOM3 features, which is sort of the point with Tiger, I
have to pull Xerces from CVS and build it myself.

This may all be in a days work for you people, but Tomcat presents an
unusually high learning curve for the likes of myself. I shall presently
be investigating Suns Application Server since it's there anyway, but if
you have any feedback to the above, I'd be very happy to take any flames
and suggestions [other jdk1.5.0 containers out there?]. I run Linux if it
makes any difference, and I won't even begin to tell how tough it was
getting that to work. Thanks alot!
--
Wired Earp
Wunderbyte
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I wrote:
I don't get it [Tomcat 5.5.3]


I just relived the whole nightmare on Windows with the *exact* same
result. It seems obvious that DOM3, specifically the LS module, doesn't
compute on Tomcat. Steps to reproduce:

1) Install Tomcat 5.5.3, J2SE 1.5.0 and J2EE 1.4.2
2) Deploy servlet with DOMImplementationLS stuff, compiled to 1.5 or
1.4.

I've applied the hotfix and added the Xerces distribution from the
Apache Tomcat download library to endorsed, shared and common - although
supposedly *not* required under 1.5 - to no avail. I've also tried
building it with DOM3 support, which seemed appropriate. Even switced to
J2SE 1.4.2 with no succes. No matter how you twist it, Tomcat gets
completely stuck on the stacktrace presented below. If you have
experienced different results, please let me know about it so I can live
to see day we laugh at my ignorance.
SEVERE: Error loading WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@feb 48
org.apache.catalina.servlets.DefaultServlet
java.lang.ClassNotFoundException: org.apache.catalina.servlets.DefaultServlet
at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1332)
at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1181)
at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:938)
at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:836)
at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:3783)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4045)
at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:755)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescr iptor(HostConfig.java:590)
at org.apache.catalina.startup.HostConfig.deployDescr iptors(HostConfig.java:535)
at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1079)
at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1011)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:718)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1003)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:437)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:450)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:2009)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:538)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:409)
2004-10-23 16:27:26 org.apache.catalina.core.ApplicationContext log
SEVERE: Servlet /dataplastique threw load() exception
javax.servlet.ServletException: Wrapper cannot find servlet class org.apache.catalina.servlets.DefaultServlet or a class it depends on
at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:948)
at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:836)
at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:3783)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4045)
at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:755)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescr iptor(HostConfig.java:590)
at org.apache.catalina.startup.HostConfig.deployDescr iptors(HostConfig.java:535)
at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1079)
at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1011)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:718)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1003)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:437)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:450)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:2009)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:538)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:409)
2004-10-23 16:27:28 org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRul e: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterR ule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingR ule: Redirect URL: http://jakarta.apache.org]]
2004-10-23 16:27:29 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
2004-10-23 16:27:29 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
2004-10-23 16:27:30 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
2004-10-23 16:27:30 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
2004-10-23 16:27:31 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
2004-10-23 16:27:32 org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
2004-10-23 16:27:32 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/100 config=null
2004-10-23 16:27:32 org.apache.catalina.startup.Catalina start
INFO: Server startup in 9413 ms
--
Wired Earp
Wunderbyte
Jul 17 '05 #2

P: 1
I was getting the same error but with a plugin in struts. I found this to be a generic error which is raised when tomcat couldn't start the servlet for my plugin. Ive had the same error message for passing the wrong arguments to my plugin.

After lots of pain I installed log4j and set up the '.properties' files and got a more meaningful trace which turned out to be a missing library I thought I installed.
Sep 27 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.