gpt4 book ai didi

java - Spring WebService无效的NamespaceHandler问题(JAXWS)

转载 作者:行者123 更新时间:2023-12-01 11:21:06 27 4
gpt4 key购买 nike

我正在用Spring构建一个Web服务。我可以构建项目并将其部署到tomcat,但是当服务器启动时,出现以下错误:

Invalid NamespaceHandler class [org.apache.cxf.jaxws.spring.NamespaceHandler] for namespace [http://cxf.apache.org/jaxws]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/xml/NamespaceHandlerSupport



我已经在类路径中包含了cxf-rt-frontend-jaxws.jar。

我的bean定义在这里:
 <jaxws:endpoint id="helloWebservice"
implementor="#com.xxx.impl.HelloWebserviceImpl"
address="/hellows">
</jaxws:endpoint>

我的lib文件夹包含(WEB-INF/lib):
antlr-2.7.6.jar
asinus-api.jar
asinus-ri.jar
aspectjrt.jar
aspectjweaver.jar
backport-util-concurrent-3.0.jar
cglib-nodep-2.1_3.jar
commons-beanutils-1.6.jar
commons-codec-1.4.jar
commons-collections-3.2.1.jar
commons-fileupload-1.2.jar
commons-httpclient-3.1.jar
commons-io-1.4.jar
commons-lang-2.4.jar
commons-logging-1.1.1.jar
com.springsource.javax.validation-1.0.0.GA.jar
com.springsource.org.aopalliance-1.0.0.jar
dom4j-1.6.1.jar
ehcache-core-1.7.2.jar
ezmorph-1.0.4.jar
freemarker-2.3.15.jar
hibernate3.jar
hibernate-validator-4.0.2.GA.jar
javassist.jar
jdom.jar
jpa-api-2.0-cr-1.jar
json-lib-2.2.jar
jta-spec1_0_1.jar
lib.txt
log4j-1.2.15.jar
memcached-2.4.2.jar
org.springframework.aop-3.0.2.RELEASE.jar
org.springframework.asm-3.0.2.RELEASE.jar
org.springframework.aspects-3.0.2.RELEASE.jar
org.springframework.beans-3.0.2.RELEASE.jar
org.springframework.context-3.0.2.RELEASE.jar
org.springframework.context.support-3.0.2.RELEASE.jar
org.springframework.core-3.0.2.RELEASE.jar
org.springframework.expression-3.0.2.RELEASE.jar
org.springframework.jdbc-3.0.2.RELEASE.jar
org.springframework.orm-3.0.2.RELEASE.jar
org.springframework.test-3.0.2.RELEASE.jar
org.springframework.transaction-3.0.2.RELEASE.jar
org.springframework.web-3.0.2.RELEASE.jar
owasp.jar
quartz-1.7.3.jar
rome-1.0.jar
slf4j-api-1.5.6.jar
slf4j-log4j12-1.5.6.jar
spring-modules-cache.jar

和我的外部 jar :
cxf-2.2.5.jar
geronimo-activation_1.1_spec-1.0.2.jar
geronimo-jaxws_2.1_spec-1.0.jar
geronimo-ws-metadata_2.0_spec-1.1.2.jar
jaxb-api-2.1.jar
jaxb-impl-2.1.12.jar
neethi-2.0.4.jar
saaj-api-1.3.jar
saaj-impl-1.3.2.jar
stax-api-1.0.1.jar
wsdl4j-1.6.2.jar
wss4j-1.5.8.jar
wstx-asl-3.2.9.jar
xml-resolver-1.2.jar
XmlSchema-1.4.5.jar
xmlsec-1.4.3.jar
WEB-INF/lib/cxf-rt-frontend-jaxws.jar

最佳答案

似乎您缺少 Spring jar ,或者您有旧版本的 Spring jar 。尝试获取类路径上的最新spring-beans.jar。还要确保在类路径上没有另一个这样的jar。

关于java - Spring WebService无效的NamespaceHandler问题(JAXWS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4183624/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com