首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找到以元素jaxrs:servicebean开头的无效内容“

找到以元素jaxrs:servicebean开头的无效内容“
EN

Stack Overflow用户
提问于 2013-04-23 19:05:17
回答 1查看 1.3K关注 0票数 0

我正在尝试运行JAX-RS服务。在尝试启动Tomcat服务器时,我收到了一个错误:“从元素‘jaxrs:servicebean’开始找到了无效的内容”

详细的错误是-

*找到以元素jaxrs:servicebean开头的无效内容。{“http://cxf.apache.org/jaxrs”:executor,“http://cxf.apache.org/jaxrs”:features,"http://cxf.apache.org/jaxrs":binding,"http://cxf.apache.org/jaxrs":dataBinding,"http://cxf.apache.org/jaxrs":inInterceptors,"http://cxf.apache.org/jaxrs":inFaultInterceptors,“http://cxf.apache.org/jaxrs”:inFaultInterceptors,"http://cxf.apache.org/jaxrs":serviceFactories,"http://cxf.apache.org/jaxrs":outInterceptors,“http://cxf.apache.org/jaxrs”“:outFaultInterceptors,"http://cxf.apache.org/jaxrs":properties,”http://cxf.apache.org/jaxrs "http://cxf.apache.org/jaxrs":modelBeans,“http://cxf.apache.org/jaxrs”:模型,“http://cxf.apache.org/jaxrs”:提供者,“http://cxf.apache.org/jaxrs”:扩展映射,“http://cxf.apache.org/jaxrs”:语言映射,“http://cxf.apache.org/jaxrs”:模式定位,“http://cxf.apache.org/jaxrs”:资源比较器}‘。*

我的春季配置文件是-

代码语言:javascript
复制
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:addressing="http://cxf.apache.org/ws/addressing"
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:beans="http://cxf.apache.org/configuration/beans"
    xmlns:configuration="http://cxf.apache.org/transports/http/configuration"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxrs="http://cxf.apache.org/jaxrs"
    xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:jpa="http://www.springframework.org/schema/data/jpa"
    xmlns:p="http://www.springframework.org/schema/p" xmlns:parameterized-types="http://cxf.apache.org/configuration/parameterized-types"
    xmlns:soap="http://cxf.apache.org/bindings/soap" xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:util="http://www.springframework.org/schema/util" xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:webservice="http://sf.icptp.springextensions/schema/webservice" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws/addressing.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
        http://cxf.apache.org/configuration/beans http://cxf.apache.org/schemas/configuration/cxf-beans.xsd
        http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
        http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
        http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
        http://cxf.apache.org/configuration/parameterized-types http://cxf.apache.org/schemas/configuration/parameterized-types.xsd
        http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd 
        http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd
        http://sf.icptp.springextensions/schema/webservice http://sf.icptp.springextensions/schema/webservice/webservice.xsd" >

    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

    <bean id="order" class="com.example.rest.OrderInfoImpl" />

    <jaxrs:server address="/" id="connectionService">
        <jaxrs:servicebeans>
            <ref bean="order"></ref>
        </jaxrs:servicebeans>
        <jaxrs:extensionmappings>
            <entry key="xml" value="application/xml" ></entry>
        </jaxrs:extensionmappings>
    </jaxrs:server>

</beans>

我无法找出原因,为什么它不识别"jaxrs:servicebeans“标签内的jaxrs:server标签。我不确定这是否是cxf-rt-frontend-jaxrs;版本的问题,尽管我尝试了2.5.2和2.7.3版本。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-04-24 02:24:54

该文件区分大小写。将serviceBeans替换为servicebeans。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16177240

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档