Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefFound Error

 
Jason Kwok
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I just recently upgraded Tomcat from version 4.0 to 5.5, which I know supports the new servlet standards. My problem is that my servlets all generate this NoClassDefFound error, stating an illegal name for my serlvets. How do I fix this? Is there something I need to add to my web.xml file?

If it helps, I can post my web.xml and sample servlets to help identify the problem, just let me know!!



Thanks to any and all advice!!
Jason

[ August 22, 2006: Message edited by: Jason Kwok ]
[ August 22, 2006: Message edited by: Jason Kwok ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does your web.xml look like?
 
Jason Kwok
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick reply Gregg, unfortunately I'm at work and don't have the web.xml file available right now. It's my fault for assuming I wouldn't get a response so soon.

My web.xml file is rather simple. I just define the servlet using servlet-element and then I've also added serlvet-mappings for a few of them as well.

example:


I'll post my full web.xml this evening. So sorry about that!!

Thanks again,
Jason
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
servlet-element is not used in new containers. You would just use <servlet>. Might consider glancing at the new specs for J2EE. Quite a bit has changed since whatever version Tomcat 4.0 supported.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Shouldn't that be separated with a . instead of a /?

Bill
 
Jason Kwok
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're absolutely right, I do need to check over the new servlet specs!! And I'll try adjusting my web.xml file accordingly.

Thanks again Gregg!!
 
Jason Kwok
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by William Brogden:

Shouldn't that be separated with a . instead of a /?

Bill


Quite right. Thanks... just a typo on my part!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic