Results 1 to 3 of 3

Thread: JavaMailSenderImpl Class not found error

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Location
    Vermont
    Posts
    27

    Default 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
    David Noel

  2. #2
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    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.

  3. #3
    Join Date
    Aug 2004
    Location
    Vermont
    Posts
    27

    Default

    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
    David Noel

Similar Threads

  1. ERROR: Context initialization failed
    By makhlo in forum Architecture
    Replies: 8
    Last Post: Jul 11th, 2008, 01:41 AM
  2. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. Replies: 4
    Last Post: Aug 17th, 2005, 04:42 AM
  5. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •