Hi there,

this is little bit about java, so it should not be here at the first view.
I'm sorry for it. But on the second view:

This error is seen when I want to initialize object that use some classes
from javax.mail package for example javax.mail.Message).
I don't have "import javax.mail.Address" written in this object. This object
could look like:

package com.sporak.MyObject;

import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.Message;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.InternetAddress;

public class MyObject {

   private int id;

   public MyObject() {
   }

   public int getId() {...}
   public void setId() {...}

}

When I want to create new object in action class by the expression:
line 29: MyObject o = new MyObject();

The tomcat starts to notifing me an error:

java.lang.NoClassDefFoundError: javax/mail/Address
        com.sporak.MyAction.execute(MyAction.java:29)

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:484)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
        org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
        org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
...

This is not only about java, I think, since this MyAction and this MyObject
worked fine in previous versions of TomCat. Few days ago I've updated TomCat
to 5.0.19 version and this error occures. Interesting is, that:

- in WEB-INF/lib I have j2ee.jar libary with requested class file
(Address.class)
- all other classes from javax.mail package are found and used correctly
- in TomCat 4.1 it works fine, in TomCat 5.0.19 it doesn't work at all

Please, is there anybody, that had had a similiar problem and solved it?
Please does anybody know how to walk throught it?

Thanks for helping.

Best Regards
Honza Spurny


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to