Meaningless Drivel is fun!*
The moose likes Spring and the fly likes spring config xml error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "spring config xml error" Watch "spring config xml error" New topic
Author

spring config xml error

Brian Mulholland
Ranch Hand

Joined: Mar 12, 2009
Posts: 61
My app works at runtime, but eclipse continues to tell me I'm doing it wrong. The error appears on the <beans> node.

Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-3.0.xsd). For more information, right click on the message and select "Show Details..."

When I click Show Details it says:

The reference to entity "uri" must end with the ";" delimiter.

On line 1 of http://www.springframework.org/schema/beans/spring-beans-3.0.xsd. Obviously that file is not under my control. my beans node looks like this:



Ideas?
Brian Mulholland
Ranch Hand

Joined: Mar 12, 2009
Posts: 61
Uhhh...okay, so I hit enter to format the node slightly differently (all attributes on a new line), rebuilt and the error cleared. I had cleaned and rebuilt before this to no avail. But this time, bam, problem gone?
Brian Mulholland
Ranch Hand

Joined: Mar 12, 2009
Posts: 61
Ignore that. It's back.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Eclipse is known for giving false negatives.

So if it works at runtime, then it works regardless of what Eclipse tells you.

If you have the Spring plugins, then when you are editing the xml file, at the bottom just below the file are tabs. There is one for namespaces. You can always go into that tab, it will give you checkboxes for Spring namespaces and you can uncheck the ones you have already, then recheck them and the Spring plugin will format the header part of your config file. That sometimes removes the Eclipse false errors.

I find that sometimes it just doesn't like the carriage returns in the schemaLocation prop.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: spring config xml error
 
Similar Threads
XML name space error in Spring data JPA hibernate applicationContext.xml
Spring JDBC Problem getting log messages
Problem in spring mvc configuration
The matching wildcard is strict, but no declaration can be found for element 'context:annotation'
applicationContext.xml - Can not find definition for element 'beans'