带有Spring和Apache 7的CXF 3.0返回java.lang.ClassNotFoundException:org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean

时间:2014-07-30 16:00:44

标签: cxf

我正在使用带有Spring 2.4和Apache 7的CXF 3.0开发CXF Web服务。 bean.xml中的jaxws:endpoint语句如下所示

< jaxws:endpoint id =“orderProcess”implementor =“com.webservices.impl.OrderProcessImpl”address =“/ OrderProcess”/> 返回错误

委托模式:PARENT_FIRST]失败;嵌套异常是java.lang.NoClassDefFoundError:org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean     在org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:160)     在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1045)     在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:949)     在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)     在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)     at org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:295)     在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)     在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)     在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)     在org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)     在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)     在org.springframework.context.support.ClassPathXmlApplicationContext。(ClassPathXmlApplicationContext.java:139)     在org.springframework.context.support.ClassPathXmlApplicationContext。(ClassPathXmlApplicationContext.java:119)     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:44)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)     在java.lang.reflect.Constructor.newInstance(Constructor.java:516)     在org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)     ......还有116个 引起:java.lang.NoClassDefFoundError:org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean     at java.lang.J9VMInternals.verifyImpl(Native Method)     at java.lang.J9VMInternals.verify(J9VMInternals.java:72)     在java.lang.J9VMInternals.verify(J9VMInternals.java:70)     在java.lang.J9VMInternals.prepare(J9VMInternals.java:433)     at java.lang.Class.getDeclaredConstructors(Class.java:537)     在org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:156)     ......还有134个 引起:java.lang.ClassNotFoundException:org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean     在java.net.URLClassLoader.findClass(URLClassLoader.java:423)     在com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:191)     at java.lang.ClassLoader.loadClass(ClassLoader.java:660)     在com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:111)     at java.lang.ClassLoader.loadClass(ClassLoader.java:626)     在com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)     在com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)     在com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:511)     at java.lang.ClassLoader.loadClass(ClassLoader.java:626)     在com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:511)     at java.lang.ClassLoader.loadClass(ClassLoader.java:626)     ......还有140多个

我没有看到任何jar中存在类org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean。所以,我不确定为什么Web Sphere 7正在寻找这个课程。

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

我认为你需要将cxf-rt-wsdl-3.0.0.jar添加到你的战争中。