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

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 ( 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 Obviously that file is not under my control. my beans node looks like this:

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

Joined: Feb 05, 2001
Posts: 17276

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.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: spring config xml error
It's not a secret anymore!