我正在用spring構建一個web服務。我可以構建和部署項目到Tomcat,但在服務器啓動時我收到以下錯誤:spring webservice無效的NamespaceHandler問題(jaxws)
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-前端-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
和我的外部罐:
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
嗨dds,你能解決這個問題嗎? 我在webapp中嵌入了JBoss 5.1,Spring 3.0.3和Mule的問題。 -Om – 2011-06-02 14:28:47
嗨,是的,我克服了這個錯誤,但不幸的是我忘了怎麼做:( – dds 2011-06-10 05:31:28
通過向你的bean添加。 xml? –
redben
2012-03-15 19:42:34