PDA

View Full Version : Problem with JavaMailSenderImpl



crazeinc
Feb 3rd, 2005, 11:30 AM
I'm getting this error:



org.springframework.beans.factory.BeanDefinitionSt oreException: Error registering bean with name 'mailSender' defined in ServletContext resource [/WEB-INF/applicationContext-common-business.xml]: Class that bean class [org.springframework.mail.javamail.JavaMailSenderI mpl] depends on not found; nested exception is java.lang.NoClassDefFoundError: javax/mail/MessagingException


with this piece of code:


<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderIm pl">
<property name="host"><value>localhost</value></property>
</bean>


I'm stratching my head over this one, what did I miss?

robh
Feb 3rd, 2005, 11:39 AM
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

crazeinc
Feb 3rd, 2005, 12:54 PM
Thanks, I figured with the package name that it was in the spring jar. Bad assumption to make apparently :wink: