首页 / XML / CXF WebService的春季配置得到了java.lang.NoClassDefFoundError:javax / xml / ws / EndpointReference
CXF WebService的春季配置得到了java.lang.NoClassDefFoundError:javax / xml / ws / EndpointReference
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了CXF WebService的春季配置得到了java.lang.NoClassDefFoundError:javax / xml / ws / EndpointReference,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2542字,纯文字阅读大概需要4分钟。
内容图文
![CXF WebService的春季配置得到了java.lang.NoClassDefFoundError:javax / xml / ws / EndpointReference](/upload/InfoBanner/zyjiaocheng/676/fbf6e5b9354b43b98b425b90fe40f0c1.jpg)
我正在尝试使CXF与weblogic上的maven弹簧一起使用.该项目的编译/构建很好,但是当我尝试部署它时,出现此错误:
<User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ibanInfos': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/ws/EndpointReference.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ibanInfos': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/ws/EndpointReference
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
Truncated. see log file for complete stacktrace
java.lang.NoClassDefFoundError: javax/xml/ws/EndpointReference
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.getDeclaredMethods(Class.java:1763)
at java.beans.Introspector$1.run(Introspector.java:1265)
at java.security.AccessController.doPrivileged(Native Method)
任何想法如何解决这个问题?
实际上,我使用的是Java first策略来生成WSDL.
这是我的春季文件:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<import resource="classpath:service-definition-beans.xml"/>
<jaxws:endpoint id="ibanInfos" implementor="#ibanInfosService" address="http://localhost:7001/IbanInfos" />
</beans>
解决方法:
确保您的类路径中有jaxws-api-2.1.jar.
可以通过上面的链接或从Maven下载.
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.2.8</version>
</dependency>
内容总结
以上是互联网集市为您收集整理的CXF WebService的春季配置得到了java.lang.NoClassDefFoundError:javax / xml / ws / EndpointReference全部内容,希望文章能够帮你解决CXF WebService的春季配置得到了java.lang.NoClassDefFoundError:javax / xml / ws / EndpointReference所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。