Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
suddenly I cannot run servlets anymore

suddenly I cannot run servlets anymore

2007-08-13       - By Tuomas

 Back
Reply:     1     2     3     4  

Hi!

With the advice I got from
<http://www.coreservlets.com/Apache-Tomcat-Tutorial/tomcat-5 (See http://cat-5.ora-code.com).5.html>,
I successfully installed Tomcat 5.5 on my computer
(Ubuntu 7.04). I verified that I can a) start the
server, b) access my own HTML and JSP pages, and c)
compile and run simple servlets.

I created a development dir in my home directory,
/home/tuope/src/web/servlets. I have created, too,
some shortcuts there:
catalina.sh -> /usr/local/bin/tomcat/bin/catalina.sh
shutdown.sh -> /usr/local/bin/tomcat/bin/shutdown.sh
startup.sh -> /usr/local/bin/tomcat/bin/startup.sh

Having done the tests mentioned above, I issued
$ sudo sh ./shutdown.sh
and then
$ sudo sh ./startup.sh

The result was that *I can no longer run any
servlets*. I get this message

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error
() that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Cannot allocate
servlet instance for path
/servlet/coreservlets.HelloServlet2

org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
:389)

org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134)

javax.servlet.http.HttpServlet.service(HttpServlet.java:690)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServlet
  java.lang.ClassLoader.defineClass1(Native Method)

java.lang.ClassLoader.defineClass(ClassLoader.java:620)

java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

java.net.URLClassLoader.access$000(URLClassLoader.java:56)

java.net.URLClassLoader$1.run(URLClassLoader.java:195)
  java.security.AccessController.doPrivileged(Native
Method)

java.net.URLClassLoader.findClass(URLClassLoader.java:188)
  java.lang.ClassLoader.loadClass(ClassLoader.java:306)

sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
  java.lang.ClassLoader.loadClass(ClassLoader.java:251)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java
:1274)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java
:1205)

org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
:370)

org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134)

javax.servlet.http.HttpServlet.service(HttpServlet.java:690)

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

note The full stack trace of the root cause is
available in the Apache Tomcat/5.5.23 logs.

I rebooted the computer. Didn't help.

$ echo $JAVA_HOME
/usr/lib/jvm/java-6 (See http://ava-6.ora-code.com)-sun-1 (See http://sun-1.ora-code.com).6.0.00
$ echo $CLASSPATH
/usr/local/bin/tomcat/common/lib/jsp-api.jar:/usr/local/bin/tomcat/common/lib
/servlet-api.jar:/home/tuope/src/web/servlets:.

Does anyone know what might be causing this odd
behavior? I am unarmed. :-(

Tuomas



--
tuope@(protected)
http://tuope.mithlond.net

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.