我知道並經歷了很多類似的問題。但是我仍然不明白我錯過的地方。我已經在名稱空間中指定了最新的xsds。當我在Web Sphere中運行時,仍然出現錯誤。但是我對Tomcat沒有任何問題。駱駝上下文cvc 2.4.2錯誤,找不到camelContext
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
">
<bean id="xRoute" class="com.tgt.test.web.routes.GetXRoute" />
<bean id="yRoute" class="com.tgt.test.web.routes.YRoute" />
<bean id="zRoute" class="com.tgt.test.web.routes.ZRoute" />
<camelContext id="camelContext" trace="true" xmlns="http://camel.apache.org/schema/spring">
<routeBuilder ref="xRoute"/>
<routeBuilder ref="yRoute"/>
<routeBuilder ref="zRoute"/>
</camelContext>
ERROR:org.xml.sax.SAXParseException:致CVC-復type.2.4.c:匹配通配符是嚴格的,但沒有聲明可以爲元件 'camelContext' 中找到。
請讓我知道爲什麼這隻會發生在wbesphere中,而不會發生在Tomcat上。對不起,請求相同的問題。自從昨天以來,我一直在打破自己的觀點。感謝
請有人可以幫我解決這個問題 – bks4line