• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

server: error ListenerStart

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
[Thumbnail for spring-crud-db.jpg]
change from jpg to war
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
pranay jha
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
jars.JPG
[Thumbnail for jars.JPG]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic