CXF集成spring启动时报错,大家帮忙看一下。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CXF集成spring启动时报错,大家帮忙看一下。相关的知识,希望对你有一定的参考价值。

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'client' defined in ServletContext resource [/WEB-INF/jxxl-spring-cxf.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public java.lang.Object org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()] threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/ValidationEventHandler
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:982)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:878)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:484)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)

参考技术A jar包问题吧
xmlschema-core包冲突

也有可能是少包

springMVC 注解 启动时报错

[ERROR][2014-12-13 15:32:54,041][org.springframework.web.servlet.DispatcherServlet]Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mvc.service.IUserService com.mvc.controller.UserController.userService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.mvc.service.IUserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: @org.springframework.beans.factory.annotation.Autowired(required=true)

at java.lang.Thread.run(Thread.java:662)

首先你要学会看异常 org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class 这句是没有找到对应的class, 其次你要看,这个异常是LoadBeanClass时候出现的,这证明没有找到对应的bean,而这个bean对应的是在ContextLoaderListener读/WEB-INF/annomvc-servlet.xml时候出现的,这证明没有找到相应的MVC的类库,因此,是你少了jar包而引起的异常。 解决方法是加入jar包即可。 我不知道你的是2.X还是3.X 2.X加入spring-webmvc.jar 即可 3.X加入org.springframework.web.servlet-3.1.1.RELEASE.jar即可 这些jar都可以再spring的官方网站下载,也可以使用meavn下载。 参考技术A 你吧userController的
@Resources

private IUserService userService;
这样写试试

以上是关于CXF集成spring启动时报错,大家帮忙看一下。的主要内容,如果未能解决你的问题,请参考以下文章

Spring中使用集成MongoDB Client启动时报错:rc: 48

ubuntu下安装nodejs时报错make: *** [install] 错误 1谁能帮忙看一下

springCloud集成nacos启动时报错排查

spring集成kafka运行时报错:Failed to construct kafka producer] with root cause

springMVC 注解 启动时报错

sql查询分析器运行时报错,请大家帮忙下,初学者,见谅