如何解决javax / mail / MessagingException? [英] How to resolve javax/mail/MessagingException?
问题描述
ERROR - ContextLoader [177]:上下文初始化失败
org.springframework.beans.factory.BeanDefinitionStoreException:在类中定义名称为com.huahsin68.MyBoc的bean错误路径资源[my-spring.xml]:该类的bean类[com.huahsin68.MyBocImp]依赖于未找到;嵌套异常是java.lang.NoClassDefFoundError:javax / mail / MessagingException
java.lang.NoClassDefFoundError:javax / mail / MessagingException
似乎没有找到MessagingException。我查看了Java Build Path> Libraries,我注意到javax.mail_1.4.0.v200105080615.jar在那里。这个jar文件位于eclipse> plugins文件夹下。有什么办法可以解决这个问题吗?
THanks @!
使用Maven,您可以添加以下依赖关系:
<依赖性>
< groupId> javax.mail< / groupId>
< artifactId> mail< / artifactId>
< version> 1.4.5< / version>
< / dependency>
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 @!
With Maven, you can add the following dependency:
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
</dependency>
这篇关于如何解决javax / mail / MessagingException?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!