tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From graghupa...@aegonuk.co.uk
Subject RE: javax.servlet.ServletException: Cannot allocate servlet insta nce
Date Mon, 07 Apr 2003 18:21:00 GMT
did you do the 

<servlet-name>list</servlet-name>
<servlet-class>shiva.list</servlet-class>

and can you send me the code of list servlet ????

Thanks 
Guru

-----Original Message-----
From: Hari Om [mailto:hari_om@hotmail.com]
Sent: 07 April 2003 17:51
To: tomcat-user@jakarta.apache.org
Subject: RE: javax.servlet.ServletException: Cannot allocate servlet
instance


Hello Everyone...

Any information on as to why this error (see transcripts below)....?
Thanks!




>From: "Hari Om" <hari_om@hotmail.com>
>Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>To: tomcat-user@jakarta.apache.org
>Subject: RE: javax.servlet.ServletException: Cannot allocate servlet 
>instance
>Date: Mon, 07 Apr 2003 14:56:02 +0000
>
>Hi Guru, Shapira
>
>Thanks for your reply.
>
>My Web.XML has following setting:
><servlet-name>login</servlet-name>
><servlet-class>shiva.login</servlet-class>
>
>When I point my browser to http://hariom.com/hari/servlet/login
>it works fine....password is validated and page is redirected to 
>http://hariom.com/hari/servlet/main which has a FORM. When User clicks 
>SUBMIT button on the form...it should take user to 
>http://hariom.com/hari/servlet/list page but shows following errors wonder 
>why:
>
>My FORM ACTION tag is <Form action='list'>...but later i tried to <Form 
>Action='shiva.list'> but still get following error:
>
>---------------------------------------------------------------------------
--
>Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
>The server encountered an internal error (Internal Server Error) that
>prevented it from fulfilling this request.
>
>javax.servlet.ServletException: Cannot allocate servlet instance for path
>/hari/servlet/list
>
>at
>org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.jav
a
>:415)
>at
>org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>
>root cause
>java.lang.NoClassDefFoundError: shiva/list (wrong name: list)
>at java.lang.ClassLoader.defineClass0(Native Method)
>at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
>at
>java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled
>Code))
>---------------------------------------------------------------------------
-
>
>
>
>
>
>
>
>
>>From: graghupathy@aegonuk.co.uk
>>Reply-To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>>To: tomcat-user@jakarta.apache.org
>>Subject: RE: javax.servlet.ServletException: Cannot allocate servlet 
>>instance
>>Date: Mon, 7 Apr 2003 15:34:51 +0100
>>
>>your servlet aliasing should be like
>>
>><servlet-name>login</servlet-name>
>><servlet-class>shiva.login</servlet-class>
>>
>>
>>your mapping is fine
>>
>>Regards
>>Guru
>>
>>-----Original Message-----
>>From: Hari Om [mailto:hari_om@hotmail.com]
>>Sent: 07 April 2003 15:29
>>To: tomcat-user@jakarta.apache.org
>>Subject: javax.servlet.ServletException: Cannot allocate servlet
>>instance
>>
>>
>>Hello:
>>
>>I am using JBoss + Tomcat + Apache on UNIX.
>>
>>My Web App name is "HARI" which has following structure:
>>
>>This is a very basic WEB APP which checks for USerName/Password.
>>
>>I run my app as http://hariom.com/hari/servlet/login
>>
>>
>>I have following directory and organized the servlets as:
>>
>>/hari/index.jsp
>>/hari/hari.war
>>/hari/WEB-INF/web.xml
>>/hari/WEB-INF/classes/shiva/login.class
>>/hari/WEB-INF/classes/shiva/process.class
>>/hari/WEB-INF/classes/shiva/main.class
>>/hari/WEB-INF/classes/shiva/list.class
>>/hari/META-INF/application.xml
>>
>>In every Servlet I have added "package shiva;"
>>
>>My "main.class" has a Form which calls "list.class" but when I click the
>>Form Submit button I get following error wonder why?
>>
>>--------------------------------------------------------------------------
--
>>-
>>Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
>>The server encountered an internal error (Internal Server Error) that
>>prevented it from fulfilling this request.
>>
>>javax.servlet.ServletException: Cannot allocate servlet instance for path
>>/hari/servlet/list
>>
>>at
>>org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.ja
va
>>:415)
>>at
>>org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>>
>>root cause
>>java.lang.NoClassDefFoundError: shiva/list (wrong name: list)
>>at java.lang.ClassLoader.defineClass0(Native Method)
>>at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
>>at
>>java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compile
d
>>Code))
>>--------------------------------------------------------------------------
--
>>-
>>
>>My classpath is set as "/hari/WEB-INF/classes"
>>
>>
>>My WEB.XML file is:
>>--------------------------------------------------------------------------
--
>>-
>><web-app>
>><servlet>
>><servlet-name>login</servlet-name>
>><servlet-class>/login/*</servlet-class>
>></servlet>
>><servlet>
>><servlet-name>process</servlet-name>
>><servlet-class>/process/*</servlet-class>
>></servlet>
>><servlet>
>><servlet-name>main</servlet-name>
>><servlet-class>/main/*</servlet-class>
>></servlet>
>><servlet>
>><servlet-name>list</servlet-name>
>><servlet-class>/list/*</servlet-class>
>></servlet>
>>
>><servlet-mapping>
>><servlet-name>process</servlet-name>
>><url-pattern>/process/*</url-pattern>
>></servlet-mapping>
>><servlet-mapping>
>><servlet-name>login</servlet-name>
>><url-pattern>/login/*</url-pattern>
>></servlet-mapping>
>><servlet-mapping>
>><servlet-name>main</servlet-name>
>><url-pattern>/main/*</url-pattern>
>></servlet-mapping>
>><servlet-mapping>
>><servlet-name>list</servlet-name>
>><url-pattern>/list/*</url-pattern>
>></servlet-mapping>
>>---------------------------------------------------------------------
>>
>>Can anyone point out what is wrong?
>>
>>what other changes do I have to make to make it work?

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message