Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3107

"web mvc setup" leads to "Referenced file contains errors..." in Spring config files

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.2.1.RELEASE
    • Fix Version/s: 1.2.2.RELEASE
    • Component/s: @ ROO SHELL, WEB MVC
    • Labels:
    • Environment:
      OS: Win XP
      STS version: 2.9.1
      Roo version: 1.2.1
      JDK: 1.7.0_03-b05

      Description

      Running "web mvc setup" leads to "Referenced file contains errors..." errors in Spring config file (applicationContext-jpa.xml) from within STS.

      applicationContext-jpa.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <beans:beans xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/data/jpa"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">
      
        <repositories base-package="com.springsource.pizzashop" />
      
      </beans:beans>
      
      Error text

      Multiple annotations found at this line:

      • Referenced file contains errors (jar:file:/C:/Documents and Settings/[username]/.m2/repository/org/springframework/spring-context/3.1.0.RELEASE/spring-
        context-3.1.0.RELEASE.jar!/org/springframework/context/config/spring-context-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..."
      • Referenced file contains errors (jar:file:/C:/Documents and Settings/[username]/.m2/repository/org/springframework/spring-beans/3.1.0.RELEASE/spring-beans-3.1.0.RELEASE.jar!/
        org/springframework/beans/factory/xml/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 (jar:file:/C:/Documents and Settings/[username]/.m2/repository/org/springframework/spring-beans/3.1.0.RELEASE/spring-beans-3.1.0.RELEASE.jar!/
        org/springframework/beans/factory/xml/spring-tool-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..."

      I managed to get rid of the error messages by changing the spring-data-jpa version in pom.xml from 1.0.2.RELEASE to 1.1.0.BUILD-SNAPSHOT as suggested here: http://forum.springsource.org/showthread.php?122577-XML-Validation-Problems-A-schema-cannot-contain-two-global-components-with-the-same&highlight=Referenced+file+contains+errors.

      It seems obvious to me that Roo should update the maven project file automatically with appropriate versions that do not cause this kind of problem.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stewarta Alan Stewart
                Reporter:
                gdw62 Gary White
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: