Thanks! Turned out that the problem was I had put some application jars (which were duplicated in WEB-INF/lib) on the runtime classpath. Your post got me to thinking that maybe these weren't necessary. Not only weren't they necessary but removing them made the problem go away. Addition by subtraction.

D'oh!

Larry Isaacs wrote:
-----Original Message-----
From: Steve Cohen [mailto:[EMAIL PROTECTED]
Sent: Monday, September 08, 2008 1:34 PM
To: Tomcat Users List
Subject: stupid tomcat/eclipse question

I've had a stable development environment running Tomcat 6.0 within
Eclipse 3.3.

I did something stupid to configuration and now I can't get away from
this error as soon as the server starts.

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/Servlet
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 ...

In spite of trying putting everything I can think of onto the runtime
classpath I can't make this go away.

The Tomcat batch files deliberately ignore the CLASSPATH environment variable because failing to do so greatly increases the odds 
of Tomcat not starting.  Modifying the runtime classpath in Eclipse is going to have the same effect on your odds of Tomcat 
starting for the exact same reason.  Tomcat 6.0.x only needs bootstrap.jar on the classpath.  Some additional jars get 
"added" automatically by Java per the "Class-Path" attribute in the MANIFEST.MF found in bootstrap.jar.  With 
this set of jars, the bootstrap process will use the "common.loader" property value found in the 
"conf/catalina.properties" file to create the "common" classloader which will contain the javax.servlet 
classes among many others required by the Tomcat server.

Not knowing what your original Tomcat configuration was, it's hard to guess 
what the original change was that caused Tomcat not to start.  Modifying the 
runtime classpath can easily result in this same symptom.  You might try 
creating a new Tomcat server from the same Tomcat runtime in Eclipse and see if 
it will start.  If not, it suggests you have done something to your Tomcat 
installation.

Cheers,
Larry

 Where is Tomcat supposed to find
javax/servlet/Servlet and why was this so easy before and so difficult
now.

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



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





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

Reply via email to