No bean named cxf'is defined怎么解决

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了No bean named cxf'is defined怎么解决相关的知识,希望对你有一定的参考价值。

我也遇到了同样的问题,经过后台报错No bean named \'cxf\' is defined。 仔细检查页面会发现页面上javax.servlet.ServletException: Servlet.init() for servlet CXFService threw…… 而这个是因为web.xml的配置错误造成的

<context-param>

<param-name>contextConfigLocation</param-name>

<param-value>classpath*:applicationContext-server.xml</param-value>

</context-param>

我是因为param-value 写错了 造成找不到配置文件。

希望能对你有所帮助!
参考技术A 我也遇到了同样的问题,经过后台报错No bean named 'cxf' is defined。 仔细检查页面会发现页面上javax.servlet.ServletException: Servlet.init() for servlet CXFService threw…… 而这个是因为web.xml的配置错误造成的
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext-server.xml</param-value>
</context-param>

我是因为param-value 写错了 造成找不到配置文件。

希望能对你有所帮助!
参考资料: http://blog.csdn.net/projava/article/details/4794540本回答被提问者和网友采纳

No bean named 'transactionManager' is defined

 

2016-10-20 23:27:17.771 INFO 7096 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2016-10-20 23:27:17.772 INFO 7096 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
2016-10-20 23:27:17.823 INFO 7096 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]

 

 

2016-10-20 23:23:17.290 ERROR 2804 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘transactionManager‘ is defined: No matching PlatformTransactionManager bean found for qualifier ‘transactionManager‘ - neither qualifier match nor bean name match!] with root cause

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘transactionManager‘ is defined: No matching PlatformTransactionManager bean found for qualifier ‘transactionManager‘ - neither qualifier match nor bean name match!
at org.springframework.beans.factory.annotation.BeanFactoryAnnotationUtils.qualifiedBeanOfType(BeanFactoryAnnotationUtils.java:100)
at org.springframework.beans.factory.annotation.BeanFactoryAnnotationUtils.qualifiedBeanOfType(BeanFactoryAnnotationUtils.java:56)
at org.springframework.transaction.interceptor.TransactionAspectSupport.determineQualifiedTransactionManager(TransactionAspectSupport.java:378)
at org.springframework.transaction.interceptor.TransactionAspectSupport.determineTransactionManager(TransactionAspectSupport.java:362)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:271)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy64.save(Unknown Source)

 

以上是关于No bean named cxf'is defined怎么解决的主要内容,如果未能解决你的问题,请参考以下文章

No bean named 'transactionManager' is defined

No bean named 'sqlSessionFactory' is defined

No bean named 'springSecurityFilterChain' is defined

关于启动tomcat 找不到 No bean named '*****' is defined

服务器启动时 No bean named 'sessionFactory' is defined

ssh2整合: No bean named 'sessionFactory' is defined(求大神指点)