Erreur: Un schéma ne peut pas contenir deux mondial des composants avec le même nom

Lors de la configuration d'Hibernate j'obtiens l'erreur suivante dans mon fichier de configuration.

Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-3.1.xsd)

Quand j'cochez la case "Plus de détails", il me donne les éléments suivants:

sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurrences of 'http://www.springframework.org/schema/beans,identifiedType'.

J'ai un applicationContext.xml fichier dont le schéma de définition(où j'ai importer mes hibernate-context.xml fichier) est comme suit:

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

..
..
<!-- Imports datasource configuration -->
<import resource="hibernate-context.xml" />

Mon hibernate-context.xml est comme suit:

<?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:p="http://www.springframework.org/schema/p"
    xmlns:tx="http://www.springframework.org/schema/tx" 
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jdbc="http://www.springframework.org/schema/jdbc" 
    xmlns:jpa="http://www.springframework.org/schema/data/jpa"
    xmlns:util="http://www.springframework.org/schema/util" 
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="
            http://www.springframework.org/schema/beans 
            http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
            http://www.springframework.org/schema/tx 
            http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context-3.1.xsd
            http://www.springframework.org/schema/jdbc 
            http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
            http://www.springframework.org/schema/data/jpa
            http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
            http://www.springframework.org/schema/util 
            http://www.springframework.org/schema/util/spring-util-3.1.xsd
            http://www.springframework.org/schema/mvc
            http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
            ">

C'est dans ce fichier(hibernate-context.xml) que je reçois le message d'erreur.
Mon esprit est soufflé et je suis bloqué....comment se débarrasser de cette erreur? Gentiment guide!! 🙁

  • Hmmm. Votre analyseur XML semble être de se plaindre au sujet de la réelle schéma (springframework.org/schema/beans/spring-beans-3.1.xsd), qui est impair. J'aurais pensé qu'il serait valide. Je l'ai regardé rapidement et ne vois pas de problèmes évidents. Qui XML parser utilisez-vous?
  • Hmm..j'utilise Eclipse comme mon IDE. Elle montre l'erreur.