1

Depois que atualizei o Eclipse da versão Luna para a versão Mars está retornando erro na primeira linha do arquivo Spring JPA XML, na declaração do 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:mvc="http://www.springframework.org/schema/mvc"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jee="http://www.springframework.org/schema/jee" 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-3.0.xsd
                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
                           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
                           http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
                           http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
                           http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd
                           http://www.springframework.org/schema/context http://www.springframework.org/schema/task/spring-context-3.0.xsd">

Erro ao passar o clique do mouse em cima da bolinha vermelha no Eclipse:

Multiple annotations found at this line: - Referenced file contains errors (http://www.springframework.org/schema/tool/spring-tool-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..." - Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..." - Referenced file contains errors (http://www.springframework.org/schema/context/spring-context-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..."

É feito normalmente o deploy do projeto no servidor e a aplicação funciona, porém encomoda quando vejo que o projeto está com erros (sempre aquela bolinha azul no ícone da pasta do projeto).

1 Resposta 1

1

O erro acontece pois existe uma anotação duplicada, ou seja, ela está adicionada duas vezes.

Remova a seguinte linha que vai funcionar perfeitamente:

http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd

Ficando desta maneira:

<?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:mvc="http://www.springframework.org/schema/mvc"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jee="http://www.springframework.org/schema/jee" 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-3.0.xsd
                           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
                           http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
                           http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
                           http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.0.xsd
                           http://www.springframework.org/schema/context http://www.springframework.org/schema/task/spring-context-3.0.xsd">
2
  • Valeu, era exatamente isso, espero que possa ajudar mais pessoas. Commented 29/09/2015 às 20:33
  • Obrigado, fico feliz em poder lhe ajudar. Commented 29/09/2015 às 20:34

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .