You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Beau Hebert <bh...@connellypartners.com> on 2005/03/25 15:08:15 UTC

Problem with Tomcat Upgrade 4.0 to 5.5

Hello -

I am in the processs of upgrading from Tomcat 4.0 to Tomcat 5.5. I have an application that runs on Linux-Java-Tomcat-MySQL. Before I think about upgrading the production environment, I am configuring the development environment first, which runs on Windows XP and not Linux. I've installed Apache Tomcat 5.5.5 using JDK 1.4.2_06 along with the compat classes for JDK 1.4. (BTW, I still have Tomcat 4.0.1 installed, but as a different service and it is not running). I've updated my CATALINA_HOME & TOMCAT_HOME variables to reflect the new Tomcat install (c:\tomcat5). The Tomcat homepage runs nicely along with the examples and the manager console. The application that I am trying to get up and running works flawlessly on Tomcat 4. However, when I build the application to the Tomcat5 directrory, and configure the new context and whatnot, I receive the follwing error upon browsing to the index page:

exception:
javax.servlet.ServletException: javax/mail/Message

root cause:
java.lang.NoClassDefFoundError: javax/mail/Message

I'm not sure, but it seems that the compiler (or is it the container?) can't find the class. My CLASSPATH is the following:

.;C:\tomcat5\common\lib\servlet-api.jar;C:\tomcat5\common\lib\jsp-api.jar;c:\jdk\bin;c:\jdk\lib\tools.jar;

There should not be a problem with the code as I am using the same jdk and the app runs on Tomcat4. I have the full stack trace available if necessary.

Any help or suggestions is appreciated.
Thanks,
Beau 

Re: Problem with Tomcat Upgrade 4.0 to 5.5

Posted by Beau Hebert <bh...@connellypartners.com>.
Thanks for the response Jason. I've removed my classpath, but still getting 
the same error. Any other suggestions?

Rgds,
Beau

----- Original Message ----- 
From: "Jason Bainbridge" <jb...@gmail.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Friday, March 25, 2005 10:23 AM
Subject: Re: Problem with Tomcat Upgrade 4.0 to 5.5


> On Fri, 25 Mar 2005 09:08:15 -0500, Beau Hebert
> <bh...@connellypartners.com> wrote:
>> Hello -
>
>> exception:
>> javax.servlet.ServletException: javax/mail/Message
>>
>> root cause:
>> java.lang.NoClassDefFoundError: javax/mail/Message
>>
>> I'm not sure, but it seems that the compiler (or is it the container?) 
>> can't find the class. My CLASSPATH is the following:
>>
>> .;C:\tomcat5\common\lib\servlet-api.jar;C:\tomcat5\common\lib\jsp-api.jar;c:\jdk\bin;c:\jdk\lib\tools.jar;
>
> Let Tomcat take care of setting the classpath don't set it yourself,
> it is finding your class but more than one and getting confused as a
> result.
>
> Regards,
> -- 
> Jason Bainbridge
> http://kde.org - webmaster@kde.org
> Personal Site - http://jasonbainbridge.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


Re: Problem with Tomcat Upgrade 4.0 to 5.5

Posted by Jason Bainbridge <jb...@gmail.com>.
On Fri, 25 Mar 2005 09:08:15 -0500, Beau Hebert
<bh...@connellypartners.com> wrote:
> Hello -

> exception:
> javax.servlet.ServletException: javax/mail/Message
> 
> root cause:
> java.lang.NoClassDefFoundError: javax/mail/Message
> 
> I'm not sure, but it seems that the compiler (or is it the container?) can't find the class. My CLASSPATH is the following:
> 
> .;C:\tomcat5\common\lib\servlet-api.jar;C:\tomcat5\common\lib\jsp-api.jar;c:\jdk\bin;c:\jdk\lib\tools.jar;

Let Tomcat take care of setting the classpath don't set it yourself,
it is finding your class but more than one and getting confused as a
result.

Regards,
-- 
Jason Bainbridge
http://kde.org - webmaster@kde.org
Personal Site - http://jasonbainbridge.com

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


Re: Problem with Tomcat Upgrade 4.0 to 5.5

Posted by QM <qm...@brandxdev.net>.
On Fri, Mar 25, 2005 at 09:08:15AM -0500, Beau Hebert wrote:
: I am in the processs of upgrading from Tomcat 4.0 to Tomcat 5.5. I have an
: application that runs on Linux-Java-Tomcat-MySQL.
: [snip]
: javax.servlet.ServletException: javax/mail/Message

As someone else already pointed out, you no longer have to (nor should)
set your own classpath.

Second, Tomcat no longer ships with the JavaMail JARs; either copy those
from your old install or just download new ones from java.sun.com.

Third, I have a brief Tomcat 4.x -> 5.x upgrade guide on my website:

	http://www.brandxdev.net/misc/index.site

Feel free to give that a skim.

-QM


-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

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