0
我正在使用CXF編寫一個web服務,並在JBoss 6.0.0.Final下運行。現在,我有一個簡單的Web服務類,只有一個方法,用於測試。我的戰爭沒有得到部署。我正在部署戰爭時獲得以下例外。JBoss6下的CXF web服務部署錯誤
13:55:27,354 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/cxfws]] **Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: java.lang.NoClassDefFoundError: org/springframework/core/io/AbstractFileResolvingResource**
at java.lang.ClassLoader.defineClass1(Native Method) [:1.7.0]
at java.lang.ClassLoader.defineClass(Unknown Source) [:1.7.0]
at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:52) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:650) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:609) [jboss-classloader.jar:2.2.0.GA]
at java.security.AccessController.doPrivileged(Native Method) [:1.7.0]
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:608) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:585) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:156) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.filter.FilteredDelegateLoader.doLoadClass(FilteredDelegateLoader.java:141) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:132) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:461) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:262) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:161) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:260) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1152) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:886) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:505) [jboss-classloader.jar:2.2.0.GA]
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:450) [jboss-classloader.jar:2.2.0.GA]
at java.lang.ClassLoader.loadClass(Unknown Source) [:1.7.0]
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.getResourceByPath(AbstractRefreshableWebApplicationContext.java:153) [:3.0.5.RELEASE]
at org.springframework.core.io.DefaultResourceLoader.getResource(DefaultResourceLoader.java:102) [:2.5.5]
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:280) [:2.5.5]
at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1227) [:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:177) [:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) [:3.0.5.RELEASE]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) [:3.0.5.RELEASE]
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) [:3.0.5.RELEASE]
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) [:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467) [:3.0.5.RELEASE]
.....
該項目是一個maven項目,我有春天的jar依賴項,因爲我將在以後編寫bean類。
您的幫助表示讚賞。
該日誌建議它找到「org.springframework.core.io」的版本2.5.5,但其他spring類的版本是3.0.5.RELEASE。 – 2012-04-27 10:49:05
我改變了Maven的依賴關係爲在Apache CXF網站指定CXF束-JAXRS,和我得到一個不同的錯誤: 部署「VFS:/// d:/ JBoss6 /服務器/ default/deploy目錄/ cxfws .war「由於以下原因而出錯:java.lang.annotation.AnnotationTypeMismatc hException:爲註釋元素找到的數據類型不正確public abstract javax.xml.bind.annotation.XmlNsForm org.jboss.xb.annotations .JBossXmlS chema.elementFormDefault()(找到類型爲Ljavax/xml/bind/annotation/XmlNsForm; .QUALIFIED的數據) – 2012-04-27 11:55:54
您最好更新您的文章並添加一個新的堆棧跟蹤。請記住,Spring 3.x支持JBoss VFS。 – 2012-04-29 01:22:02