首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用spring batch时batch-int错误:job-launching gateway

使用spring batch时batch-int错误:job-launching gateway
EN

Stack Overflow用户
提问于 2016-08-02 17:34:55
回答 1查看 314关注 0票数 0

我正在尝试使用batch-int:job-launching gateway,但是我得到了以下错误:

代码语言:javascript
复制
Exception in thread "main"     org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:spring/integration-context.xml]
Offending resource: class path resource [spring/application-context.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 68 in XML document from class path resource [spring/integration-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException;
lineNumber: 68; columnNumber: 156; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'batch-int:job-launching-gateway'.

我的xml包含以下内容:

代码语言:javascript
复制
<beans:beans xsi:schemaLocation=" http://www.springframework.org/schema/batch-integration
 http://www.springframework.org/schema/batch-integration/spring-batch-integration.xsd
 http://www.springframework.org/schema/batch
 http://www.springframework.org/schema/batch/spring-batch.xsd
 http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/integration
 http://www.springframework.org/schema/integration/spring-integration.xsd
 http://www.springframework.org/schema/integration/file
 http://www.springframework.org/schema/integration/file/spring-integration-file.xsd "
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:int-file="http://www.springframework.org/schema/integration/file"
         xmlns:int="http://www.springframework.org/schema/integration"
         xmlns:beans="http://www.springframework.org/schema/beans"
         xmlns:batch-int="http://www.springframework.org/schema/batch-integration"
         xmlns:batch="http://www.springframework.org/schema/batch"
         xmlns="http://www.springframework.org/schema/beans">

出现错误的代码行是:

代码语言:javascript
复制
<batch-int:job-launching-gateway job-launcher="jobLauncher" reply-channel="jobLaunchReplyChannel" request-channel="channelStart"/>

通道"channelStart“在上面定义。

我是spring batch的新手,所以任何帮助都会很好。我在类路径上还有spring-batch-integration、spring-batch-core、spring-batch-infrastructure和spring-integration-event。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-08-02 21:41:59

我已经解决了这个问题。我最初有不同的spring-batch-core和spring-batch-integration版本。当我将这两个版本设置为相同的版本时,错误没有出现。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38716795

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档