- This topic has 4 replies, 2 voices, and was last updated 14 years, 1 month ago by aqbrown.
-
AuthorPosts
-
aqbrownMemberI am suddenly getting the following errors when the validator runs on one of my spring context files.
The errors below were detected when validating the file “spring-beans-3.0.xsd” via the file “applicationContext-common.xml”. In most cases these errors can be detected by validating “spring-beans-3.0.xsd” directly. However it is possible that errors will only occur when spring-beans-3.0.xsd is validated in the context of applicationContext-common.xml.
ct-props-correct.4: Error for type ‘#AnonType_array.’ Duplicate attribute uses with the same name and target namespace. ( 5 errors like this )
My install :
MyEclipse Enterprise WorkbenchVersion: 8.6
Build id: 8.6-20100806Top of the context xml :
<?xml version=”1.0″ encoding=”UTF-8″?>
<beans xmlns=”http://www.springframework.org/schema/beans”
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xmlns:util=”http://www.springframework.org/schema/util”
xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd”>So the file is using spring 2.0 xsd, why is myeclipse trying to validate spring 3.0 xsd ?
davemeurerMemberHello,
It does make sense that other context files are validated thru the applicationContext-common.xml – regardless of if the applicationContext is using 2.0. Just to confirm – are you say that there are other context files that are using the spring-beans-3.0.xsd schema location? Does any file in your project contain spring-beans-3.0.xsd if you search on the project?
Kind regards,
Dave
aqbrownMemberNo other context files are using spring beans 3.0, they all specify 2.0.
So there are two issues
1) using 3.0 xsd when 2.0 is called for
2) failing to validate 3.0 xsd
davemeurerMemberThanks for the clarification.
The one thing I noticed with the declaration that you provided, is it uses http://www.springframework.org/schema/util/spring-util.xsd, which does contain references to the spring-beans-3.0.xsd. Does using http://www.springframework.org/schema/util/spring-util-2.0.xsd instead have an effect?
If not, please post your entire context file so we can troubleshoot locally.
Kind regards,
Dave
aqbrownMemberThat fixed it, thank you very much.
-
AuthorPosts