Announcement Announcement Module
Collapse
No announcement yet.
Problem with JavaMailSenderImpl Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with JavaMailSenderImpl

    I'm getting this error:

    Code:
    org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'mailSender' defined in ServletContext resource [/WEB-INF/applicationContext-common-business.xml]: Class that bean class [org.springframework.mail.javamail.JavaMailSenderImpl] depends on not found; nested exception is java.lang.NoClassDefFoundError: javax/mail/MessagingException
    with this piece of code:
    Code:
    	<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
    	    <property name="host"><value>localhost</value></property>
    	</bean>
    I'm stratching my head over this one, what did I miss?

  • #2
    You need to have the JavaMail and Java Activation Framework JARs on your classpath. These are mail.jar and activation.jar. Plus you will need the JAR files for the protocols you are using. Spring comes with the first two in lib/j2ee but you can get all the JARs off the Sun website.

    Rob

    Comment


    • #3
      Thanks, I figured with the package name that it was in the spring jar. Bad assumption to make apparently :wink:

      Comment

      Working...
      X