-
Jul 13th, 2011, 05:03 AM
#1
"Unable to locate Spring NamespaceHandler for XML schema namespace" executing jar
I'm developing an application to be started as a jar from command line.
When executing main method from the Eclipse suite everithing works fine, when executing from command line this exception is thrown:
Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/util]
Offending resource: class path resource [ac.xml]
ac.xml is my Application Context xml:
<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/schem...-beans-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">
the exception is thrown when adding this util tag:
<util:list id="40009">
<ref bean="ibatisDataExecuter"/>
</util:list>
(ibatisDataExecuter is defined as a bean correctly.....)
I'm using Spring 3.1.0.M2
What could be the cause of this problem?
These are the leatest logs messages:
12:00:29,100 Email DEBUG org.springframework.beans.factory.xml.PluggableSch emaResolver:getSchemaMappings{1}:146 - Loaded schema mappings: {http://www.springframework.org/schem...ing-tx-2.5.xsd, http://www.springframework.org/schem...ing-tx-3.1.xsd, http://www.springframework.org/schem...ing-tx-2.0.xsd, http://www.springframework.org/schem...ing-tx-3.1.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd}
12:00:29,296 Email DEBUG org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader:registerBeanDefinitions{1} :108 - Loading bean definitions
12:00:29,304 Email DEBUG org.springframework.beans.factory.xml.DefaultNames paceHandlerResolver:getHandlerMappings{1}:156 - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamesp aceHandler}Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/util]Offending resource: class path resource [ac.xml]
Thanks for help!
-
Jul 15th, 2011, 04:03 AM
#2
Not sure, but my guess is you have an old Spring jar file on your classpath which doesn't know about 3.1 schemas. N.B. this is not a Spring Batch question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules