No bean named 'cxf' is defined

Posted

tags:

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

我用cxf+spring创建webservice后,调用webservice时出现上面的错误什么原因啊?求大神指导

No bean named 'cxf' is defined

译为:变量名为 cx的f变量未定义。

例句:

1.Please listen while I define your duties.

在我规定你的职责时,请仔细听好.


2.Please define the words.

请准确地解释这些字的意义.


3.It's hard to define exactly what has changed.

很难解释清楚到底发生了什么变化

参考技术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

参考技术B 仔细检查页面会发现页面上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 写错了 造成找不到配置文件。

希望能对你有所帮助!
参考技术C 仔细检查页面会发现页面上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>
参考技术D 请问楼主你的问题解决了吗,小弟也遇到同样的问题,求解中啊追问

没有啊 我就没弄了。。。

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 'cxf' is defined的主要内容,如果未能解决你的问题,请参考以下文章

关于BeanCreationNotAllowedException: Error creating bean with name 'cxf' 的解决心得

Error creating bean with name 'org.apache.cxf.spring.boot.autoconfigure.CxfAutoConfiguration

Error creating bean with name 'org.apache.cxf.spring.boot.autoconfigure.CxfAutoConfiguration(示例代

cxf异常but no declaration can be found for element 'jaxrs:client'.

No bean named 'sqlSessionFactory' is defined

No bean named 'transactionManager' is defined