• 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

HTTP500 Error : Error instantiating servlet class controller.tutorController

 
Ranch Hand
Posts: 1021
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear experts,

I am getting this new error and then I googled and found out that with Java EE7 and web servlet annotation you won't need deployment descriptor.

However, if I remove my web.xml, specifically take out the servlet mapping, then a 404 resource not available error will appear.

What do I do to keep the container happy ?

Here's the error :

 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure that you have a class called tutorController in package controller? Because the error message indicates you don't, but that's what you've defined in web.xml.

About the 404, without a mapping in either web.xml or using the @WebServlet annotation, the container doesn't know what servlet should be used to handle the request, and that's why you get the 404.
 
tangara goh
Ranch Hand
Posts: 1021
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Spoor wrote:Are you sure that you have a class called tutorController in package controller? Because the error message indicates you don't, but that's what you've defined in web.xml.

About the 404, without a mapping in either web.xml or using the @WebServlet annotation, the container doesn't know what servlet should be used to handle the request, and that's why you get the 404.



I am most certain that I have.  I spent a few hours to make sure that the servlet mapping etc in the web.xml is correct too.

However, I have also read from the internet that from javaEE 7 onwards, if there is annotation, you won't even need the deoployment descriptor.

Anyway, I resolved the problem by re-starting the eclipse.

This problem, however, still appear on and off.

I wish there is a way to eradicate it for good.
 
Rob Spoor
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds more like a problem in Eclipse, Tomcat, or the link between the two. I've added this thread to both the IDEs and Tomcat forums.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic