File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes server: error ListenerStart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "server: error ListenerStart" Watch "server: error ListenerStart" New topic
Author

server: error ListenerStart

pranay jha
Greenhorn

Joined: Feb 03, 2011
Posts: 6
Hi,

I am a Spring beginner and have just started creating an application.
I have created small spring applications, but this time i started getting issues in my web.xml.
I am using Eclipse ganymede and am working on a live project which works fine on this IDE.
This new small app started giving trouble.
i am using:
1. tomcat 6.0.29

as i start the server I get the following error "java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener"
i have checked few forums but haven't found a concrete solution.
I don't understand whether its a classpath issue or spring issue or my code.
Because in Helios the server starts but the application fails to run (ie. my index.jsp)

here is my contextLoaderListener in my web.xml file:





============================

kindly suggest..


Regards
Pranay




[spring-crud-db.jpg]

Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2266
    
    3

Howdy, Pranay. Welcome to JavaRanch!

Champ, ServletContextListener is an interface that allows us to do something whenever an application is started on the web container/application server. This interface is implemented by the ContextLoaderListener class, and then, Spring is able to configure your application properly.

Now, it looks like this interface is not being found in the class-path. How is your environment? Did you configure Tomcat in your Eclipse and are deploying it there? Or are you generating a WAR file and deploying it outside Eclipse?


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
pranay jha
Greenhorn

Joined: Feb 03, 2011
Posts: 6
Hi,

Tomcat is configured in my Eclipse runtime.
Or shall i say that i have configured tomcat and added this project to the server, like I always do while creating a webapp.

pranay jha
Greenhorn

Joined: Feb 03, 2011
Posts: 6
Hi,

I just resolved the problem.
It was with my jars.
I changed my jars and it started working.
I have some other issues coming up with the command object.
But i think i'll research first and if i still don't find an answer then i'll come back and haunt you.

Thanks again!!
la Tanya
Greenhorn

Joined: Mar 05, 2011
Posts: 1
Hi Pranay,


Having the same problem
I have been working on a spring app for over a month, and today out of a sudden this exception started preventing me from starting the app

What turned out to be the problem with your jars ?


Thanks in advance,


Tanya
pranay jha
Greenhorn

Joined: Feb 03, 2011
Posts: 6
Hi,

The problem with me was multiple versions of the jars present in the classpath.
I just used the jars from an already deployed projects and it just started working.
I guess it was due to jee jars or spring jars. I didn't really bother to look once it started working.
Anyways I don't know if this will help or not, but still, I am attaching a screen shot of the jars that I
bluntly copied. half of them were never utilized in my project. And also this project that I tried to
recreate was 2 yrs old.

Regards
Pranay


[Thumbnail for jars.JPG]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: server: error ListenerStart