File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Resource not available error in tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Resource not available error in tomcat" Watch "Resource not available error in tomcat" New topic

Resource not available error in tomcat

Surya Lanka

Joined: Dec 14, 2006
Posts: 6
I am using tomcat for learning servlets and jsp.I am using tomcat 5.0.25.
I was developing a small webapplication.
I have put in a file called form.html under ~/tomcat5.0/webpps/Beer-v1(root directory of my application)/ and other classes and web.xml in respective directories (ie servlet and model classes in webapps/Beer-v1/WEB-INF/classes and web.xml in WEB-INF) and
when i am using the below url
in the browser
(at the time of installation i have changed the port to 8000 instead of 8080,thats y i used the port 8000) i am getting the following error in the browser:-
HTTP Status 404 - /Beer-v1/form.html
type Status report
message /Beer-v1/form.html
description The requested resource (/Beer-v1/form.html) is not available.
and i have found the following error in logfile:-
2006-12-18 16:11:07 StandardContext[/Beer-v1]Error configuring application listener of class listeners.SessionListener
java.lang.ClassNotFoundException: listeners.SessionListener
And the most confusing thing is when i am using war file and Tomcat Manager for deploying ,its working fine,even when i copied my entire directory structure except the
Beer-v1 directory(root directory of myapplication) to ~/ webapps/Root/ the form is getting displayed in the browser,but when i am trying to put the same directory structure separately in ~tomcat5.0/webapps/ its not working.

please help me solving this error bcoz i am stuck here and not able to run any application on Tomcat5.0. using the above method

2006-12-18 16:40:18 StandardContext[/Beer-v1]Error configuring application listener of class listeners.ContextListener
java.lang.ClassNotFoundException: listeners.ContextListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at org.apache.catalina.loader.WebappClassLoader.loadClass(
at org.apache.catalina.core.StandardContext.listenerStart(
at org.apache.catalina.core.StandardContext.start(
at org.apache.catalina.core.ContainerBase.addChildInternal(
at org.apache.catalina.core.ContainerBase.addChild(
at org.apache.catalina.core.StandardHost.addChild(
at org.apache.catalina.core.StandardHostDeployer.install(
at org.apache.catalina.core.StandardHost.install(
at org.apache.catalina.startup.HostConfig.deployDirectories(
at org.apache.catalina.startup.HostConfig.deployApps(
at org.apache.catalina.startup.HostConfig.start(
at org.apache.catalina.startup.HostConfig.lifecycleEvent(
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardHost.start(
at org.apache.catalina.core.ContainerBase.start(
at org.apache.catalina.core.StandardEngine.start(
at org.apache.catalina.core.StandardService.start(
at org.apache.catalina.core.StandardServer.start(
at org.apache.catalina.startup.Catalina.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.catalina.startup.Bootstrap.start(
at org.apache.catalina.startup.Bootstrap.main(

Please somebody help,Thanks in advance.

Surya L
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Did you create a contextListener?
If not, do you have one listed in your web.xml file?

It looks like Tomcat is trying to register a contextListener when it starts up and is failing becuase it can not find it.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

please help me solving this error bcoz i am stuck ...

Please see:

Abbreviations such as "u" or "ur" in
place of "you" and "you are" or "you're" confound language translation software making
it hard for our non-English speaking members to read your posts.
"bcoz" is not a word in the English language.
I agree. Here's the link:
subject: Resource not available error in tomcat
It's not a secret anymore!