繁体   English   中英

在此行找到多个注释cvc-pattern-valid

[英]Multiple annotations found at this line cvc-pattern-valid

在eclipse中,我有一个xml,但是它有一些错误:在这一行找到多个注释: - cvc-pattern-valid:值'pf-realtime-security'对于模式而言不是facet-valid'($类型为“null”的| | \\ p {L})(\\ p {L} | \\ p {Nd} | | $)*'。 - cvc-complex-type.2.2:元素'name'必须没有元素[children],并且该值必须有效。 在此行找到多个注释: - cvc-complex-type.3.2.2:不允许在元素'int-jms:message-driven-channel-adapter'中出现属性'cache-level'。 - cvc-complex-type.3.2.2:不允许在'int-jms:message-driven-channel-adapter'元素中出现属性'subscription-durable'。 - cvc-complex-type.3.2.2:不允许在'int-jms:message-driven-channel-adapter'元素中出现属性'durable-subscription-name'。

这是一个Spring引导项目,包含来自旧项目的一些xml文件,我不知道旧项目中是否存在同样的问题。 但我的项目总是有这个问题。

<web-fragment id="WebFragment_ID" version="3.0"
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd">
    <display-name>PF Realtime Services Web Application - Security Module</display-name>
    <name>pf-realtime-security</name>
<int-jms:message-driven-channel-adapter connection-factory="primeLocateConnectionFactory"
        destination="primeLocateTopic" acknowledge="auto" auto-startup="true"
        cache-level="1" channel="primeLocateInChannel" pub-sub-domain="true" 
        durable-subscription-name="prime-locate-#{systemProperties['realtime.hostname']}" subscription-durable="true"/>

我希望这里的xml文件中没有错误。

我不理解错误消息的multiple annotations部分,但是关于name元素的抱怨足够清楚:架构要求它是有效的Java标识符(由正则表达式模式定义),并且有效的Java标识符不能包含连字符。

由于文件中存在多个错误而且它们不仅仅是拼写错误,因此您很可能不应该针对此特定模式验证此特定XML文档(可能您使用的是错误的模式?)。 但我对该地区并不十分熟悉,无法就此提出建议。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM