我正在尝试学习Spring web服务,我找到了这个教程:http://jeromebulanadi.wordpress.com/2010/02/25/basic-spring-web-service-tutorial-from-contract-to-security/#comment-302
我在eclipse中导入了项目prerson,添加了jar文件,但当我运行项目并输入:
http://localhost:8080/person/Person.wsdl我得到了这个错误:
javax.servlet.ServletException: Servlet.init() for servlet spring-ws threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:662)
root cause
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘Person’ defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker你能帮帮我吗?谢谢。
发布于 2012-08-27 03:38:07
java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker将xalan-2.7.1.jar添加到您的类空间中。
发布于 2012-11-20 22:32:53
使用xalan-2.7.0.jar。这对我很管用。
发布于 2012-08-27 07:46:32
我找到了这个问题的解决方案,只是将serializer.jar添加到我的类路径中,现在它可以工作了,看起来xalan-2.7.1.jar缺少TreeWalker。
https://stackoverflow.com/questions/12132781
复制相似问题