Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Schema reference failed to read schema

Tags:

spring

I'm using spring 3.2.5 on my project. So when I create my appliation-context.xml I have this warning:

schema_reference.4: failed to read schema document http://www.springframework.org/schema/beans/spring-beans.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>

I don't know where the problem is.

like image 736
Hajar Avatar asked Sep 02 '25 08:09

Hajar


1 Answers

I just could remove this warning by changing this on my applicationContext.xml :

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop" 
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans.xsd 
  ">

by

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop" 
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-4.0.xsd 
">

because (from what I read) when using the first we try to load the latest version that is released and that could not be supported by the version that we actually use or does not exists !!

like image 58
Hajar Avatar answered Sep 04 '25 23:09

Hajar