tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Tomcat 6 unstable
Date Mon, 24 Nov 2008 13:57:14 GMT
I highly doubt Tomcat is "unstable".  If anything, your webapp is
unstable.  Is your tomcat install from the Ubuntu distribution or from
Apache Tomcat's website?

> I tried to create the folder CATALINAHOME/common/lib (version 6 brings no folder) and
there copying the jar needed.

Folder structure changed from tomcat 5.x to 6.x.  Tomcat 6 only has
$CATALINA_HOME/lib and it should already have all that's needed to run
except maybe your db2 jdbc driver.

> I tried editing the setclaspath.sh, since in the first few lines, what it does is literally
erasing the entire class that has ... Well, there was a CLASSPATH = "" and it changed by a
CLASSPATH = $ CLASSPATH, this way it is not deleting the old value of the variable.

Don't ever change the classpath.  You are asking for worlds of pain and
suffering with strange, near impossible to trace errors.  Put this back
the way you found it.

> java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet

Can you describe the circumstances around this more?  Was it from within
Eclipse?  Did you move servlet-api.jar from $CATALINA_HOME/lib where it
belongs?

> java.lang.NullPointerException
>     org.apache.jsp.query_002dadd_002d2_jsp._jspService(query_002dadd_002d2_jsp.java:107)

In your JSP, you are trying to access properties/methods of a null
object.  Test for null first.

--David




Ariela Carrera wrote:
> Hi dear users of Tomcat.
>
> I am writing to you because my webapp is not working fine. I am developing a web application
with Java, a Servlet and JSP some in Tomcat 6.0.14, using Ubuntu Gutsy. I have developed a
class that connects to DB2, which I tested plenty of times, with a kind of test, for console.
The kind of connection is working properly.
>
> THE PROBLEM:
> Although it always starts well, charging that brings all the examples of jsp and servlet
correctly, TOMCAT feature when you want,
> 1) Loading or not my servlet,
> 2) Losing or no connections to DB2, and 
> 3) Making nulls or not, values in the http-Sesions. 
>
> Without having made any changes in the source code, Tomcat sometimes do works and sometimes
do not.
>
> SOLUTIONS I TRIED:
> - I tried to start adding the-Xmx but I do not see differences. Tomcat also remains unstable.
> - I tried to create the folder CATALINAHOME/common/lib (version 6 brings no folder) and
there copying the jar needed. I continue as before.
> - I tried editing the setclaspath.sh, since in the first few lines, what it does is literally
erasing the entire class that has ... Well, there was a CLASSPATH = "" and it changed by a
CLASSPATH = $ CLASSPATH, this way it is not deleting the old value of the variable.
> - I tried booting java as a server with the-server.
>
> What else can I try? I accept any suggestion
>
> DETAILS
>
> What am I using?
> JAVA VERSION: $ java-version
> Java (TM) SE Runtime Environment (build 1.6.0_02-B05)
> Java HotSpot (TM) Client VM (build 1.6.0_02-B05, mixed mode)
>
> Javac VERSION: $ javac-version
> javac 1.6.0_02
>
> By starting TOMCAT: $ sudo /opt/apache-tomcat-6.0.14/bin/./startup.sh
> Using CATALINA_BASE: /opt/apache-tomcat-6.0.14
> Using CATALINA_HOME: /opt/apache-tomcat-6.0.14
> Using CATALINA_TMPDIR: /opt/apache-tomcat-6.0.14/temp
> Using JRE_HOME: /opt/java/jdk/jre
>
> OUTPUT FOR PROBLEM 1)
> 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:1273)
>     org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
>
>     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
>     org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>
>     org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>     org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>     java.lang.Thread.run(Thread.java:619)
>
> OUTPUT FOR PROBLEMS 2) and 3)
> org.apache.jasper.JasperException: java.lang.NullPointerException
>     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
>     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
>
>     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> causa raíz
>
> java.lang.NullPointerException
>     org.apache.jsp.query_002dadd_002d2_jsp._jspService(query_002dadd_002d2_jsp.java:107)
>     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
>     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>
>     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> If you had any idea why Tomcat is so unstable, please answer me. I really need to make
this work.
>
> Best regards,
>
>
> *~ Ariela ~*
>
>
>       ¡Todo sobre Amor y Sexo!
> La guía completa para tu vida en Mujer de Hoy.                       
> http://mx.mujer.yahoo.com/
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message