facebook

JavaMail & activation.jar for j2EE 1.3 [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #219857 Reply

    Andrew Cheng
    Participant

    I have a workable email code, but no longer work after import/reploy
    with myEclipse. I search the website as following,

    Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport at javax.activation.MailcapCommandMap.(MailcapCommandMap.java:111)
    The problem is that the new JDK j2ee.jar has an incorrect version of the class MailcapCommandMap in it.

    Solution : Make sure you have the latest version of JAF (activation.jar). This jar has the correct version of MailcapCommandMap. Then delete the entire activation package from your j2ee.jar.

    #219862 Reply

    Riyad Kalla
    Member

    ayc,
    Are you getting exactly this exception? Did you try the solution? What J2EE libs are you deploying with your project? The J2EE 1.4 libs that ship with MyEclipse are the JBoss ones AND they do not get deployed, so you want to double check your Application Server is setup correctly, and be sure to deploy the newest release of Java Activation Framework with your app in your WEB-INF/lib dir, here is a quicklink for convenience: http://java.sun.com/products/javabeans/glasgow/jaf.html

    #219901 Reply

    Andrew Cheng
    Participant

    MY 3.8.2 project property show it is J2EE 1.3 not 1.4.
    If not deploy, why exist in the project. I am working on mail.
    javamail1.3.1 was working builded with Ant.

    #219902 Reply

    Andrew Cheng
    Participant

    @ayc868 wrote:

    If not deploy, why exist in the project. I am working on mail.
    javamail1.3.1 was working builded with Ant.

    #219903 Reply

    Andrew Cheng
    Participant

    It is J2EE 1.4, I was looking the old project
    If not deploy, why exist in the project. I am working on mail.
    javamail1.3.1 was working builded with Ant.[/quote][/quote]

    #219904 Reply

    Andrew Cheng
    Participant

    basicly just called javax.mail.Transport.send.
    The new activation.jar do NOT have com/sun/activation/registries/LogSupport classes

    javax.servlet.ServletException: Servlet execution threw an exception

    root cause

    java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
    javax.activation.MailcapCommandMap.(MailcapCommandMap.java:111)
    javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:44)
    javax.activation.DataHandler.getCommandMap(DataHandler.java:136)
    javax.activation.DataHandler.getDataContentHandler(DataHandler.java:567)
    javax.activation.DataHandler.writeTo(DataHandler.java:294)
    javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:230)
    javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1065)
    javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1923)
    javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1904)
    javax.mail.Transport.send(Transport.java:79)
    aeris.utils.SendMail.send(SendMail.java:100)
    aeris.utils.SendMail.sendEmail(SendMail.java:46)
    com.aeris.hibernate.CspUsersService.sendPassword(CspUsersService.java:455)
    aeris.controller.SendPasswordServlet.doPost(SendPasswordServlet.java:48)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

    #219906 Reply

    Andrew Cheng
    Participant

    I made it work. Copied the new activation.jar and javamail 1.3.2 to Tomcat share/lib work.
    if include in the myEclipse and deploy in the application do not work. can you tell me why?

    #219915 Reply

    Riyad Kalla
    Member

    I don’t know ayc, it has something to do with classloading that is Tomcat specific.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: JavaMail & activation.jar for j2EE 1.3 [Closed]

You must be logged in to post in the forum log in