Announcement Announcement Module
Collapse
No announcement yet.
<jpa:repositories> element causing xml error markers in STS 3.1.0.RELEASE Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <jpa:repositories> element causing xml error markers in STS 3.1.0.RELEASE

    Hi all,

    I'm getting an xml problem marker that others have seen with SD JPA, and they just started appearing. I saw this first with SD JPA 1.2.0.RELEASE a couple of days ago and now I'm still seeing it with SD JPA 1.3.0.RELEASE.
    Code:
    Referenced file contains errors (http://www.springframework.org/schema/tool/spring-tool.xsd).  For more information, right click on the message in the Problems View and select "Show Details..."
    Right-clicking on the message yields the following error message (repeated 6 times with different schema names):
    Code:
    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/tool,annotation'.
    Like others have noticed, if I comment the <jpa:repositories> element, the error goes away (see attached screenshots).

    Can the SD team figure out what is going on here? While it's not a showstopper for me (I ignore plenty of eclipse error markers), other developers at our client who are new to Java & STS/eclipse are going to freak out a bit, and I'd like to avoid that.

    Thanks,
    Matthew

  • #2
    I have the same problem and would also like to find a solution. Thanks.

    Comment


    • #3
      Same thing here, no matter what I try, even fooling around with libraries versions I cannot get rid of this red X. And curiously it started happening this week, before that everything was ok.

      Comment


      • #4
        Originally posted by pepbr View Post
        ...curiously it started happening this week, before that everything was ok.
        I noticed that, too. It started happening out of nowhere. Harumph.

        Comment


        • #5
          Phew... glad I'm not going crazy. This just started happening to me as well and without having made any code changes. I've gone back to multiple tagged releases that never expressed this and still get the same problem. I'm not using STS just a fairly generic J2EE Eclipse Helios installation. I'll keep digging into it but I'm currently suspecting:

          1. An externally referenced schema changed... but I thought the schemas were all pulled from the JARs.
          2. A corrupt Maven artifact with a bogus schema is floating around out there. I can't say for sure but I feel like this started appearing when I did a force update of dependencies.

          Hoping to find a solution since these red X's do not sit well with my OCD ;-)

          Comment


          • #6
            Originally posted by dalrympm View Post
            2. A corrupt Maven artifact with a bogus schema is floating around out there. I can't say for sure but I feel like this started appearing when I did a force update of dependencies.
            Yeah, I remember doing this too!

            Comment


            • #7
              I'm still not sure where the problem is exactly but I was able to resolve it by using versions XSD reference. Where I was previously using the following in my schemalocation

              Changing spring-jpa.xsd to spring-jpa-1.1.xsd made the errors go away.

              Code:
              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/jee http://www.springframework.org/schema/jee/spring-jee.xsd
              http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.1.xsd
              I certainly prefer to use unversioned schema locations so it would be great if someone could chime in on this thread if this gets fixed.

              Comment


              • #8
                Thanks a lot for the trick! It worked for me.

                However, the trick looks pretty ugly for my projects. I am using Spring Data JPA 1.3.0 together with Spring 3.1.4 but I have to use the "spring-jpa-1.1.xsd" file in order to avoid the big red X mark on my projects. Both "spring-jpa.xsd" and "spring-jpa-1.3.xsd" would result in the same error.

                At first I had thought that the schema files cached by eclipses might have been corrupted somehow. However the issue remained after I deleted all cached schema files. I've also tried some other suggested solutions available on the Web but none except this one worked.

                I totally agree that someone should fix the issue.

                Originally posted by dalrympm View Post
                I'm still not sure where the problem is exactly but I was able to resolve it by using versions XSD reference. Where I was previously using the following in my schemalocation

                Changing spring-jpa.xsd to spring-jpa-1.1.xsd made the errors go away.

                Code:
                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/jee http://www.springframework.org/schema/jee/spring-jee.xsd
                http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.1.xsd
                I certainly prefer to use unversioned schema locations so it would be great if someone could chime in on this thread if this gets fixed.

                Comment


                • #9
                  workspace related

                  http://forum.springsource.org/showth...ngs-And-Errors

                  Comment


                  • #10
                    Actually I no longer use STS. Instead, I just switched back to Eclipse with JEE plus plug-ins I need. I got these errors after the switch. I am not sure whether or not the two are related, but XML schema validation does not sound so difficult to require STS.

                    Anyway, I just tried to create a new workspace and copy my projects over. Despite the work for redoing all of my preferences, the new workspace does not help with the errors. Neither spring-jpa.xsd nor spring-jpa-1.3.xsd works. Instead, spring-jpa-1.1.xsd works fine, although the version number is different from spring-data-jpa 1.3 I am using for the projects, as I had mentioned in my previous post.

                    I am still confused by the fact that version 1.1 of the XSD file works but the version 1.3 does not...

                    Yanlin

                    Comment

                    Working...
                    X