Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse SpringSource工具套件可以';找不到Spring架构文件_Eclipse_Spring_Sts Springsourcetoolsuite - Fatal编程技术网

Eclipse SpringSource工具套件可以';找不到Spring架构文件

Eclipse SpringSource工具套件可以';找不到Spring架构文件,eclipse,spring,sts-springsourcetoolsuite,Eclipse,Spring,Sts Springsourcetoolsuite,我不知道这是否是STS/Eclipse或我的项目设置的问题,但STS正在抱怨我的Spring模式 Multiple annotations found at this line: - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jee:jndi-lookup'. - schema_reference.4: Failed to read s

我不知道这是否是STS/Eclipse或我的项目设置的问题,但STS正在抱怨我的Spring模式

Multiple annotations found at this line:
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'jee:jndi-lookup'.
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/jee/spring-jee.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root 
 element of the document is not <xsd:schema>.

Multiple annotations found at this line:
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/tx/spring-tx.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root 
 element of the document is not <xsd:schema>.
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:advice'.

Multiple annotations found at this line:
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aop:config'.
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/aop/spring-aop.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root 
 element of the document is not <xsd:schema>.
查看我的项目类路径,我可以找到
spring-context-3.1.4.RELEASE.jar/META-INF/spring.schemas
,其中包含
http\://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.1.xsd
。类似的文件位于aop标记的类路径上的
spring-aop-3.1.4.RELEASE.jar


有人对如何消除这个错误有什么建议吗?

您已经在类路径spring-tx-3.1.4.RELEASE.jar和您参考的spring.xm中添加了。也许您正在使用的xsd声明是旧的?(即使用:)

很难说发生了什么事。如果您在下面没有得到任何好的答案,我建议您发布到STS论坛:这就是
/META-INF/spring.schemas
文件的用途。在这些文件中,您可以找到从无版本xsd到最新版本xsd的映射(即
http\://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.1.xsd
)。看见
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jpa="http://www.springframework.org/schema/data/jpa"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">

    <jee:jndi-lookup expected-type="java.lang.String" id="myId" jndi-name="myJndiName"/>

    <!-- Other stuff with no problems ommitted -->

    <tx:advice id="transactionAdvice" transaction-manager="transactionManager">
        <tx:attributes>
            <!-- all methods starting with 'get' are read-only -->
            <tx:method name="get*" read-only="true"/>
            <!-- other methods use the default transaction settings (see below) -->
            <tx:method name="*"/>
        </tx:attributes>
    </tx:advice>

    <aop:config>
        <aop:pointcut expression="execution(* com.example.service.*.*(..) )" id="servicesPointcut"/>
        <aop:advisor advice-ref="transactionAdvice" pointcut-ref="servicesPointcut"/>
    </aop:config>

</beans>
spring-aop-3.1.4.RELEASE.jar
spring-asm-3.1.4.RELEASE.jar
spring-batch-core-2.1.9.RELEASE.jar
spring-batch-infrastructure-2.1.9.RELEASE.jar
spring-batch-test-2.1.9.RELEASE.jar
spring-beans-3.1.4.RELEASE.jar
spring-context-3.1.4.RELEASE.jar
spring-context-support-3.1.4.RELEASE.jar
spring-core-3.1.4.RELEASE.jar
spring-data-commons-1.5.1.RELEASE.jar
spring-data-jpa-1.3.1.RELEASE.jar
spring-expression-3.1.4.RELEASE.jar
spring-jdbc-3.1.4.RELEASE.jar
spring-orm-3.1.4.RELEASE.jar
spring-oxm-3.1.4.RELEASE.jar
spring-test-3.1.4.RELEASE.jar
spring-tx-3.1.4.RELEASE.jar