Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
Check you didn't add servlet-api to your webapp classpath. The servlet-api must *not* be present in WEB-INF/lib Ghodmode a écrit : I've had some problems loading servlets, so I tried a basic HelloWorld just to make sure everything was working. java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet servlet-api.jar is in $CATALINA_HOME/lib just like it's supposed to be. All of the example JSPs and servlets work fine. Does anyone know what I might be doing wrong? Apache Tomcat 6.0.14 Java 1.6.0_02-b05 Here's my HelloServlet.java: @home:~/dev/tomcat/webapps$ cat HelloServlet/WEB-INF/classes/mypackage/HelloServlet.java package mypackage; import javax.servlet.http.*; import javax.servlet.http.HttpServlet; import javax.servlet.*; import java.io.*; public class HelloServlet extends HttpServlet { public void doGet( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException { PrintWriter writer = resp.getWriter(); writer.println( lt;h1Hello Worldlt;/h1 ); } } Here's my web.xml: @home:~/dev/tomcat/webapps$ cat HelloServlet/WEB-INF/web.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameHelloServlet/servlet-name servlet-classmypackage.HelloServlet/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/helloservlet/*/url-pattern /servlet-mapping /web-app Thank you, -- Ghodmode - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
Thanks for your reply David. For this servlet there's nothing in WEB-INF/lib. If it was a standalone Java app, I guess the CLASSPATH would definitely be the first thing to check. Is there a way to check the classpath that a servlet is using when it's executed by Tomcat's VM? Thank you, Vince On 9/4/07, David Delbecq [EMAIL PROTECTED] wrote: Check you didn't add servlet-api to your webapp classpath. The servlet-api must *not* be present in WEB-INF/lib Ghodmode a écrit : I've had some problems loading servlets, so I tried a basic HelloWorld just to make sure everything was working. java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet servlet-api.jar is in $CATALINA_HOME/lib just like it's supposed to be. All of the example JSPs and servlets work fine. Does anyone know what I might be doing wrong? Apache Tomcat 6.0.14 Java 1.6.0_02-b05 Here's my HelloServlet.java: @home:~/dev/tomcat/webapps$ cat HelloServlet/WEB-INF/classes/mypackage/HelloServlet.java package mypackage; import javax.servlet.http.*; import javax.servlet.http.HttpServlet; import javax.servlet.*; import java.io.*; public class HelloServlet extends HttpServlet { public void doGet( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException { PrintWriter writer = resp.getWriter(); writer.println( lt;h1Hello Worldlt;/h1 ); } } Here's my web.xml: @home:~/dev/tomcat/webapps$ cat HelloServlet/WEB-INF/web.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameHelloServlet/servlet-name servlet-classmypackage.HelloServlet/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/helloservlet/*/url-pattern /servlet-mapping /web-app Thank you, -- Ghodmode - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
Is servlet-api.jar in $CATALINA_HOME/common/lib M-- --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. - Original Message - From: Ghodmode [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Monday, September 03, 2007 4:49 PM Subject: NoClassDefFoundError: javax/servlet/http/HttpServlet I've had some problems loading servlets, so I tried a basic HelloWorld just to make sure everything was working. java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet servlet-api.jar is in $CATALINA_HOME/lib just like it's supposed to be. All of the example JSPs and servlets work fine. Does anyone know what I might be doing wrong? Apache Tomcat 6.0.14 Java 1.6.0_02-b05 Here's my HelloServlet.java: @home:~/dev/tomcat/webapps$ cat HelloServlet/WEB-INF/classes/mypackage/HelloServlet.java package mypackage; import javax.servlet.http.*; import javax.servlet.http.HttpServlet; import javax.servlet.*; import java.io.*; public class HelloServlet extends HttpServlet { public void doGet( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException { PrintWriter writer = resp.getWriter(); writer.println( lt;h1Hello Worldlt;/h1 ); } } Here's my web.xml: @home:~/dev/tomcat/webapps$ cat HelloServlet/WEB-INF/web.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameHelloServlet/servlet-name servlet-classmypackage.HelloServlet/servlet-class /servlet servlet-mapping servlet-nameHelloServlet/servlet-name url-pattern/helloservlet/*/url-pattern /servlet-mapping /web-app Thank you, -- Ghodmode
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
On 9/4/07, Martin Gainty [EMAIL PROTECTED] wrote: Is servlet-api.jar in $CATALINA_HOME/common/lib I've see reference to it on some forums, but there's no common directory in my Tomcat installation. -- Vince
RE: NoClassDefFoundError: javax/servlet/http/HttpServlet
From: Martin Gainty [mailto:[EMAIL PROTECTED] Subject: Re: NoClassDefFoundError: javax/servlet/http/HttpServlet Is servlet-api.jar in $CATALINA_HOME/common/lib As clearly stated by the OP, he's using Tomcat 6 and servlet-api.jar is in $CATALINA-HOME/lib, exactly where it's supposed to be. $CATALINA_HOME/common/lib is used only on older versions of Tomcat. David D already pointed out the likely cause of the problem. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: NoClassDefFoundError: javax/servlet/http/HttpServlet
From: David Delbecq [mailto:[EMAIL PROTECTED] Subject: Re: NoClassDefFoundError: javax/servlet/http/HttpServlet Check also it's neither in shared/lib and that there is no CLASSPATH defined (tomcat handles all by itself classpath). There wouldn't be a shared/lib, since this is Tomcat 6 (unless catalina.properties has been modified). If there's an IDE being used, it could easily have set CLASSPATH or put the servlet-api.jar in an inappropriate place, as you suggested. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
On 9/4/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: ... David D already pointed out the likely cause of the problem. - Chuck Unfortunately, David's idea wasn't a solution for me. There aren't any files in my WEB-INF/lib directory. I only created this HelloServlet to eliminate other possible causes of this problem with more complex servlets. One detail that I forgot to mention is that if I only add one web application, it works fine. There's only a problem when I add more than one application to the webapps directory. Because of this, it occurred to me that I might somehow be causing a conflict with how I am putting the web apps in there. However, the problem even occurs when I have two identical HelloServlet classes which differ only in the name of the subdirectory to the webapps folder and the name of their class. When I try to set this up, I stop Tomcat, build the directory, compile the class (javac -cp ~/dev/tomcat/lib/servlet-api.jarmypackage/HelloServlet.java), and start Tomcat again. When I do this, one always works and the others fail. I'm not using WAR files. I'm just putting all of the files in the necessary locations already exploded. Is this significant? Thank you, Vince
RE: NoClassDefFoundError: javax/servlet/http/HttpServlet
From: Ghodmode [mailto:[EMAIL PROTECTED] Subject: Re: NoClassDefFoundError: javax/servlet/http/HttpServlet I'm not using WAR files. I'm just putting all of the files in the necessary locations already exploded. Is this significant? Perhaps. Exactly what is your structure under webapps? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
On 9/4/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: David Delbecq [mailto:[EMAIL PROTECTED] Subject: Re: NoClassDefFoundError: javax/servlet/http/HttpServlet Check also it's neither in shared/lib and that there is no CLASSPATH defined (tomcat handles all by itself classpath). There wouldn't be a shared/lib, since this is Tomcat 6 (unless catalina.properties has been modified). If there's an IDE being used, it could easily have set CLASSPATH or put the servlet-api.jar in an inappropriate place, as you suggested. - Chuck Confirmed... I don't have a shared directory. I don't have the CLASSPATH environment variable set. I haven't modified catalina.properties. I was trying to use Eclipse, but that has so far proved to have more challenges than benefits. So, I stopped. Just to make sure I had a clean environment, I removed my tomcat directory and untarred it again and I guess that must have fixed something. Now, the problem has at least changed. All of the copies of HelloServlet work, but the application I which I need to run still generates the NoClassDefFoundError. More to come... with a new subject line :) Thank you for your help :) -- Vince
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
This seems like the classic you are using a java JRE versus a java JDK. On 5/2/06, Edoardo Panfili [EMAIL PROTECTED] wrote: I did some search on google but seems that my situation is not the same I have a very simple webapp, (no lib directory in WEB-INF) in a fresh installation of Tomcat 5.5.17. The only add from me is the postgres jdbc driver postgresql-8.1-405.jdbc3.jar in the $tomcat/common/lib My system is: Linux 2.6.15-1-686 (Debian testing) and the java VM is the one from Sun: java version 1.5.0_06 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) Why tomcat throws this exception? 2-mag-2006 12.48.37 org.apache.catalina.core.StandardWrapperValve invoke GRAVE: Allocate exception for servlet UltimiDownload java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.catalina.loader.WebappClassLoader.loadClass( WebappClassLoader.java:1267) at org.apache.catalina.loader.WebappClassLoader.loadClass( WebappClassLoader.java:1198) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java :1034) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java :757) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:130) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java :148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) To reload the application I stop and restart tomcat. It seem that Tomcat works better (after some restart it producesed the exceeption some other times no) if I remove $tomcat/work/Catalina/ but it sound strange for me... thanks Edoardo -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Farrow
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
Marc Farrow wrote: This seems like the classic you are using a java JRE versus a java JDK. I am using jdk1.5.0_06 edoardo -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
I do not doubt that. However, depending on what O.S. you are using you need to check your JAVA_HOME environment entry or even windows registry. On 5/2/06, Edoardo Panfili [EMAIL PROTECTED] wrote: Marc Farrow wrote: This seems like the classic you are using a java JRE versus a java JDK. I am using jdk1.5.0_06 edoardo -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Farrow
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
Marc Farrow wrote: I do not doubt that. However, depending on what O.S. you are using you need to check your JAVA_HOME environment entry or even windows registry. export JAVA_HOME=/opt/jdk/ (jdk is a simboilik link to the 1.5 jdk folder) Tomcat now says no Class definition found regarding italian3d.download.Ricerca but = elrond:/opt/tomcat# ls -l webapps/i3d/WEB-INF/classes/italian3d/download/ totale 24 drwxr-xr-x 2 edoardo 502 128 2006-05-02 12:09 CVS -rw-r--r-- 1 edoardo 502 3776 2006-05-02 12:44 Inserzione.class -rw-r--r-- 1 edoardo 502 2823 2004-03-11 14:12 Inserzione.java -rw-r--r-- 1 edoardo 502 4089 2006-05-02 12:44 Modifica.class -rw-r--r-- 1 edoardo 502 3152 2004-03-11 14:12 Modifica.java -rw-r--r-- 1 edoardo 502 3765 2006-05-02 12:44 Ultimi.class -rw-r--r-- 1 edoardo 502 3346 2006-05-02 12:41 Ultimi.java = all works fine for the past 2 years under tomcat 5.0 three days ago we migrated uor system to a new Debian, JDK, and Tomcat not a great idea? edoardo -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
It looks like you found the next problems. On your ls command it is not showing the Ricerca class file. So you must be missing resources when you migrated over. On 5/2/06, Edoardo Panfili [EMAIL PROTECTED] wrote: Marc Farrow wrote: I do not doubt that. However, depending on what O.S. you are using you need to check your JAVA_HOME environment entry or even windows registry. export JAVA_HOME=/opt/jdk/ (jdk is a simboilik link to the 1.5 jdk folder) Tomcat now says no Class definition found regarding italian3d.download.Ricerca but = elrond:/opt/tomcat# ls -l webapps/i3d/WEB-INF/classes/italian3d/download/ totale 24 drwxr-xr-x 2 edoardo 502 128 2006-05-02 12:09 CVS -rw-r--r-- 1 edoardo 502 3776 2006-05-02 12:44 Inserzione.class -rw-r--r-- 1 edoardo 502 2823 2004-03-11 14:12 Inserzione.java -rw-r--r-- 1 edoardo 502 4089 2006-05-02 12:44 Modifica.class -rw-r--r-- 1 edoardo 502 3152 2004-03-11 14:12 Modifica.java -rw-r--r-- 1 edoardo 502 3765 2006-05-02 12:44 Ultimi.class -rw-r--r-- 1 edoardo 502 3346 2006-05-02 12:41 Ultimi.java = all works fine for the past 2 years under tomcat 5.0 three days ago we migrated uor system to a new Debian, JDK, and Tomcat not a great idea? edoardo -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Marc Farrow
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
Marc Farrow wrote: It looks like you found the next problems. On your ls command it is not showing the Ricerca class file. So you must be missing resources when you migrated over. On 5/2/06, Edoardo Panfili [EMAIL PROTECTED] wrote: Marc Farrow wrote: I do not doubt that. However, depending on what O.S. you are using you need to check your JAVA_HOME environment entry or even windows registry. export JAVA_HOME=/opt/jdk/ (jdk is a simboilik link to the 1.5 jdk folder) Tomcat now says no Class definition found regarding italian3d.download.Ricerca but = elrond:/opt/tomcat# ls -l webapps/i3d/WEB-INF/classes/italian3d/download/ totale 24 drwxr-xr-x 2 edoardo 502 128 2006-05-02 12:09 CVS -rw-r--r-- 1 edoardo 502 3776 2006-05-02 12:44 Inserzione.class -rw-r--r-- 1 edoardo 502 2823 2004-03-11 14:12 Inserzione.java -rw-r--r-- 1 edoardo 502 4089 2006-05-02 12:44 Modifica.class -rw-r--r-- 1 edoardo 502 3152 2004-03-11 14:12 Modifica.java -rw-r--r-- 1 edoardo 502 3765 2006-05-02 12:44 Ultimi.class -rw-r--r-- 1 edoardo 502 3346 2006-05-02 12:41 Ultimi.java = I'm sorry for the stupid post! this error is evident! there is somethings wrog in my develope/deploy/me system. I'll begin from scratch. thank you edoardo -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
Edoardo Panfili wrote: Marc Farrow wrote: there is somethings wrog in my develope/deploy/me system. I'll begin from scratch. After a fresh installation the problem is still here (but not after all restarts). sometimes Tocat throws this exception java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) atjava.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) but this not happens all the times, after a restart Tomcat now works correctly. I can't figure why. In the original situation I have also another VM installed (I didn't know) but I have removed libgcj6 and all the dipendencies. In catalina.log I can find: Exception in thread main java.lang.NoClassDefFoundError: while resolving class: org.apache.catalina.startup.Bootstrap at java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0) at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.6.0.0) at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0) at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0) at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/opt/tomcat/bin/bootstrap.jar,file:/ opt/tomcat/bin/commons-logging-api.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0) at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0) at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0) ...4 more = but now libgcj.so is no longer in my system The first line of catalina.sh is export JAVA_HOME=/opt/jdk Tomcats starts up with no problems. my libc version is 2.3.6 kernel version is 2.6.15 and the Sun JVM is 1.5.0_06 Now the system works but I don't know why. thanks Edoardo Panfili -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
try running a different VM, like the Sun VM, this could be a bug in the VM you are running. Filip Edoardo Panfili wrote: Edoardo Panfili wrote: Marc Farrow wrote: there is somethings wrog in my develope/deploy/me system. I'll begin from scratch. After a fresh installation the problem is still here (but not after all restarts). sometimes Tocat throws this exception java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) atjava.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) but this not happens all the times, after a restart Tomcat now works correctly. I can't figure why. In the original situation I have also another VM installed (I didn't know) but I have removed libgcj6 and all the dipendencies. In catalina.log I can find: Exception in thread main java.lang.NoClassDefFoundError: while resolving class: org.apache.catalina.startup.Bootstrap at java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0) at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.6.0.0) at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0) at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0) at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/opt/tomcat/bin/bootstrap.jar,file:/ opt/tomcat/bin/commons-logging-api.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0) at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0) at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0) ...4 more = but now libgcj.so is no longer in my system The first line of catalina.sh is export JAVA_HOME=/opt/jdk Tomcats starts up with no problems. my libc version is 2.3.6 kernel version is 2.6.15 and the Sun JVM is 1.5.0_06 Now the system works but I don't know why. thanks Edoardo Panfili - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
Filip Hanik - Dev Lists wrote: try running a different VM, like the Sun VM, this could be a bug in the VM you are running. I am runnig Sun JVM 1.5.0_06 I have removed libcgj at 16:18 I did a complere reboot at 16:20 at 16:48 I have a log of this error in localhost.2006-05-02.log Edoardo Filip Edoardo Panfili wrote: Edoardo Panfili wrote: Marc Farrow wrote: there is somethings wrog in my develope/deploy/me system. I'll begin from scratch. After a fresh installation the problem is still here (but not after all restarts). sometimes Tocat throws this exception java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) atjava.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) but this not happens all the times, after a restart Tomcat now works correctly. I can't figure why. In the original situation I have also another VM installed (I didn't know) but I have removed libgcj6 and all the dipendencies. In catalina.log I can find: Exception in thread main java.lang.NoClassDefFoundError: while resolving class: org.apache.catalina.startup.Bootstrap at java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0) at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.6.0.0) at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0) at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0) at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/opt/tomcat/bin/bootstrap.jar,file:/ opt/tomcat/bin/commons-logging-api.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0) at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0) at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0) ...4 more = but now libgcj.so is no longer in my system The first line of catalina.sh is export JAVA_HOME=/opt/jdk Tomcats starts up with no problems. my libc version is 2.3.6 kernel version is 2.6.15 and the Sun JVM is 1.5.0_06 Now the system works but I don't know why. thanks Edoardo Panfili - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
if you are running the Sun VM, why is this in your stack trace? at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) my guess is that you forgot to do this export PATH=$JAVA_HOME/bin:$PATH in catalina.sh Filip Edoardo Panfili wrote: Filip Hanik - Dev Lists wrote: try running a different VM, like the Sun VM, this could be a bug in the VM you are running. I am runnig Sun JVM 1.5.0_06 I have removed libcgj at 16:18 I did a complere reboot at 16:20 at 16:48 I have a log of this error in localhost.2006-05-02.log Edoardo Filip Edoardo Panfili wrote: Edoardo Panfili wrote: Marc Farrow wrote: there is somethings wrog in my develope/deploy/me system. I'll begin from scratch. After a fresh installation the problem is still here (but not after all restarts). sometimes Tocat throws this exception java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) atjava.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) but this not happens all the times, after a restart Tomcat now works correctly. I can't figure why. In the original situation I have also another VM installed (I didn't know) but I have removed libgcj6 and all the dipendencies. In catalina.log I can find: Exception in thread main java.lang.NoClassDefFoundError: while resolving class: org.apache.catalina.startup.Bootstrap at java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0) at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.6.0.0) at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0) at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0) at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/opt/tomcat/bin/bootstrap.jar,file:/ opt/tomcat/bin/commons-logging-api.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0) at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0) at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0) ...4 more = but now libgcj.so is no longer in my system The first line of catalina.sh is export JAVA_HOME=/opt/jdk Tomcats starts up with no problems. my libc version is 2.3.6 kernel version is 2.6.15 and the Sun JVM is 1.5.0_06 Now the system works but I don't know why. thanks Edoardo Panfili - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
Filip Hanik - Dev Lists wrote: if you are running the Sun VM, why is this in your stack trace? at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) The stack is the one that Tomcat has print before the remove of gcj. But the error is still here also after the remove. my guess is that you forgot to do this export PATH=$JAVA_HOME/bin:$PATH in catalina.sh yes, i forgot this. But, sorry for the question, is it possible that this error causes my problems? thank you Edoardo Filip Edoardo Panfili wrote: Filip Hanik - Dev Lists wrote: try running a different VM, like the Sun VM, this could be a bug in the VM you are running. I am runnig Sun JVM 1.5.0_06 I have removed libcgj at 16:18 I did a complere reboot at 16:20 at 16:48 I have a log of this error in localhost.2006-05-02.log Edoardo Filip Edoardo Panfili wrote: Edoardo Panfili wrote: Marc Farrow wrote: there is somethings wrog in my develope/deploy/me system. I'll begin from scratch. After a fresh installation the problem is still here (but not after all restarts). sometimes Tocat throws this exception java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) atjava.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) but this not happens all the times, after a restart Tomcat now works correctly. I can't figure why. In the original situation I have also another VM installed (I didn't know) but I have removed libgcj6 and all the dipendencies. In catalina.log I can find: Exception in thread main java.lang.NoClassDefFoundError: while resolving class: org.apache.catalina.startup.Bootstrap at java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0) at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.6.0.0) at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0) at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0) at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/opt/tomcat/bin/bootstrap.jar,file:/ opt/tomcat/bin/commons-logging-api.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0) at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0) at java.lang.ClassLoader.loadClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0) ...4 more = but now libgcj.so is no longer in my system The first line of catalina.sh is export JAVA_HOME=/opt/jdk Tomcats starts up with no problems. my libc version is 2.3.6 kernel version is 2.6.15 and the Sun JVM is 1.5.0_06 Now the system works but I don't know why. thanks Edoardo Panfili - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
Edoardo Panfili wrote: Filip Hanik - Dev Lists wrote: if you are running the Sun VM, why is this in your stack trace? at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) The stack is the one that Tomcat has print before the remove of gcj. But the error is still here also after the remove. my guess is that you forgot to do this export PATH=$JAVA_HOME/bin:$PATH in catalina.sh yes, i forgot this. But, sorry for the question, is it possible that this error causes my problems? PS: I have an OS X 10.3 machine running from 2004 without this setting. thanks again Edoardo -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NoClassDefFoundError: javax/servlet/http/HttpServlet
it should work without that setting assuming that tomcat picks up the file setclasspath.sh correctly, the reason I mentioned it is cause the sunVM doesn't have a gnu.java.lang.MainThread class, so I would suspect that you are not running the VM you think you are running. Of course, I know very little about OS-X, but that is where I would recommend you to start looking Filip Edoardo Panfili wrote: Edoardo Panfili wrote: Filip Hanik - Dev Lists wrote: if you are running the Sun VM, why is this in your stack trace? at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0) The stack is the one that Tomcat has print before the remove of gcj. But the error is still here also after the remove. my guess is that you forgot to do this export PATH=$JAVA_HOME/bin:$PATH in catalina.sh yes, i forgot this. But, sorry for the question, is it possible that this error causes my problems? PS: I have an OS X 10.3 machine running from 2004 without this setting. thanks again Edoardo -- [EMAIL PROTECTED] AIM: edoardopn Jabber: [EMAIL PROTECTED] tel:075 9142766 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]