This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Spring and the fly likes Unexpected element " {antlib:org:apache:tools:ant}beans Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Unexpected element &quot {antlib:org:apache:tools:ant}beans Error " Watch "Unexpected element &quot {antlib:org:apache:tools:ant}beans Error " New topic

Unexpected element &quot {antlib:org:apache:tools:ant}beans Error

pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 316


I'm using the Spring framework 3.0.5 and have a user library consisting of all the spring jars created in Eclipse.

I had created a project earlier and had a configuration file called 'spring.xml' defined in it.
The project ran fine.
Today, I changed the unzipped folder location of spring and then created the user library again based on new location.
But now as I create a configuration file using the same steps I had last week, I get the error "Unexpected element " {antlib:org:apache:tools:ant}beans."

I get the error before </beans> tag.
It means the tag <beans> is not valid, I also tried out changing the location of the config file , moved it in and out of the classpath but didn't help.

Please advise.

It is sorta covered in the JavaRanch Style Guide.
subject: Unexpected element &quot {antlib:org:apache:tools:ant}beans Error
Similar Threads
Error: The matching wildcard is strict, but no declaration can be found for element 'remember-me'
How to add a new tag in XML configuration file.
Cannot find the declaration of element 'beans' -- application context invalid?
XML name space error in Spring data JPA hibernate applicationContext.xml
javax.xml.bind.annotation.XmlSchemaType missing