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

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

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

委派模式:PARENT_FIRST]失败;嵌套异常是org.springframework.beans中org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:160)中的java.lang.NoClassDefFoundError:org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean . 在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean的org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:949)上的factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1045)在org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:295)的org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)上的AbstractAutowireCapableBeanFactory.java:487) org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSin gletonBeanRegistry.java:223)org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)at org位于org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)的.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)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 . sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl)中的newInstance0(本机方法) .java:44)在org.springframework.beans.BeanUtils.instantiateClass(BeanUtils . )的java.lang.reflect.Constructor.newInstance(Constructor.java:516)的sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) . java:148)... 116更多由java.lang.J9VMInternals中的java.lang.J9VMInternals.verifyImpl(Native Method)中的java.lang.NoClassDefFoundError:org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean引起 . 验证(J9VMInternals.java:72)java.lang.J9VMInternals.verify(J9VMInternals.java:70)java.lang.J9VMInternals.prepare(J9VMInternals.java:433)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 . 位于com.ibm.ws.bootstrap.ExtClassLoade的java.net.URLClassLoader.findClass(URLClassLoader.java:423)上的ReflectionServiceFactoryBean r.findClass(ExtClassLoader.java:191)在java.lang.ClassLoader.loadClass(ClassLoader.java:660)java.lang.ClassLoader的com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:111) .loadClass(ClassLoader.java:626)位于com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)com的com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58) . ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:511)at java.lang.ClassLoader.loadClass(ClassLoader.java:626)at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:511)在java.lang.ClassLoader.loadClass(ClassLoader.java:626)... 140多

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

任何帮助是极大的赞赏 .

回答(1)

2 years ago

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