- This topic has 7 replies, 2 voices, and was last updated 19 years, 12 months ago by Riyad Kalla.
-
AuthorPosts
-
Andrew ChengParticipantI 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.
Riyad KallaMemberayc,
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
Andrew ChengParticipantMY 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.
Andrew ChengParticipant@ayc868 wrote:
If not deploy, why exist in the project. I am working on mail.
javamail1.3.1 was working builded with Ant.
Andrew ChengParticipantIt 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]
Andrew ChengParticipantbasicly just called javax.mail.Transport.send.
The new activation.jar do NOT have com/sun/activation/registries/LogSupport classesjavax.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)
Andrew ChengParticipantI 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?
Riyad KallaMemberI don’t know ayc, it has something to do with classloading that is Tomcat specific.
-
AuthorPosts