Argh! Tomcat 5.5.3  
Author Message
Wired Earp





PostPosted: 2004-10-23 6:59:00 Top

java-programmer, Argh! Tomcat 5.5.3 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
 
Wired Earp





PostPosted: 2004-10-23 23:17:00 Top

java-programmer >> Argh! Tomcat 5.5.3 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@feb48
org.apache.catalina.servlets.DefaultServlet
java.lang.ClassNotFoundException: org.apache.catalina.servlets.DefaultServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:938)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:836)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3783)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4045)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:590)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2009)
at org.apache.catalina.startup.Catalina.start(Catalina.java:538)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.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.loadServlet(StandardWrapper.java:948)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:836)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3783)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4045)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:590)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:437)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2009)
at org.apache.catalina.startup.Catalina.start(Catalina.java:538)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.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.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: 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