问题描述
15:50:37[opennode10176008]ERROR-Nobeannamed'context'isdefinedorg.springframework.beans.factory.NoSuchBeanDefinitionException:Nobeannamed'context'isdefinedatnc.ui.uif2.factory.JavaBeanFactory.getBean(JavaBeanFactory.java:69)atnc.ui.uif2.factory.UIF2BeanFactory.getBean(UIF2BeanFactory.java:180)atnc.ui.uif2.ToftPanelAdaptor.initContext(ToftPanelAdaptor.java:454)atnc.ui.uif2.ToftPanelAdaptor.initUI(ToftPanelAdaptor.java:156)atnc.ui.uif2.ToftPanelAdaptor.init(ToftPanelAdaptor.java:143)atnc.funcnode.ui.AbstractFunclet.init(AbstractFunclet.java:38)atnc.funcnode.ui.FuncletWidgetFactory.createFuncletWidget(FuncletWidgetFactory.java:32)atnc.funcnode.ui.FuncletWidgetContainer.initUI(FuncletWidgetContainer.java:173)atnc.funcnode.ui.FuncletWidgetContainerFactory.createFuncletWidgetContainer(FuncletWidgetContainerFactory.java:24)atnc.funcnode.ui.FuncletWindowEngine.createFuncletWidgetContainer(FuncletWindowEngine.java:373)atnc.funcnode.ui.FuncletWindowEngine.openNodeImple(FuncletWindowEngine.java:183)atnc.funcnode.ui.FuncletWindowEngine.access$100(FuncletWindowEngine.java:45)atnc.funcnode.ui.FuncletWindowEngine$1.run(FuncletWindowEngine.java:119)atjava.lang.Thread.run(UnknownSource)15:50:37[opennode10176008]ERROR-Nobeannamed'context'isdefinedorg.springframework.beans.factory.NoSuchBeanDefinitionException:Nobeannamed'context'isdefinedatnc.ui.uif2.factory.JavaBeanFactory.getBean(JavaBeanFactory.java:69)atnc.ui.uif2.factory.UIF2BeanFactory.getBean(UIF2BeanFactory.java:180)atnc.ui.uif2.ToftPanelAdaptor.initContext(ToftPanelAdaptor.java:454)atnc.ui.uif2.ToftPanelAdaptor.initUI(ToftPanelAdaptor.java:156)atnc.ui.uif2.ToftPanelAdaptor.init(ToftPanelAdaptor.java:143)atnc.funcnode.ui.AbstractFunclet.init(AbstractFunclet.java:38)atnc.funcnode.ui.FuncletWidgetFactory.createFuncletWidget(FuncletWidgetFactory.java:32)atnc.funcnode.ui.FuncletWidgetContainer.initUI(FuncletWidgetContainer.java:173)atnc.funcnode.ui.FuncletWidgetContainerFactory.createFuncletWidgetContainer(FuncletWidgetContainerFactory.java:24)atnc.funcnode.ui.FuncletWindowEngine.createFuncletWidgetContainer(FuncletWindowEngine.java:373)atnc.funcnode.ui.FuncletWindowEngine.openNodeImple(FuncletWindowEngine.java:183)atnc.funcnode.ui.FuncletWindowEngine.access$100(FuncletWindowEngine.java:45)atnc.funcnode.ui.FuncletWindowEngine$1.run(FuncletWindowEngine.java:119)atjava.lang.Thread.run(UnknownSource)
解决方案
解决方案二:
没有找到以“context”命名的bean,估计是路径搞错了吧
解决方案三:
亲,你是不是配置里面配置了一个bean叫context...这个东东有问题!
解决方案四:
我也出过这种问题是因为把注释写错了结果就创建不了javabean
解决方案五:
在定义一个context实体即OK的。。。
解决方案六:
没有找到context这个BEAN啊是不是你注入有问题啊??或者你直接用注解也行啊
解决方案七:
出现这种错误一般是注入的bean没有定义,spring现在注入有2种方式:1、配置方式注入的bean如:<refbean="context"/>
2、注解方式注入的bean如:@Autowired@Qualifier("context")privateIContextcontext=null;
上面上种方式如果context没有定义,则会报楼主帖的错误。
解决方案八:
说得很清楚嘛,Nobeannamed'context'isdefined。
解决方案九:
实体类bean中缺少context