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

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

问题描述

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

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

似乎没有找到 MessagingException.我检查了 Java Build Path > Libraries,我注意到 javax.mail_1.4.0.v200105080615.jar 在那里.这个 jar 文件位于 eclipse > plugins 文件夹下.有什么办法可以解决这个问题吗?

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?

谢谢@!

推荐答案

使用 Maven,您可以添加以下依赖项:

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天全站免登陆