`
c125543072
  • 浏览: 30124 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

CXF 报错。com.sun.xml.internal.messaging.saaj.soap.LocalStrings

阅读更多
1、控制台报错:

2011-02-23 10:40:47,003 ERROR [CXFServlet]:253 - Servlet.service() for servlet CXFServlet threw exception
java.lang.ExceptionInInitializerError
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at javax.xml.soap.FactoryFinder.newInstance(FactoryFinder.java:59)
	at javax.xml.soap.FactoryFinder.find(FactoryFinder.java:137)
	at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:108)
	at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.getFactory(SAAJInInterceptor.java:90)
	at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:102)
	at org.apache.cxf.jaxws.handler.soap.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:78)
	at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.getOpQName(SOAPHandlerInterceptor.java:323)
	at org.apache.cxf.jaxws.handler.AbstractJAXWSHandlerInterceptor.setupBindingOperationInfo(AbstractJAXWSHandlerInterceptor.java:111)
	at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.createProtocolMessageContext(SOAPHandlerInterceptor.java:258)
	at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessageInternal(SOAPHandlerInterceptor.java:163)
	at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:126)
	at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:71)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)
	at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:97)
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:461)
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:188)
	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.doPost(AbstractHTTPServlet.java:103)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter.doFilter(StrutsExecuteFilter.java:85)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.doFilter(StrutsPrepareFilter.java:82)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: com.sun.xml.internal.messaging.saaj.soap.LocalStrings != com.sun.xml.messaging.saaj.soap.LocalStrings
	at java.util.logging.Logger.getLogger(Logger.java:314)
	at com.sun.xml.messaging.saaj.soap.MessageFactoryImpl.<clinit>(MessageFactoryImpl.java:86)
	... 48 more


2、JSP页面报错:
com.sun.xml.internal.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/html;charset=utf-8 Supported ones are: [text/xml]
	com.sun.xml.internal.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:284)
	com.sun.xml.internal.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:118)
	com.sun.xml.internal.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:278)
	com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:180)
	com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:83)
	com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:105)
	com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587)
	com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
	com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
	com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
	com.sun.xml.internal.ws.client.Stub.process(Stub.java:211)
	com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:124)
	com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)
	com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
	com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
	$Proxy48.login(Unknown Source)
	hotbox.sso.service.webcall.LoginServiceWSCaller.login(LoginServiceWSCaller.java:13)
	hotbox.sso.service.webcall.LoginServiceWSCaller.login(LoginServiceWSCaller.java:1)
	hotbox.smis.action.login.LoginAction.GetSmisWebClientContent(LoginAction.java:45)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	java.lang.reflect.Method.invoke(Method.java:597)
	com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)
	com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)
	com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
	com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)
	org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
	com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
	com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
	com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
	com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	hotbox.smis.action.web.VisitControl.intercept(VisitControl.java:37)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter.doFilter(StrutsExecuteFilter.java:76)
	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.doFilter(StrutsPrepareFilter.java:65)


解决方法:
找到CXF下的包:
1、saaj-api-XX.jar
2、saaj-impl-XX.jar
删除以上2个包。

因为这两个包里的类与JDK的类重复,所以会有冲突报错
分享到:
评论

相关推荐

    cxf.xml,cxf-servlet.xml,cxf-extension-soap.xml

    &lt;import resource="classpath:META-INF/cxf/cxf.xml"/&gt; &lt;import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/&gt; &lt;import resource="classpath:META-INF/cxf/cxf-servlet.xml"/&gt;

    cxf-manifest.jar

    webservice CXF 报错:java.lang.NoClassDefFoundError: org/apache/neethi/builders/AssertionBuilder 需要用到此jar文件 通过apache官网可获得。 文件位置\apache-cxf-2.7.13\lib

    cxf.apache.org/schemas/(jaxrs.xsd、jaxrs.xsd、core.xsd)文件下载

    这样,当你在编写如`cxf.xml`或`spring-context.xml`这样的配置文件时,IDE就能识别出CXF的特定标签,并提供相应的代码提示。 例如,一个简单的CXF JAX-RS配置可能会如下所示: ```xml &lt;beans xmlns="http://www....

    apache-cxf-3.3.3.zip

    3. **数据绑定**:CXF支持XML到Java对象的数据绑定,如JAXB(Java Architecture for XML Binding)和Data Binding for XML(DBXML)。这使得XML消息可以直接映射到Java对象,简化了开发过程。 4. **模块化设计**:...

    apache-cxf-2.7.7.zip

    3. **数据绑定**:CXF提供了数据绑定框架,如JAXB(Java Architecture for XML Binding)用于XML到Java对象的转换,简化了数据交换过程。 4. **WS-*规范支持**:CXF实现了诸如WS-Security、WS-Addressing、WS-...

    apache-cxf-2.7.6.rar

    2. **绑定和数据转换**:CXF提供了多种绑定机制,如JAX-WS(Java API for XML Web Services)用于SOAP服务,JAX-RS(Java API for RESTful Web Services)用于REST服务。此外,CXF还支持数据绑定,如JAXB(Java ...

    apache-cxf-2.0.10.zip下载地址

    4. **配置文件**:如cxf.xml,用于配置CXF的行为和设置。 要开始使用Apache CXF 2.0.10,开发者需要解压此压缩包,将库文件添加到项目中,然后根据自己的需求配置CXF并编写相应的服务或客户端代码。需要注意的是,...

    org.apache.cxf.spring.remoting.Jsr181HandlerMapping.jar

    org.apache.cxf.spring.remoting.Jsr181HandlerMapping.jar

    cxf-2.4.3.jar是apacha做的组件

    它支持SOAP、RESTful、XML以及JSON等多种通信协议,为服务提供者和消费者提供了广泛的互操作性。 2. **WS-*协议栈支持**:CXF支持一系列Web服务规范,如WS-Security(安全性)、WS-ReliableMessaging(可靠消息传递...

    cxf框架包 apache-cxf-3.4.3.tar.gz

    - **SOAP(Simple Object Access Protocol)**:SOAP是一种基于XML的消息传输协议,用于交换结构化和类型化的信息。CXF支持SOAP 1.1和1.2,并能处理各种安全、事务和消息传递模式。 - **RESTful**:REST...

    cxf-2.7.18. jar及其依赖包

    标签“**cxf.jar**”是CXF库的一般术语,通常用来代表整个CXF框架的JAR文件,无论具体版本如何。在实际使用中,开发者可能会将CXF的核心库与其他必要的依赖项一起打包,以便于部署和使用。 在“**cxf-2.7.18及其...

    cxf-2.1.jar cxf-2.1.jar

    cxf-2.1.jar cxf-2.1.jar cxf-2.1.jar cxf-2.1.jar

    apache-cxf-2.4.6.zip

    Apache CXF是一个开源的Java框架,它主要用于构建和开发服务导向架构(SOA)和Web服务。这个"apache-cxf-2.4.6.zip"压缩包包含了CXF框架的2.4.6版本,这是一个相对早期的版本,发布于2012年。在深入探讨CXF之前,...

    apache-cxf-3.3.6.zip

    1. JAX-WS(Java API for XML Web Services):CXF提供了对JAX-WS的全面支持,允许开发人员以Java编程的方式创建和使用SOAP Web服务。开发者可以使用注解或XML配置来定义服务接口和服务实现。 2. JAX-RS(Java API ...

    apache-cxf-3.5.0.zip

    - 在服务器环境中,可以使用CXF的Servlet或Jetty容器来部署Web服务,通过修改`etc/cxf.xml`等配置文件进行定制。 - 客户端可以使用CXF的动态客户端API或者生成的Java客户端代码来调用服务。 6. **标签解析** ...

    apache-cxf-2.7.10.jar

    3. **数据绑定**:CXF提供了JAXB(Java Architecture for XML Binding)和XMLBeans等多种数据绑定机制,将XML文档与Java对象进行映射,简化了数据交换过程。 4. **WS-*支持**:CXF实现了众多WS-*规范,如WS-...

    apache-cxf-2.6.2.zip

    4. **配置文件**:可能包括一些默认的配置文件,如cxf.xml或cxf-servlet.xml,用于配置CXF的行为。 5. **源代码**:如果包含,这将有助于深入理解CXF的工作原理,并且对于进行自定义开发和调试非常有用。 在Apache...

    apache-cxf-2.6.0.tar.gz

    3. **多种编程模型**:CXF提供了多种编程模型,如JAX-WS(Java API for XML Web Services)用于SOAP服务,JAX-RS(Java API for RESTful Web Services)用于REST服务。此外,还有基于Spring的编程模型,使得集成到...

    cxf-2.2.3.jar

    cxf-2.2.3.jar

    cxf-2.7.7.jar

    cxf-2.7.7.jar

Global site tag (gtag.js) - Google Analytics