Announcement Announcement Module
Collapse
No announcement yet.
"web mvc setup" leads to "Referenced file contains errors..." in Spring config files Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Is this a known bug/issue in Roo or STS? Is there a fix?

    Everything was fine with my project. I entered the "web mvc setup" command in the Roo shell and it proceeded to do its thing. The Problems view in eclipse then reported errors in several of my Spring configuration files:

    Code:
    Multiple annotations found at this line:
    	- Referenced file contains errors (jar:file:/Users/jhall/.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..."
    	- Referenced file contains errors (jar:file:/Users/jhall/.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:/Users/jhall/.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..."
    Here's the applicationContext-jpa.xml file (generated by Roo):

    Code:
    <?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="org.rooinaction" />
    
    </beans:beans>
    OS: OSX 10.6.8
    STS version: 2.9.0
    Roo version: 1.2.1
    JDK: Latest Mac OS X version (1.6)

    I'm learning Roo, so I don't know what to do at this point.

    Thanks!

    -Jeff

  • #2
    I'm experiencing the same problem. I've been learning Roo for the last couple of months and had not previously encountered this problem when setting up web mvc earlier on in that time frame. I've been going through the Spring Roo in Action book and just encountered this problem as I got to the Spring MVC chapter. I've installed multiple updates to Roo and STS since I had successfully used the web mvc setup command before but I'm unsure as to which update (if any) may be responsible for this issue.


    OS: Win XP
    STS version: 2.9.1
    Roo version: 1.2.1
    JDK: 1.7.0_03-b05

    Comment


    • #3
      Did you try this?

      If this isn't exactly the same error, it helps to post the Error Details.

      Comment


      • #4
        MiB,

        Thanks for the reference; I will try that.

        My main concern is that even if the suggested fix works that this is still unexpected behavior and probably represents a bug that needs to be fixed. STS, including Roo and associated tools/libraries, is supposed to be an integrated tool set and a standard and common Roo command should not cause an error such as this. Accordingly, I guess I'll go ahead and create a bug report to see if we can get resolution that way.

        BTW, my problem is identical to the original post both in the step taken to cause the problem as well as the resulting symptoms and that is why I didn't post any redundant information.
        Last edited by GDW; Mar 27th, 2012, 04:03 PM.

        Comment


        • #5
          That fix did solve the problem. What's funny is that I had seen a similar suggestion on another post a day or two ago and had tried it without success. I have no clue what I did differently this time. I'll have to go find that other post to see if it references the same spring-data-jpa version.

          Thanks again.

          Comment


          • #6
            I created https://jira.springsource.org/browse/ROO-3107 to report this issue.

            Comment


            • #7
              Originally posted by GDW View Post
              That fix did solve the problem. What's funny is that I had seen a similar suggestion on another post a day or two ago and had tried it without success. I have no clue what I did differently this time. I'll have to go find that other post to see if it references the same spring-data-jpa version.
              I just tried it again with another project and the errors didn't go away until after I manually cleaned the project with Eclipse's "Project|Clean.." option (I had the projects set to build automatically). I thought that I had taken this step when I tried it the other day but maybe not.

              Comment


              • #8
                Originally posted by GDW View Post
                MiB,

                BTW, my problem is identical to the original post both in the step taken to cause the problem as well as the resulting symptoms and that is why I didn't post any redundant information.
                I should perhaps have been more clear on that I meant the linked discussion and not the OP on this page. My apologies.

                Comment


                • #9
                  Here's another JIRA ticket created in response to this issue: https://jira.springsource.org/browse/ROO-3110

                  Comment


                  • #10
                    Thanks, GDW! I'm glad it's not just me!

                    Comment


                    • #11
                      Originally posted by JeffH View Post
                      Thanks, GDW! I'm glad it's not just me!
                      NP Jeff. Ain't it great to know that you're not alone?

                      Comment


                      • #12
                        Originally posted by MiB View Post
                        Did you try this?

                        If this isn't exactly the same error, it helps to post the Error Details.
                        Thank you so much for this it's what Public Liability Insurance needed and helped tremendously!
                        Last edited by CoolCatNathan; Apr 25th, 2012, 05:39 AM.

                        Comment


                        • #13
                          I have a similar problem with my applicationContext-jpa:
                          Version: 2.9.2.RELEASE
                          Build Id: 201205071000
                          OS: Windows 7
                          JAVA: jdk1.6.0_31
                          ROO: 1.2.1.RELEASE



                          [code]
                          <?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.pss" />

                          </beans:beans>
                          [code]




                          Multiple annotations found at this line:
                          - Referenced file contains errors (jar:file:/C:/Users/Giancarlo/.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:/Users/Giancarlo/.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:/Users/Giancarlo/.m2/repository/org/springframework/spring-beans/3.1.0.RELEASE/spring-beans-3.1.0.RELEASE.jar!/
                          Last edited by giamak; Jul 2nd, 2012, 12:02 PM.

                          Comment


                          • #14
                            Solved it

                            Originally posted by giamak View Post
                            I have a similar problem with my applicationContext-jpa:
                            Version: 2.9.2.RELEASE
                            Build Id: 201205071000
                            OS: Windows 7
                            JAVA: jdk1.6.0_31
                            ROO: 1.2.1.RELEASE



                            [code]
                            <?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.pss" />

                            </beans:beans>
                            [code]




                            Multiple annotations found at this line:
                            - Referenced file contains errors (jar:file:/C:/Users/Giancarlo/.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:/Users/Giancarlo/.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:/Users/Giancarlo/.m2/repository/org/springframework/spring-beans/3.1.0.RELEASE/spring-beans-3.1.0.RELEASE.jar!/

                            I have solved it by doing 3 things:

                            1. Added this repository to my POM:
                            <repository>
                            <id>spring-milestone</id>
                            <name>Spring Maven MILESTONE Repository</name>
                            <url>http://repo.springsource.org/libs-milestone</url>
                            </repository>
                            2. I'm using this version of spring-jpa:
                            <dependency>
                            <groupId>org.springframework.data</groupId>
                            <artifactId>spring-data-jpa</artifactId>
                            <version>1.2.0.RELEASE</version>
                            </dependency>
                            3. I removed the xsd versions from my context (although I'm not sure it is necessary):
                            <?xml version="1.0" encoding="UTF-8"?>
                            <beans xmlns="http://www.springframework.org/schema/beans"
                            xmlns:context="http://www.springframework.org/schema/context"
                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
                            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.xsd
                            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
                            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
                            http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
                            http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">


                            I hope this helps.

                            Comment

                            Working...
                            X