部署Spring Batch Application时出错 - java.lang.NoClassDefFoundError:org / codehaus / jettison / mapped / MappedXMLOutputFactory

时间:2015-02-28 19:56:16

标签: spring batch-file

我在最近几天遇到了这个错误,在加载spring批处理应用程序时,它继续发出错误 org.springframework.beans.factory.BeanCreationException:创建名称为' jobRepository'的bean时出错。在ServletContext资源中定义[/WEB-INF/classes/spring/batch/jobs/config/context.xml]:调用init方法失败;嵌套异常是java.lang.NoClassDefFoundError:org / codehaus / jettison / mapped / MappedXMLOutputFactory

我已将jettison添加到我的pom中,在我的pom文件下面看起来像                      org.codehaus.jettison             抛弃             1.3.2                               org.springframework             弹簧webmvc             $ {} spring.version                               org.springframework             弹簧OXM             $ {} spring.version                               org.springframework.batch             弹簧分批测试             $ {} spring.batch.version                                                   抛弃                     org.codehaus.jettison                                       

1 个答案:

答案 0 :(得分:0)

pom.xml应具有依赖性:

<dependency>
    <groupId>org.codehaus.jettison</groupId>
    <artifactId>jettison</artifactId>
    <version>1.3.2</version>
</dependency>

另外,您是否在maven依赖项中看到了jettison-1.3.2.jar? 如果你正在使用eclipse,ctr + sft + t:你能看到这个类吗?