File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes How can i resolve this  exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "How can i resolve this  exception" Watch "How can i resolve this  exception" New topic
Author

How can i resolve this exception

nagaraj reddy
Ranch Hand

Joined: Feb 21, 2005
Posts: 43
Hi ,

I am new to servlets. when i was trying to deploy my servlet in weblogic. i am invoking servlet through html page.

when i click submit in html page i am getting the fallowing exception..




Error 500--Internal Server Error
javax.servlet.ServletException: Servlet class: 'myserv' couldn't be instantiated
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:879)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:842)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:782)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:504)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:349)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread




plz tell me where i am going wrong
Sergey Tyulkin
Ranch Hand

Joined: May 10, 2005
Posts: 87
Maybe, your servlet
1) has no default constructor (i.e. constructor without parameters)
2) or, your forgot to implement Servlet (the easiest way - by extending GenericServlet or HttpServlet classes) interface?
nagaraj reddy
Ranch Hand

Joined: Feb 21, 2005
Posts: 43
Thanks for reply.


I got solution , i need to attach PUBLIC to the servlet class
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How can i resolve this exception
 
Similar Threads
Error 500--Internal Server Error
Error creating bean
Struts Application failed to lauch - Null pointer Exception
Error 500--Internal Server Error-Null Pointer Exception
classloader problem in a struts application.