Page 1 of 2 12 LastLast
Results 1 to 10 of 14

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

  1. #1

    Question "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. #2

    Default

    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

  3. #3
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Did you try this?

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

  4. #4

    Default

    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 at 04:03 PM.

  5. #5

    Default

    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.

  6. #6

    Default

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

  7. #7

    Default

    Quote 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.

  8. #8
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Posts
    434

    Default

    Quote 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.

  9. #9

    Default

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

  10. #10

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •