作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 Spring WS 并声明一个 DefaultWsdl11Definition bean 以动态生成 WSDL 文件。
但是,当我启动网络服务器 (tomcat) 时,由于以下原因出现 bean 实例化错误:
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/wsdl/extensions/ExtensibilityElement
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
... 45 more
Caused by: java.lang.NoClassDefFoundError: javax/wsdl/extensions/ExtensibilityElement
at org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition.<init>(DefaultWsdl11Definition.java:56)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
... 47 more
Caused by: java.lang.ClassNotFoundException: javax.wsdl.extensions.ExtensibilityElement
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1671)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
... 53 more
SpringWS-Servlet.xml 中的 Bean
<bean id="beanWS" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="schema">
<bean class="org.springframework.xml.xsd.SimpleXsdSchema">
<property name="xsd" value="/WEB-INF/somexsd.xsd"/>
</bean>
</property>
<property name="portTypeName" value="beanWS"/>
<property name="locationUri"
value="http://localhost:8080/springws"/>
</bean>
任何想法可能是什么问题..
PS:Spring版本为3.0.5,Spring WS版本为2.0.0-M3
谢谢
最佳答案
Spring-WS依赖WSDL4J库,您似乎缺少它。
关于java - Spring WS DefaultWsdl11定义错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4431760/
我是一名优秀的程序员,十分优秀!