tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <tomcat-u...@johnturner.com>
Subject Re: More java.lang.NoClassDefFoundError
Date Mon, 14 Jul 2003 12:55:57 GMT

If Tomcat needs the classes at runtime, then they should be under 
CATALINA_HOME.

If you need those same classes at compile time, then the CLASSPATH should 
be updated to point to the location under CATALINA_HOME where the classes 
reside.

John

On Fri, 11 Jul 2003 20:03:03 -0700, <taf@pgmguild.com> wrote:

> OK, I'm going a little (more) crazy here.
>
> I *think* that the problem might be that the mail stuff is the very first 
> use I've made of a J2EE component.  The code is compiled with a CLASSPATH 
> which includes x:\usr\local\j2ee\j2ee.jar.  The standalone code runs 
> fine, and presumably at runtime it finds the same j2ee.jar and that 
> includes javax.mail.*
>
> When I first started having problems I think that they were 
> ClassNotFound, and I was advised to put mail.jar into TOMCAT_HOME\lib.  I 
> found a copy and did that.  However, mail.jar is (I think) older than 
> j2ee.jar (the classes are probably different anyway), and contains (some) 
> of the same classes as j2ee.jar.
>
> If the above is correct, where should the j2ee.jar file go?  And once I 
> move it, I should update the CLASSPATH to point to the same spot, right?
>
> Regards, Terry Fuller
> taf@pgmguild.com
> -------------------------------------------------------
>
>
> In <oprr5cnlyhxvhn30@mail.aas.com>, on 07/11/2003 at 12:51 PM, John 
> Turner <tomcat-user@johnturner.com> said:
>
>
>> It means that the class you told your servlet to use is not
>> the class that  it is actually finding.
>
>> Typically, this means that you have more than one copy of a
>> JAR file (like  servlet.jar) in Tomcat's ClassLoader path,
>> and Tomcat is telling you that  it doesn't know which one
>> to use.
>
>> John
>
>> On Thu, 10 Jul 2003 22:09:01 -0700, <taf@pgmguild.com>
>> wrote:
>
>>> Well, I'm back again for some help.  I'm running Java 1.3.1, Tomcat 
>>> 3.3.1
>>>
>>> I have a small proof of concept java program which uses javax.mail and 
>>> which successfully sends off a note.
>>>
>>> When I incorporate the proof of concept code into a servlet, I get:
>>>
>>> java.lang.NoClassDefFoundError: javax/activation/DataSource
>>>
>>> What am I missing that the straight Java code runs but the servlet 
>>> can't seem to find the parts used by the proof code?
>>>
>>> Is there a general approach for dealing with NoClassDef errors?  I know 
>>> that the message indicates something other than ClassNotFound, but what 
>>> really does it mean?  Pointers to existing doc gratefully received.
>>>
>>> Thanks!
>>>
>>> Regards, Terry Fuller
>>> taf@pgmguild.com
>>> -------------------------------------------------------
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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


Mime
View raw message