在jboss 6.0上使用Spring 3.0上的JAX WS SOAP方式错误

时间:2012-03-26 06:24:45

标签: java spring jax-ws jboss6.x

我刚刚将我的应用程序从jboss5.0升级到jboss 6.0,我正在使用JAXWS webservices,下面是配置:

<bean id="registerService"   class="org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean">
  <property name="serviceInterface" value="com.friendsmirror.register.controller.UserRegisterController" />
  <property name="wsdlDocumentUrl" value="http://127.0.0.1:8080/FriendsMirrorRegisterWS/Register?wsdl" />
  <property name="namespaceUri" value="http://controller.register.friendsmirror.com/" />
  <property name="serviceName" value="UserRegisterControllerImplService" />
  <property name="portName" value="UserRegisterControllerImplPort" />
</bean>

注入此bean时,会抛出异常,如:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registerService' defined in ServletContext resource [/WEB-INF/spring/friendsmirrorBeans.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/BeansException
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1444) [:3.1.0.RC2]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518) [:3.1.0.RC2]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455) [:3.1.0.RC2]
          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) [:3.1.0.RC2]
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) [:3.1.0.RC2]
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) [:3.1.0.RC2]
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) [:3.1.0.RC2]
          at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) [:3.1.0.RC2]
          ... 96 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException
          at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory.getSpringBusFactory(JBossWSBusFactory.java:120) [:3.4.1.GA]
          at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory.createBus(JBossWSBusFactory.java:54) [:3.4.1.GA]
          at org.jboss.wsf.stack.cxf.client.ProviderImpl.createServiceDelegate(ProviderImpl.java:69) [:3.4.1.GA]
          at javax.xml.ws.Service.<init>(Service.java:57) [:1.0.0.Final]
          at javax.xml.ws.Service.create(Service.java:687) [:1.0.0.Final]
          at org.springframework.remoting.jaxws.LocalJaxWsServiceFactory.createJaxWsService(LocalJaxWsServiceFactory.java:125) [:3.1.0.RC2]
          at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.prepare(JaxWsPortClientInterceptor.java:334) [:3.1.0.RC2]
          at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.afterPropertiesSet(JaxWsPortClientInterceptor.java:316) [:3.1.0.RC2]
          at org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean.afterPropertiesSet(JaxWsPortProxyFactoryBean.java:42) [:3.1.0.RC2]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1503) [:3.1.0.RC2]
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1441) [:3.1.0.RC2]
          ... 103 more
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.BeansException from BaseClassLoader@263b84ee{vfs:///Users/Jayaram/Program/Servers/jboss-6.0.0.Final/server/all/conf/jboss-service.xml}
          at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480) [jboss-classloader.jar:2.2.0.GA]
          at java.lang.ClassLoader.loadClass(ClassLoader.java:247) [:1.6.0_29]
          ... 114 more 
19:44:27,215 INFO  [config] Initializing Mojarra 2.0.9 (FCS 20120216) for context '/FriendsMirrorWAR'

虽然使用相同的独立测试方法或junit,工作绝对正常,即使它与jboss5.0一起正常工作,我迁移到jboss 6.0,因为我需要JSF2.0。

请帮我解决,从过去的3天开始。

提前致谢。

贾亚拉姆

0 个答案:

没有答案