cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jaxrs:server'

huangapple go评论72阅读模式
英文:

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jaxrs:server'

问题

我在部署应用程序到WebLogic Server 12.1.3时遇到了错误。错误显示在包含“<jaxrs:server>”的行上。

org.xml.sax.SAXParseException;行号:50;列号:61;cvc-complex-type.2.4.c:匹配的通配符是严格的,但是找不到元素“jaxrs:server”的声明。:

这是我的cxf-servlet.xml

&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:util=&quot;http://www.springframework.org/schema/util&quot;
xmlns:tx=&quot;http://www.springframework.org/schema/tx&quot; xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
xmlns:mvc=&quot;http://www.springframework.org/schema/mvc&quot; xmlns:jaxws=&quot;http://cxf.apache.org/jaxws&quot;
xmlns:soap=&quot;http://cxf.apache.org/bindings/soap&quot; xmlns:sec=&quot;http://cxf.apache.org/configuration/security&quot;
xmlns:http=&quot;http://cxf.apache.org/transports/http/configuration&quot;
xmlns:cxf=&quot;http://cxf.apache.org/core&quot; xmlns:jaxrs=&quot;http://cxf.apache.org/jaxrs&quot;
xsi:schemaLocation=&quot;
		http://www.springframework.org/schema/beans
		http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
		http://www.springframework.org/schema/util 
		http://www.springframework.org/schema/util/spring-util-4.1.xsd
		http://www.springframework.org/schema/tx
		http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
		http://www.springframework.org/schema/context
   		http://www.springframework.org/schema/context/spring-context-4.1.xsd
   		http://cxf.apache.org/jaxws
     	http://cxf.apache.org/schemas/jaxws.xsd
     	http://cxf.apache.org/jaxrs
    	http://cxf.apache.org/schemas/jaxrs.xsd          	
		http://cxf.apache.org/transports/http/configuration  
	    http://cxf.apache.org/schemas/configuration/http-conf.xsd
	    http://cxf.apache.org/core 
     	http://cxf.apache.org/schemas/core.xsd">

&lt;import resource=&quot;classpath:META-INF/cxf/cxf.xml&quot; /&gt;
&lt;import resource=&quot;classpath:META-INF/cxf/cxf-servlet.xml&quot; /&gt;
&lt;import resource=&quot;cxf-logging.xml&quot; /&gt;

   &lt;jaxrs:server id=&quot;restContainerBackend&quot; address=&quot;/backend&quot;&gt;
	&lt;jaxrs:serviceBeans&gt;
		&lt;ref bean=&quot;pageframeworkServiceImpl&quot; /&gt;
	&lt;/jaxrs:serviceBeans&gt;
	&lt;jaxrs:extensionMappings&gt;
		&lt;entry key=&quot;json&quot; value=&quot;application/json&quot; /&gt;
	&lt;/jaxrs:extensionMappings&gt;
	&lt;jaxrs:providers&gt;
		&lt;ref bean=&quot;jsonProvider&quot; /&gt;
	&lt;/jaxrs:providers&gt;
&lt;/jaxrs:server&gt;
...
... //其余的xml
&lt;/beans&gt;

我不确定这里有什么问题。有人能指出问题吗?

谢谢!

英文:

I am getting the error when I delpoy app on weblogic server 12.1.3. The error shows on line where "<jaxrs:server>" line exists.

org.xml.sax.SAXParseException; lineNumber: 50; columnNumber: 61; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element &#39;jaxrs:server&#39;.:

Here is my cxf-servlet.xml

&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:util=&quot;http://www.springframework.org/schema/util&quot;
xmlns:tx=&quot;http://www.springframework.org/schema/tx&quot; xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
xmlns:mvc=&quot;http://www.springframework.org/schema/mvc&quot; xmlns:jaxws=&quot;http://cxf.apache.org/jaxws&quot;
xmlns:soap=&quot;http://cxf.apache.org/bindings/soap&quot; xmlns:sec=&quot;http://cxf.apache.org/configuration/security&quot;
xmlns:http=&quot;http://cxf.apache.org/transports/http/configuration&quot;
xmlns:cxf=&quot;http://cxf.apache.org/core&quot; xmlns:jaxrs=&quot;http://cxf.apache.org/jaxrs&quot;
xsi:schemaLocation=&quot;
		http://www.springframework.org/schema/beans
		http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
		http://www.springframework.org/schema/util 
		http://www.springframework.org/schema/util/spring-util-4.1.xsd
		http://www.springframework.org/schema/tx
		http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
		http://www.springframework.org/schema/context
   		http://www.springframework.org/schema/context/spring-context-4.1.xsd
   		http://cxf.apache.org/jaxws
     	http://cxf.apache.org/schemas/jaxws.xsd
     	http://cxf.apache.org/jaxrs
    	http://cxf.apache.org/schemas/jaxrs.xsd          	
		http://cxf.apache.org/transports/http/configuration  
	    http://cxf.apache.org/schemas/configuration/http-conf.xsd
	    http://cxf.apache.org/core 
     	http://cxf.apache.org/schemas/core.xsd">

&lt;import resource=&quot;classpath:META-INF/cxf/cxf.xml&quot; /&gt;
&lt;import resource=&quot;classpath:META-INF/cxf/cxf-servlet.xml&quot; /&gt;
&lt;import resource=&quot;cxf-logging.xml&quot; /&gt;

   &lt;jaxrs:server id=&quot;restContainerBackend&quot; address=&quot;/backend&quot;&gt;
	&lt;jaxrs:serviceBeans&gt;
		&lt;ref bean=&quot;pageframeworkServiceImpl&quot; /&gt;
	&lt;/jaxrs:serviceBeans&gt;
	&lt;jaxrs:extensionMappings&gt;
		&lt;entry key=&quot;json&quot; value=&quot;application/json&quot; /&gt;
	&lt;/jaxrs:extensionMappings&gt;
	&lt;jaxrs:providers&gt;
		&lt;ref bean=&quot;jsonProvider&quot; /&gt;
	&lt;/jaxrs:providers&gt;
&lt;/jaxrs:server&gt;
...
... //rest of the xml
&lt;/beans&gt;

I am not sure what is wrong with this. Can someone point out please?

Thanks!

答案1

得分: 0

cxf-rt-frontend-jaxrs依赖项丢失。添加了这个依赖项后,问题得到解决。

英文:

cxf-rt-frontend-jaxrs dependency was missing. Adding this dependency the issue got resolved.

huangapple
  • 本文由 发表于 2020年10月20日 05:30:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/64435331.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定