Hi,
I'm using Spring Batch 2.0 RELEASE, and am getting these namespace errors even though I've already changed the schema to have spring batch as the default namespace, and set identical schema declarations in all of my spring configs.
All my Spring configs have this declaration:
In the 'topmost' config file, dailyExportApplicationContext.xml, i am importing 2 other spring configs, like so:Code:<?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/batch" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" 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.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
But I keep getting these errors! (carriage returns added so it displays without scrollbars)Code:<beans:import resource="batchContext.xml"/> <beans:import resource="ftpContext.xml"/>
Code:[XmlBeanDefinitionReader] Ignored XML validation warning org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/batch/spring-batch-2.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
-- and further down the stacktrace, there is:
Line 50 in the xml document contains this declaration:Code:[CommandLineJobRunner] Job Terminated in error: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 50 in XML document from class path resource [dailyExportApplicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'job'. at org.springframework.beans.factory.xml.XmlBeanDefinitionReader. doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
Code:<job id="fullExport"> <step id="step1"> <tasklet ref="downloadTasklet" /> </step> <step id="step2"> <tasklet ref="createExportFile" /> </step> </job>
Now I've checked my classpath and spring-batch-core-2.0.0.RELEASE.jar is definitely in it, so the schema should be found within this jar, right? I don't understand what else could be the problem. I've easily moved my project from 1.1.4 RELEASE to 2.0.0 RELEASE but I've hit a wall with this issue.
Does anyone have an idea on what else could be causing this error or suggestions on how to resolve it?
Strangely enough, even in IntelliJ IDEA I also get a little warning whenever I hover over the job element saying "Custom bean parsing is disabled for namespace 'http://www.springframework/schema/batch'", though that could be totally unrelated to my problem. (or is it?)
Thanks everyone!
Ellecer


)
Reply With Quote
