2 a398649558 a398649558 于 2012.10.24 16:43 提问

cxf webservice客户端调用报错.高手请进.
<!-- WebServices设置 -->
    <servlet>  
        <servlet-name>CXFServices</servlet-name>  
        <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>  
        <load-on-startup>1</load-on-startup>  
    </servlet>

    <servlet-mapping>  
        <servlet-name>CXFServices</servlet-name>  
        <url-pattern>rvices/*</url-pattern>  
    </servlet-mapping> 

客户端调用异常信息

org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet CXFServices threw exception
java.lang.ClassNotFoundException: javax.mail.MessagingException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(AttachmentInInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:211)
    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193)
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:129)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:187)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:110)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:166)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
    at java.lang.Thread.run(Thread.java:619)

接口如下

@WebService
public interface CmisWeb
{
    public FamilyMemberResult findFamilyMembers(WsUser wSUser, FamilyMemberSearchDTO search);   }

2个回答

yachao89
yachao89   2013.05.21 11:37
已采纳
<span>
首先这个地方改成这样试试
<servlet-mapping>  
        <servlet-name>CXFServices</servlet-name>  
        <url-pattern>/rvices/*</url-pattern>  
    </servlet-mapping> 
然后看你那个接口文件是否在rvices下,报的错好像是找不到你那个接口文件,再不行就改成/*
</span>
suannai0314
suannai0314 帮你编辑了下代码的格式,更多markdown使用见:http://ask.csdn.net/pages/markdown
大约 4 年之前 回复
bo_fang
bo_fang   2014.04.01 12:34

很明显缺少mail jar 报,自己去下载个cxf.zip里面找去。

Csdn user default icon
上传中...
上传图片
插入图片