You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Edoardo Panfili <ed...@aspix.it> on 2006/05/02 13:24:05 UTC

NoClassDefFoundError: javax/servlet/http/HttpServlet

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

--
edoardo@aspix.it
AIM: edoardopn
Jabber: edoardopa@talk.google.com
tel:075 9142766

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


Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
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
> -- 
> edoardo@aspix.it
> AIM: edoardopn
> Jabber: edoardopa@talk.google.com
> tel:075 9142766
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


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


Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Edoardo Panfili <ed...@aspix.it>.
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
--
edoardo@aspix.it
AIM: edoardopn
Jabber: edoardopa@talk.google.com
tel:075 9142766

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


Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Edoardo Panfili <ed...@aspix.it>.
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: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


-- 
edoardo@aspix.it
AIM: edoardopn
Jabber: edoardopa@talk.google.com
tel:075 9142766

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


Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
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: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>


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


Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Edoardo Panfili <ed...@aspix.it>.
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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


-- 
edoardo@aspix.it
AIM: edoardopn
Jabber: edoardopa@talk.google.com
tel:075 9142766

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


Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Edoardo Panfili <ed...@aspix.it>.
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

-- 
edoardo@aspix.it
AIM: edoardopn
Jabber: edoardopa@talk.google.com
tel:075 9142766

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


Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Edoardo Panfili <ed...@aspix.it>.
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 <ed...@aspix.it> 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
-- 
edoardo@aspix.it
AIM: edoardopn
Jabber: edoardopa@talk.google.com
tel:075 9142766

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


Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Marc Farrow <ma...@gmail.com>.
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 <ed...@aspix.it> 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
> --
> edoardo@aspix.it
> AIM: edoardopn
> Jabber: edoardopa@talk.google.com
> tel:075 9142766
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


--
Marc Farrow

Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Edoardo Panfili <ed...@aspix.it>.
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
-- 
edoardo@aspix.it
AIM: edoardopn
Jabber: edoardopa@talk.google.com
tel:075 9142766

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


Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Marc Farrow <ma...@gmail.com>.
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 <ed...@aspix.it> 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
>
> --
> edoardo@aspix.it
> AIM: edoardopn
> Jabber: edoardopa@talk.google.com
> tel:075 9142766
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


--
Marc Farrow

Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Edoardo Panfili <ed...@aspix.it>.
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

-- 
edoardo@aspix.it
AIM: edoardopn
Jabber: edoardopa@talk.google.com
tel:075 9142766

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


Re: NoClassDefFoundError: javax/servlet/http/HttpServlet

Posted by Marc Farrow <ma...@gmail.com>.
This seems like the classic "you are using a java JRE versus a java JDK".

On 5/2/06, Edoardo Panfili <ed...@aspix.it> 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
>
> --
> edoardo@aspix.it
> AIM: edoardopn
> Jabber: edoardopa@talk.google.com
> tel:075 9142766
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


--
Marc Farrow