【问题标题】:Tomcat doesn't start my web serviceTomcat 没有启动我的网络服务
【发布时间】:2014-08-03 06:22:36
【问题描述】:

我使用 [Spring, Apache Cxf, Tomcat, intellij Idea] 创建了一个 Web 服务 在我配置tomcat并运行它之后。我明白了 我的网络服务: web.xml: 春天应用上下文:

【问题讨论】:

  • 你能发布你的tomcat日志错误吗?
  • 我解决了我的 log4j 问题,现在真正的异常是:嵌套异常是 org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: 匹配通配符是严格的,但没有声明可以找到元素

标签: web-services tomcat jakarta-ee tomcat7 cxf


【解决方案1】:

您似乎缺少 CXF 标记的 xsd 的正确配置。您的配置文件中应该有以下对:

http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd

因此,结合起来,您将拥有

<xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" 
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">

另外,请确保您拥有 CXF 前端标签的必要依赖项,具体而言:cxf-rt-frontend-jaxws.jar

【讨论】:

猜你喜欢
  • 2023-04-03
  • 1970-01-01
  • 2013-08-24
  • 2013-10-19
  • 2016-07-02
  • 1970-01-01
  • 2018-03-18
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多