小编Ron*_*ndo的帖子

没有为元素'constructor-arg'找到声明

运行时出错:

Caused by: org.xml.sax.SAXParseException; lineNumber: 34; columnNumber: 30; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'constructor-arg'.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
Run Code Online (Sandbox Code Playgroud)

来源:

<spring:bean id="HandlerA_id" name="HandlerA" class="Handler"> 
            <constructor-arg> 
                <ref bean="BeanA"></ref>  
            </constructor-arg>  
        </spring:bean> 
Run Code Online (Sandbox Code Playgroud)

编辑器识别构造函数-arg标记,并在翻转时给出摘要.在配置文件中,xsi:schemaLocation值包含(以及其他):

"...http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd..."
Run Code Online (Sandbox Code Playgroud)

如果检查该URL的xsd,可以看到constructor-arg标记对组beanElements有效,这是'bean'中允许的复杂类型之一

在某些情况下,运行时是否未正确验证XML?

mule mule-studio

2
推荐指数
1
解决办法
1173
查看次数

标签 统计

mule ×1

mule-studio ×1