apache-cxf-2.3.3在was 7.0下报错java.lang.NoSuchMethodError: org/apache/ws/commons/schema/XmlSchema.getSc

来源:转载

SRVE0260E: 服务器无法使用对应用程序指定的错误页来处理如下所示的原始异常。

原始异常:

错误消息: java.lang.NoSuchMethodError: org/apache/ws/commons/schema/XmlSchema.getSchemaDocument()Lorg/w3c/dom/Document;

错误代码: 500

目标 Servlet:

错误堆栈:

java.lang.NoSuchMethodError: org/apache/ws/commons/schema/XmlSchema.getSchemaDocument()Lorg/w3c/dom/Document;

     at org.apache.cxf.service.model.SchemaInfo.getElement(SchemaInfo.java:109)      at org.apache.cxf.wsdl11.ServiceWSDLBuilder.buildTypes(ServiceWSDLBuilder.java:301)
     at org.apache.cxf.wsdl11.ServiceWSDLBuilder.build(ServiceWSDLBuilder.java:198)
     at org.apache.cxf.wsdl11.ServiceWSDLBuilder.build(ServiceWSDLBuilder.java:158)
     at org.apache.cxf.transport.http.WSDLQueryHandler.writeResponse(WSDLQueryHandler.java:162)
     at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:172)
     at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:148)
     at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
     at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:108)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
     at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
     at com.jstrd.mss.base.SecurityFilter.doFilter(SecurityFilter.java:43)
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
     at com.jstrd.base.commons.web.filter.LogFilter.doFilterInternal(LogFilter.java:90)
     at com.jstrd.base.commons.web.filter.OnceRequestFilter.doFilter(OnceRequestFilter.java:45)
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
     at com.jstrd.base.commons.web.filter.CharsetEncodeFilter.doFilterInternal(CharsetEncodeFilter.java:41)
     at com.jstrd.base.commons.web.filter.OnceRequestFilter.doFilter(OnceRequestFilter.java:45)
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
     at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
     at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933)
     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
     at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
     at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)

解决方案一:(自已就是用这种方法成功解决的)

在WAS_HOME/java/jre/lib目录下建立endorsed子目录,将XmlSchema-1.4.7.jar文件拷入,重新启动was即可

 

 

解决方案二:(网上找来的,未测试确定)

 

cxf架构下开发的WebService在Tomcat下可以正常运行,但是部署到WAS7.0上不能正常运行,并抛出如下异常:
00000035 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[CXFServlet]: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.jaxws.EndpointImpl---1922519269': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException

解决办法:

1.在修改Web模块中的MANIFEST.MF文件,添加如下属性禁用应用程序IBM的WebService功能
DisableIBMJAXWSEngine: true 
!IMPORTANT!  DO NOT include the following property: UseWSFEP61ScanPolicy: true

2.如果WEB-INF/lib目录下有如下jar包请删除
*geronimo-activation_1.1_spec-1.0.2.jar
* geronimo-stax-api_1.0_spec-1.0.1.jar
* jaxb-api-2.1.jar
* jaxb-impl-2.1.12.jar
* saaj-api-1.3.jar
* saaj-impl-1.3.2.jar
* serializer-2.7.1.jar
* xalan-2.7.1.jar

详细请参考:
http://d.avidmalone.com/archive/2010/February/10/Apache_CXF_on_WAS_7.0/


分享给朋友:
您可能感兴趣的文章:
随机阅读: