【问题标题】:Referenced file contains errors (org/springframework/beans/factory/xml/spring-tool-4.3.xsd)引用的文件包含错误(org/springframework/beans/factory/xml/spring-tool-4.3.xsd)
【发布时间】:2017-06-17 12:33:29
【问题描述】:

当我验证 aplicationContext.xml 文件时出现此错误:

Referenced file contains errors (project-aware://pm-master/org/springframework/beans/factory/xml/spring-tool-4.3.xsd).

这里是xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:util="http://www.springframework.org/schema/util"
    xmlns:tx="http://www.springframework.org/schema/tx"
     xmlns:jpa="http://www.springframework.org/schema/data/jpa"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
           http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">

<jpa:repositories  base-package="com.jedlab.pm.dao"  entity-manager-factory-ref="entityManagerFactory" transaction-manager-ref="transactionManager" />

</beans>

spring data jpa 版本是 1.11.0.RELEASE。

当我删除 jpa:repositories 行时,错误消失了。 我该如何解决?

【问题讨论】:

  • 听起来像是一个错误,无论是在工具还是 xsd 中。你可以在github.com/spring-projects/spring-ide 提交一个错误,或者参考 GitHub 上重现此错误的示例项目吗?那会很棒并且有很大帮助。非常感谢!!!
  • 当我删除了 Maven 的存储库文件夹并重新构建它时,问题解决了。
  • 啊,太好了,很高兴你找到了修复它的方法。感谢您告知我们。

标签: spring maven spring-data spring-data-jpa spring-tool-suite


【解决方案1】:

如果您使用的是 Eclipse,那么从 Windows-> 首选项-> 网络连接-> 缓存中清除缓存会很有帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-04-02
    • 2021-05-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-24
    • 2017-05-01
    相关资源
    最近更新 更多