如何解决javax / mail / MessagingException? [英] How to resolve javax/mail/MessagingException?

查看:1544
本文介绍了如何解决javax / mail / MessagingException?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用eclipse indigo来运行我的tomcat服务器,当我启动tomcat服务器时,tomcat服务器成功启动并运行,但在控制台中显示错误。

  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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆