java - Error: "schemaLocation value *** must have even number of URI's." on namespaces in spring dispatcher -


i getting following error

<ignored xml validation warning> org.xml.sax.saxparseexception; linenumber: 9; columnnumber: 55; schemalocation: schemalocation value = 'http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/tx' must have number of uri's. 

and dispatcher servlet having following namespaces

<beans xmlns="http://www.springframework.org/schema/beans"        xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"        xmlns:p="http://www.springframework.org/schema/p"        xmlns:aop="http://www.springframework.org/schema/aop"        xmlns:tx="http://www.springframework.org/schema/tx"        xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">   

and replaced above following

<beans xmlns="http://www.springframework.org/schema/beans"               xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"               xsi:schemalocation="http://www.springframework.org/schema/beans               http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">   

and error got disappeared.
how happened can 1 tell??

the schemalocation attribute references xml schema document namespace.

basically when type:

xmlns:expns="http://www.example.com" xsi:schemalocation="http://www.example.com                     http://www.example.com/schema/example.xsd" 

you saying: "i'm going use prefix expns for elements of namespace http://www.example.com. also, can validate elements, xsd schema file for http://www.example.com in http://www.example.com/schema/example.xsd"

so, in other words, format is:

xsi:schemalocation="namespace-a   where_to_get_the_xsd_for_namespace-a                     namespace-b   where_to_get_the_xsd_for_namespace-b                     namespace-c   where_to_get_the_xsd_for_namespace-c" 

and on.

that's why must me even number.


more info , examples can found here.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -