Announcement Announcement Module
Collapse
No announcement yet.
JavaMailSenderImpl Class not found error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JavaMailSenderImpl Class not found error

    This question is really not a CORE question but I think this is the best category for it.


    I thought I would try out the Spring mail interface. When I run my code I get the folowing exception

    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/SharedByteArrayInputStream
    at org.springframework.mail.javamail.JavaMailSenderIm pl.createMimeMessage(JavaMailSenderImpl.java:241)
    at org.springframework.mail.javamail.JavaMailSenderIm pl.send(JavaMailSenderImpl.java:201)
    at org.springframework.mail.javamail.JavaMailSenderIm pl.send(JavaMailSenderImpl.java:190)

    what is throwing me off is why I am seeing a dependency on a com.sun package. If this class is really required where do I get it.

    Thanks

  • #2
    Did you stick activation and javamail in your classpath? SharedByteArrayInputStream is part of the JavaMail jar.

    regards,

    Alef

    BTW there's a readme in teh spring distribution stating all requirements for all different packages Spring contains.

    Comment


    • #3
      well that did it. thanks. I guess I was under the impression that all the javamail stuff was merged into the j2ee.jar. My j2ee.jar has a bunch of the javax.mail classes just none of the com.sun classes.

      Thanks again

      Comment

      Working...
      X