我在jdk1.6,tomcat5下部署在unix服务器上,出现下面异常
errors on smtp
javax.mail.NoSuchProviderException
javax.mail.NoSuchProviderException: smtp
at javax.mail.Session.getService(Session.java:782)
at javax.mail.Session.getTransport(Session.java:708)
at javax.mail.Session.getTransport(Session.java:651)
at javax.mail.Session.getTransport(Session.java:631)
at com.crigh.zp.SendMail.send(SendMail.java:53)
at com.crigh.zp.action.MailAction.sendMail(MailAction.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
仍然是包冲突,在这个服务器的java环境下绝对有雨javamail相关的包,我找了好多,最终找到javamail包,将服务器上这个包删除,就好了。