I was facing this issue in Eclipse Europa where the Spring configuration XML was not getting validated, when i included JBoss Cache related configuration in it. This is primarily because the Namespace and the Schema URI,
http://www.springmodules.org/schema/jboss
http://www.springmodules.org/schema/cache/springmodules-jboss.xsd
http://www.springmodules.org/schema/cache/springmodules-jboss.xsd
are not available at the respective locations, hence i guess these were not bundled in Eclipse Europa. I spent about 4-5 hours breaking my head on this issue before I found the solution in another blog.
The way to get your XML to be reported as validated is:
1. In Eclipse, Click on Window > Preferences.. > Web and XML > XML Catalog
2. Under XML Catalog, Click on User Specified Entries and then click on Add...
3. Create the following Entries/Locations
>>>>> [Replace pathto with the actual location of the JAR on your local machine.]
>>>>>> jar:file:pathto/spring-modules-cache.jar!/org/springmodules/cache/config/springmodules-cache.xsd
>>>>>> KEY TYPE Schema Location
>>>>> jar:file:pathto/spring-modules-cache.jar!/org/springmodules/cache/config/jboss/springmodules-jboss.xsd
>>>>> KEY TYPE Schema Location
>>>>> KEY http://www.springmodules.org/schema/cache/springmodules-jboss.xsd
4. Refresh the XML file in the Project Explorer and... all XML validation errors have gone!
No comments:
Post a Comment