关于web service 中SOAP的配置

配置SOAP报错
在tom5上装soap,进入soap/admin/后报错:
type Exception report
message
description The server encountered an internal error () that divvented it from fulfilling this request.
exception
org.apache.jasper.JasperException: javax/mail/MessagingException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.ServletException: javax/mail/MessagingException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.admin.deploy_jsp._jspService(deploy_jsp.java:500)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NoClassDefFoundError: javax/mail/MessagingException
org.apache.jsp.admin.deploy_jsp._jspService(deploy_jsp.java:60)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

居然没找到mail/MessagingException,虽然指定了CLASSPATH还是不行,最后把mail.jar和activation.jar拷到cocommon\bin下才解决了问题。

我认为问题的原因不在于CLASSPATH的问题,而是SOAP本身的机制就必须采用javamail的通信方式,因此不能少这两个jar包
参考:http://www.99inf.net/SoftwareDev/Java/43556.htm

你可能感兴趣的:(java,apache,Web,servlet,SOAP)