복붙노트

[SPRING] schema_reference.4 : 스키마 문서 'http://www.springframework.org/schema/beans/spring- beans-4.1.5.xsd를 읽지 못했습니다.

SPRING

schema_reference.4 : 스키마 문서 'http://www.springframework.org/schema/beans/spring- beans-4.1.5.xsd를 읽지 못했습니다.

아래에 주어진대로 일식에서 spring-dispatcher.xml에 오류가 발생합니다.

schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-
 beans-4.1.5.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-beans-4.1.5.RELEASE.jar
spring-beans-4.1.5.RELEASE-javadoc.jar
spring-beans-4.1.5.RELEASE-sources.jar
spring-context-4.1.5.RELEASE.jar
spring-context-4.1.5.RELEASE-javadoc.jar
spring-context-4.1.5.RELEASE-sources.jar
spring-context-support-4.1.5.RELEASE.jar
spring-context-support-4.1.5.RELEASE-javadoc.jar
spring-context-support-4.1.5.RELEASE-sources.jar
spring-webmvc-4.1.5.RELEASE.jar
spring-webmvc-4.1.5.RELEASE-javadoc.jar
spring-webmvc-4.1.5.RELEASE-sources.jar
spring-webmvc-portlet-4.1.5.RELEASE.jar
spring-webmvc-portlet-4.1.5.RELEASE-javadoc.jar
spring-webmvc-portlet-4.1.5.RELEASE-sources.jar

아래 주어진대로 spring-dispatcher.xml ...

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE beans>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-4.1.5.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-4.1.5.xsd
    http://www.springframework.org/schema/mvc
    http://www.springframework.org/schema/mvc/spring-mvc.xsd">

제가 도움이된다면 좋을 것 같습니다 ... 같은 주제의 게시물은이 문제를 해결하는 데 도움이되지 않았습니다. 미리 감사드립니다 ...

해결법

  1. ==============================

    1.이 오류는 xsd를 찾을 수 없기 때문에 발생합니다. 특정 버전 4.1을 사용하는 아래 작업을 시도하십시오.

    이 오류는 xsd를 찾을 수 없기 때문에 발생합니다. 특정 버전 4.1을 사용하는 아래 작업을 시도하십시오.

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE beans>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework/schema/context"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-4.1.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd">
    

    또는 버전을 언급하지 않으면 최신 버전을 사용하려고 시도합니다.

    <?xml version="1.0" encoding="utf-8"?>
        <!DOCTYPE beans>
        <beans xmlns="http://www.springframework.org/schema/beans"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:context="http://www.springframework/schema/context"
            xmlns:mvc="http://www.springframework.org/schema/mvc"
            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/mvc
            http://www.springframework.org/schema/mvc/spring-mvc.xsd">
    
  2. ==============================

    2.Cosmina I.에서 - Pivotal 공인 전문가 봄 개발자 시험 스터디 가이드 - 2017

    Cosmina I.에서 - Pivotal 공인 전문가 봄 개발자 시험 스터디 가이드 - 2017

    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    
  3. ==============================

    3.Spring jar에는 그런 xsd가 없다. http://www.springframework.org/schema/beans/spring-beans-4.1.5.xsd

    Spring jar에는 그런 xsd가 없다. http://www.springframework.org/schema/beans/spring-beans-4.1.5.xsd

    Spring 4.1.x 용 Spring xsd는 다음에 의해 참조 될 수 있습니다 : http://www.springframework.org/schema/beans/spring-beans-4.1.xsd 이상 : http://www.springframework.org/schema/beans/spring-beans.xsd

    URL과 각 스프링 용기 내부의 실제 위치 사이의 일치는 META-INF / spring.schemas에서 확인할 수 있으므로 Spring을 업그레이드 할 때 "버전이 적음"URL은 계속 작동합니다.

  4. ==============================

    4.내 경우에는

    내 경우에는

    <?xml version="1.0" encoding="utf-8"?>
    

    spring-dispatcher.xml로 이동 한 다음 update maven 프로젝트를 실행합니다.

  5. ==============================

    5.당신이 그것을 사용하는 경우 나에게 문제가 될 수 있습니다. 나는 이것이 당신의 경우는 아니지만, 그렇다면 당신의 maven 프로젝트를 업데이트하십시오. Eclipse IDE를 사용하는 경우 :

    당신이 그것을 사용하는 경우 나에게 문제가 될 수 있습니다. 나는 이것이 당신의 경우는 아니지만, 그렇다면 당신의 maven 프로젝트를 업데이트하십시오. Eclipse IDE를 사용하는 경우 :

    다시 말하지만, 이것이 귀하의 경우 일 수 있습니다. 그것은 나를 위해 일했습니다. 이것은 동일한 상황에있는 다른 사람들에게도 적용될 수 있습니다.

  6. ==============================

    6.이거 해봐, 나에게 효과적이야.

    이거 해봐, 나에게 효과적이야.

        <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"
       xsi:schemaLocation = "http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
      http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context-4.0.xsd">
    
  7. ==============================

    7.나는 udemy에 봄 코스를 등록했습니다. 강사가 보여줄 모든 단계를 따랐습니다. 그래서 봄 mvc 및 최대 절전 모드를 사용하는 경우이 오류가 발생할 수 있습니다. 다음을 위해 스키마 문서 'http://www.springframework.org/schema/tx/spring-tx.xsd'등을 읽지 못했습니다.

    나는 udemy에 봄 코스를 등록했습니다. 강사가 보여줄 모든 단계를 따랐습니다. 그래서 봄 mvc 및 최대 절전 모드를 사용하는 경우이 오류가 발생할 수 있습니다. 다음을 위해 스키마 문서 'http://www.springframework.org/schema/tx/spring-tx.xsd'등을 읽지 못했습니다.

    <mvc:annotation-driven/> and <tx:annotation-driven transaction-manager="myTransactionManager" /> elements
    

    내 봄 설정 파일에서 나는이 두 URL을 가졌다.

        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd
    
        http://www.springframework.org/schema/tx 
        http://www.springframework.org/schema/tx/spring-tx.xsd
    

    에서 xsi : schemaLocation으로 바꿨습니다.

        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
    
        http://www.springframework.org/schema/tx 
        http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
    

    실제로이 두 사이트를 방문하십시오. http://www.springframework.org/schema/mvc/ 및 http://www.springframework.org/schema/tx/ 위에 표시된 것처럼 최신 버전의 spring-mvc 및 spring-tx, 즉 spring-mvc-4.2.xsd 및 spring-tx-4.2.xsd를 추가했습니다.

    명시 적으로 no 버전을 명시하는 것은 좋은 습관입니다. 그것은 나를 위해 일했고, 이것이 당신을 위해 일하기를 바랍니다. 고맙습니다.

  8. from https://stackoverflow.com/questions/29063555/schema-reference-4-failed-to-read-schema-document-http-www-springframework-o by cc-by-sa and MIT license