Reputation: 6989
I am using eclipse indigo to run my tomcat server, when I am launching tomcat server, the tomcat server successfully up and running, but with error shown in the console.
ERROR - ContextLoader[177]: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'com.huahsin68.MyBoc' defined in class path resource [my-spring.xml]: Class that bean class [com.huahsin68.MyBocImp] depends on not found; nested exception is java.lang.NoClassDefFoundError: javax/mail/MessagingException
java.lang.NoClassDefFoundError: javax/mail/MessagingException
It seems like the MessagingException wasn't found. I have check in the Java Build Path > Libraries, I notice that javax.mail_1.4.0.v200105080615.jar was there. This jar file is locate under eclipse > plugins folder. Is there anything solution to rectify this problem?
THanks @!
Upvotes: 12
Views: 68375
Reputation: 609
For those conning late in this .. I got the same error resolved by adding below jar. geronimo-javamail_1.4_mail-1.8.3.jar
Upvotes: 0
Reputation: 43334
For gradle/android users, in build.gradle (Module app)
:
compile 'javax.mail:mail:1.4.1'
Upvotes: 7
Reputation: 79847
I had a similar problem, running tomcat stand-alone (that is, not through Eclipse). I copied mail-1.4.jar to my tomcat/lib directory. This worked for me.
Upvotes: 2
Reputation: 54880
With Maven, you can add the following dependency:
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
</dependency>
Upvotes: 20
Reputation: 54810
Try the following:
That should do it.
Upvotes: 11