SpringMVC集成Shiro时启动报错 No bean named 'shiroFilter' is defined [问题点数:50分,无满意结帖,结帖人liuzhen12580]

Bbs1
本版专家分:0
结帖率 50%
Bbs1
本版专家分:20
Bbs1
本版专家分:0
Bbs1
本版专家分:20
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs1
本版专家分:0
No bean named 'companyService' is defined
昨天都可以成功运行项目,然后把项目备份了一份,今天修改项目遇到点问题,拿出备份的出来测试,居然也报错了,companyService大小写检查了,路径也检查了,也存在,但是就是报错,谁能帮我瞧瞧到底什么错哦
No bean named 'filterChainProxy' is defined
遇见个问题,搜了快一天都没解决~~rn启动tomcat报这个错, org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'filterChainProxy' is <em>defined</em>rnrnrn我的配置文件rnrnrnrn rn contextConfigLocationrn classpath*:/applicationContext*.xmlrn rnrn rn rn encodingFilterrn org.springframework.web.filter.CharacterEncodingFilterrn rn encodingrn UTF-8rn rn rn forceEncodingrn truern rn rn rn rn rn rn hibernateOpenSessionInViewFilterrn com.choiland.framework.orm.hibernate.OpenSessionInViewFilterrn rn excludeSuffixsrn js,css,jpg,gifrn rn rnrn rn rn springSecurityFilterChainrn org.springframework.web.filter.DelegatingFilterProxyrn rnrn rn rn struts2Filterrn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rn rn filterChainProxyrn org.springframework.web.filter.DelegatingFilterProxyrn rnrn rn encodingFilterrn /*rn rn rn hibernateOpenSessionInViewFilterrn /*rn rnrn rn springSecurityFilterChainrn /*rn rnrn rn struts2Filterrn *.actionrn rn rn struts2Filterrn /rn rn rn filterChainProxyrn /*rn rnrn rn rn org.springframework.web.context.ContextLoaderListenerrn rnrn rn rn org.springframework.web.util.IntrospectorCleanupListenerrn rn rn rn rn org.springframework.security.ui.session.HttpSessionEventPublisherrn rnrn rn rn 120rn rn rn /index.actionrn rnrn rnrnrn求大神帮解决,百度上的结果基本上看完了吧。。。都不行~~
No bean named 'helloWorld' is defined
[img=https://img-bbs.csdn.net/upload/201612/12/1481476774_910020.png][/img]rnrn[img=https://img-bbs.csdn.net/upload/201612/12/1481476809_804946.png][/img]rnrn就是一个简单的例子,但就是报错。rn是配置文件有问题还是哪里错了?rn望告知
常见异常
一、Struts2 1.1 NoSuchBeanDefinitionException     异常描述: 没有such<em>bean</em>定义异常:没有匹配的PlatformTransactionManager  Bean 异常信息:     org.springframework.<em>bean</em>
项目“No bean named 'shiroFilter' is defined”错误处理
一个项目在本地运行一直报“No <em>bean</em> <em>named</em> ‘<em>shiro</em>Filter’ is <em>defined</em>”,但从Gitlab上面拉下来的代码却能正常动行, 为了找到原因,下载了Beyond Compare进行文件对比,最后发现.settings隐藏目录下的org.eclipse.wst.common.component文件存在差异。错误信息严重: Exception starting filter
错误的创建shiroFilter这个bean
案例引入 <em>shiro</em>权限控制,用户授权管理功能的实现 一:bug截图 二:案例代码 三:原因分析 1:在安全管理器用配置了ref的引用类, 2:但是在RosrRealm类中缺少@service这个类的注解 四:解决方案 配置@service注解,指定值与ref的属性值一致
No bean named ''XXX“ available
别的原因网络上很多,记录下自己粗心的错 接口包: com.tao51d.order.service 实现类: com.tao51d.service.impl 由于实现类不在接口包的里面,所以会找不到这个<em>bean</em>...
No bean named '/user' is defined
我在web.xml中配置了这些rn[code=xml]rn rn contextConfigLocationrn /WEB-INF/application*.xml,classpath*:application*.xmlrn rn rn org.springframework.web.context.ContextLoaderListenerrn [/code]rnrnStruts-config.xml中rn[code=xml]rn rn rn rn [/code]rnrnapplicationContext.xml中这样配置rn[code=xml]rn rn rn rn rn rn rn rn rn rn rn rn [/code]rnrn我想是没有遗漏的地方了, 问题出在哪里了呢?
No bean named 'sessionFactory' is defined
2015/08/10 04:50:37.801 [DEBUG] org.springframework.web.context.support.XmlWebApplicationContext[initMessageSource]- Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@6f4cc38]rn2015/08/10 04:50:37.810 [DEBUG] org.springframework.web.context.support.XmlWebApplicationContext[initApplicationEventMulticaster]- Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@6a5b669c]rn2015/08/10 04:50:38.053 [ERROR] org.springframework.web.context.ContextLoader[initWebApplicationContext]- Context initialization failedrn[color=#FF0000]org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'commonDao': Injection of resource dependencies failed; nested exception is org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>[/color]rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)rn at org.springframework.<em>bean</em>s.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1503)rn at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1479)rn at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1665)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:328)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)rn at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:527)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1083)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:435)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:409)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:541)rn at org.springframework.<em>bean</em>s.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:156)rn at org.springframework.<em>bean</em>s.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:297)rn ... 27 morern八月 10, 2015 4:50:38 下午 org.apache.catalina.core.StandardContext listenerStartrn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'commonDao': Injection of resource dependencies failed; nested exception is org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:300)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)rn at org.springframework.<em>bean</em>s.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1503)rn at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1479)rn at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1665)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:328)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)rn at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1546)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1556)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1524)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:527)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1083)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:435)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:409)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:541)rn at org.springframework.<em>bean</em>s.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:156)rn at org.springframework.<em>bean</em>s.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:297)rn ... 27 morern八月 10, 2015 4:50:38 下午 org.apache.catalina.core.StandardContext startInternalrn严重: Error listenerStartrn八月 10, 2015 4:50:38 下午 org.apache.catalina.core.StandardContext startInternalrn严重: Context [/finance] startup failed due to previous errorsrn八月 10, 2015 4:50:38 下午 org.apache.catalina.core.ApplicationContext logrn信息: Closing Spring root WebApplicationContextrn
No bean named 'SQService' is defined
这个问题如何解决No <em>bean</em> <em>named</em> 'SQService' is <em>defined</em>???
No bean named 'dataSource' is defined
大神看看怎么回事rn这是异常:[img=https://img-bbs.csdn.net/upload/201609/07/1473243878_75936.png][/img]rnrnapplicationContext-security.xml配置文件引用数据源rn[img=https://img-bbs.csdn.net/upload/201609/07/1473243871_777095.png][/img]rnrn配置数据源rn[img=https://img-bbs.csdn.net/upload/201609/07/1473243884_58893.png][/img]
javax.servlet.ServletException: No bean named '/test' is defined
我领导给我的一个SPRING MVC 模板一直报错 有人可以帮我看下那里有错误吗 +我QQ 1582770447 我把项目包给你 求救rn[img=https://img-bbs.csdn.net/upload/201507/25/1437826020_877686.jpg][/img][img=https://img-bbs.csdn.net/upload/201507/25/1437826025_947133.jpg][/img]rnrn就一些配置文件加上3个测试网页 不过一直找不到/test类
ssm下使用监听器,注入service,一直报错:No bean named xxx available
ssm下使用监听器: 已经在Service上注明了@Service("articeService") 一直这个错,找不到可用的articleService ,能想到的办法都是了,还是报这个错,各位老哥
Spring:错误No bean named 'xxxxxxx' available
首先说一些和这个无关的事情,在实习的过程中,我发现别人写的代码方法名总喜欢用一样的,访问数据库的方法和控制器的方法名字都一样;配置文件中的命名和方法体中的成员也是一样的名字。我不喜欢,我觉得出了错误不好发觉,别人看的时候也容易看不懂。对于我这种粗心的人很有必要。贴出我的配置文件&amp;lt;<em>bean</em> id=&quot;action&quot; class=&quot;entity.User_Action&quot;&amp;gt; &amp;lt;pro...
No bean named 'springSecurityFilterChain' is defined
今天配置Spring Security的时候遇到了这样的问题 No <em>bean</em> <em>named</em> 'springSecurityFilterChain' is <em>defined</em>在我的web.xml中关于springSecurityFilterChain的配置如下 springSecurityFilterChain org.springframework.web.filter.Delegatin
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'shiroFilter' availab
这个错误是比较偶然发生的,原因是我在重新编译项目时,就去启动tomcat,导致项目编译失败。
关于shiro+springMVC整合使用的问题
最近做新系统的时候,关于权限刚开始考虑用spring security,研究了两天发现好复杂,就换了<em>shiro</em>,又折腾了几天,总算调试通过了,但是这过程也到处是坑,这里做个记录,如果有同样需求的,以防再掉进去。 从网上搜<em>shiro</em>教程的时候,大部分都是基于配置文件或者是角色进行管理的,但是我们平时做web系统根本不会这么用的,我们都是基于权限permissions的管理方式,这里推荐一个比价
SSH——No bean named 'AssistantService' is defined。。
[b]报错[/b]:rnorg.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'LoginAction' <em>defined</em> in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Cannot resolve reference to <em>bean</em> 'AssistantService' while setting <em>bean</em> property 'AssistantService'; nested exception is org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'AssistantService' is <em>defined</em>rnrn[b]代码如下[/b]:rn[color=#FF0000]applicationContext.xml:[/color]rnrn rn rn rn rn rn rn rn rn rn rn rn rnrnrn[color=#FF0000]AssistantDaoImpl.java:[/color]rnpublic class AssistantDaoImpl implements AssistantDao rn @Resourcern private SessionFactory sessionFactory;rn private static AssistantDaoImpl assistantDaoImpl = new AssistantDaoImpl();rnrn public static AssistantDaoImpl getInstance() rn // TODO Auto-generated method stubrn return assistantDaoImpl;rn rn rn public void setSessionFactory(SessionFactory sessionFactory)rn this.sessionFactory=sessionFactory;rn rn public SessionFactory getSessionFactory()rn return sessionFactory;rn rnrnrnrnrn[color=#FF0000]AssistantServiceImpl.java:[/color]rn@Service rnpublic class AssistantServiceImpl implements AssistantServicern private AssistantDao assistantDao;rn public AssistantDao getAssistantDao() rn return assistantDao;rn rn public void setAssistantDao(AssistantDao assistantDao) rn this.assistantDao = assistantDao;rn rnrnrnrnrn[color=#FF0000]LoginAction.java:[/color]rn@Repositoryrnpublic class LoginAction extends BaseAction rn private static final long serialVersionUID = 1L;rnrn @Autowiredrn private StudentService studentService; // 使用Spring注解注入业务方法rn @Autowiredrn private TeacherService teacherService; // 使用Spring注解注入业务方法rn @Autowiredrn private PersonInChargeService personinchargeService; // 使用Spring注解注入业务方法rnrn private AssistantService assistantService; // 使用Spring注解注入业务方法rn public AssistantService getAssistantService() rn return assistantService;rn rn public void setAssistantService(AssistantService assistantService) rn this.assistantService = assistantService;rn rnrnrnrn
weblogic:No bean named 'sessionFactory' is defined
将tomcat,mysql的项目改到weblogic,oracle上rnrn访问登录页面,输入用户名密码就出这个错误rnrnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)rn at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884)rn at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:243)rn at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:227)rn at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)rn at com.personnel.filter.FilterServlet.doFilter(FilterServlet.java:28)rn at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)rn at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)rn at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)rn at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)rn at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)rn at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)rn at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)rn at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)rn at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)rn at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)rnrnrnrnrnrn我的web.xmlrnrnrnrnrnrnrnrn rn rncontextConfigLocation rn classpath:applicationContext-*.xml rnrn rn rn org.springframework.web.context.ContextLoaderListener rn rn rnrn rn rn rn encodingFilterrn org.springframework.web.filter.CharacterEncodingFilterrn rn encodingrn gbkrn rn rn rn pathfilterrn com.personnel.filter.FilterServletrn rn rn pathfilterrn /*rn rn rn rn rn struts2rn org.apache.struts2.dispatcher.FilterDispatcherrn rn rn rn hibernateFilterrn org.springframework.orm.hibernate3.support.OpenSessionInViewFilterrn rn rn hibernateFilterrn *.actionrn rn rn encodingFilterrn *.actionrn rn rn encodingFilterrn *.jsprn rn rn struts2rn *.actionrn rn rn rn rn ConnectorServletrn rn net.fckeditor.connector.ConnectorServletrn rn 1rn rnrn rn ConnectorServletrn /fckeditor/editor/filemanager/connectors/*rn rnrn rnrn login.jsprnrnrnrnrnrn我的applicationContext-common.xmlrnrnrnrnrnrn rn rn rn classpath:hibernate.propertiesrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrn rn rnrn rn rn truern updatern rn org.hibernate.dialect.OracleDialectrn rn rn rn rn rn com/personnel/model/Message.hbm.xmlrn com/personnel/model/Organization.hbm.xmlrn com/personnel/model/User.hbm.xmlrn rn rn rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn mgr rn rn rn rn rn rn rn rn transactionInterceptor rn rn rn rn rn rn
求救:No bean named '/companyAdmin' is defined
输入http://localhost/companyAdmin.do时,程序报如下错:rnrnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> '/companyAdmin' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:355)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:800)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:237)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)rn at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:646)rn at org.springframework.web.struts.DelegatingActionProxy.getDelegateAction(DelegatingActionProxy.java:122)rn at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:105)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)rn at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at com.lianzhuang.utils.PagerFilter.doFilter(PagerFilter.java:28)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:78)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)rn at java.lang.Thread.run(Thread.java:619)
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is defined
spring.xml文件:rnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn org.hibernate.dialect.MySQLDialectrn rn updatern nonern rn org.hibernate.cache.EhCacheProviderrn rn truern rn rn rn rn com/userinfo/model/User.hbm.xmlrn rn rn rn rn rn com.userinfo.model.userrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnstruts.xml文件:rnrnrnrnrnrn rn rn rn rnrn rn rn rn rn rn /success.jsprn rn rnrnrn
No bean named 'sessionFactory' is defined错误
![![图片说明](https://img-ask.csdn.net/upload/201511/26/1448525316_855204.png)图片说明](https://img-ask.csdn.net/upload/201511/26/1448525310_528807.png)rnrn![图片说明](https://img-ask.csdn.net/upload/201511/26/1448527077_765464.png)rn运行时 报No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>错误rn我用的是Eclipse 然后是Spring MVC + Hibernate + Maven编写的0.0
关于maven项目tomcat启动异常org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 解决
错误代码情况: 严重: Exception starting filter <em>shiro</em>Filter org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> '<em>shiro</em>Filter' is <em>defined</em> at org.springframework.<em>bean</em>s.factory.support
SuchBeanDefinitionException: No bean named 'shiroFilter' is defined
异常的意思是说<em>shiro</em>Filter没有定义,可能的一个原因是配置文件没有被编译,看看Tomcat下相应的位置是否有配置文件,如果木有,重新编译整个项目,重新部署到Tomcat。
报错No bean named ' is defined的原因和解决方案
项目为dubbo+<em>springmvc</em>+spring+mybatis贴上项目目录 如下:baidu-dubbo为父项目;其他的都是子项目;其中core项目 和  ifc 项目为jar包  core项目是项目自己的一些接口     ifc是暴露出来的公共接口service项目和web项目是war包;   service是业务处理层  web是主要是负责页面跳转逻辑的core项目中引入了ifc项目  s...
SpringMvc整合shiro报错(一)
在使用SpringMvc整合<em>shiro</em>框架时,新建好的项目上传到svn上之后,重新下载之后的项目启动时报以下错误: 严重: Exception starting filter <em>shiro</em>SecurityFilter org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> '<em>shiro</em>Secur
SSH集成中org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '/add' is defined出错
---------ApplicationContext-common.xml-------------rnrnrn rn rn rn rn rn rn rnrn rn classpath:hibernate.cfg.xmlrn rn rnrnrn-----------------ApplicationContext-action.xml-------------------------------------------------------------rnrnrnrnrn rnrnrnrn-----------------ApplicationContext-<em>bean</em>.xml-------------------------------------------------rnrnrn rn rn rn rn rn rn rn rnrn----------------jsp----------------rnrnrnrnrnrn rn rn SSH<em>集成</em>rn rn rn rn rn rn rn rn rn rn rn rn rn 用户名rn rn rn rn 年龄rn rn rn rn rn rn rn rn rn rnrn
dwr与ssh集成出现的问题:No bean named '__dwrConfiguration' is defined
严重: Allocate exception for servlet dwrrnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> '__dwrConfiguration' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)rn at org.directwebremoting.spring.DwrSpringServlet.init(DwrSpringServlet.java:104)rn at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1189)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1103)rn at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:813)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at java.lang.Thread.run(Thread.java:662)rnrn开始配置可以成功运行,可是后面再尝试就出先这个问题!rn一开始以为是ssh与dwr annotation配置有问题,可是后面换成spring与dwr<em>集成</em>还是出现这个问题!rn请高手帮忙解答!
spring 集成shiro 之 自定义过滤器shiroFilter
转:http://blog.csdn.net/shuishouhcd/article/details/9077379   最近一段时间,我一直在将<em>shiro</em><em>集成</em>到我的一个项目中,用作认证和授权处理。               <em>shiro</em>对我来说是个新东西,以下是我学习过的内容:               http://<em>shiro</em>.apache.org/authorization....
openSessionInViewFilter报No bean named 'sessionFactory' is defined错误
我是使用注解配置spring的。配置sessionfactory的代码如下rn[code=java]/**rn * 数据源<em>bean</em>rn */rn @Beanrn public DataSource getDataSource() rn BasicDataSource basicDataSource = new BasicDataSource();rn basicDataSource.setDriverClassName(driverName);rn basicDataSource.setUsername(username);rn basicDataSource.setPassword(pwd);rn basicDataSource.setUrl(databaseUrl);rn basicDataSource.setInitialSize(init_size);rn basicDataSource.setMaxActive(maxActive);rn basicDataSource.setMaxIdle(maxIdle);rn basicDataSource.setMaxWait(maxWait);rn return basicDataSource;rn rn rn @Bean(name="sessionFactory")rn public LocalSessionFactoryBean getSessionFactory(DataSource ds)rn LocalSessionFactoryBean lsfb = new LocalSessionFactoryBean();rn lsfb.setDataSource(ds);rn lsfb.setPackagesToScan("mysql.model");rn Properties hibernateProperties = pl.getProperties();rn lsfb.setHibernateProperties(hibernateProperties);rn return lsfb;rn rn rn @Autowiredrn @Bean(name="transactionManager")rn public HibernateTransactionManager getHibernateTransactionManager(SessionFactory sessionFactory)rn HibernateTransactionManager htm = new HibernateTransactionManager(sessionFactory);rn return htm;rn [/code]rn我命名的LocalSessionFactoryBean 的名称为sessionFactoryrn但是我在web.xml配置的openSessionInViewFilter总是报错,web.xml配置如下rn[code=text]rnrnrn Archetype Created Web Applicationrn rn rn openSessionInViewFilterrn rn org.springframework.orm.hibernate5.support.OpenSessionInViewFilterrn rn rn sessionFactoryBeanNamern sessionFactoryrn rn rn singleSessionrn truern rn rn rn openSessionInViewFilterrn /*rn rn rn[/code]rn我手动输出了一下spring的<em>bean</em>列表,发现有sessionFactory的<em>bean</em>,为什么openSessionInViewFilter就是提示找不到呢?求大牛解答
spring mvc 注解:No bean named 'userBiz' is defined
之前发过一个帖子,但是因为我不知道论坛不能连续回复3次也不能删评论,弄的我不能发言了。rn报的错是rn严重: StandardWrapper.Throwablernorg.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'userController': Autowiring of fields failed; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Could not autowire field: private com.user.biz.UserBiz com.user.controller.UserController.userBiz; nested exception is org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No unique <em>bean</em> of type [com.user.biz.UserBiz] is <em>defined</em>: Unsatisfied dependency of type [interface com.user.biz.UserBiz]: expected at least 1 matching <em>bean</em>rn at org.springframework.<em>bean</em>s.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:243)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.<em>bean</em>s.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)rn at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)rn at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)rn at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)rn at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)rn at javax.servlet.GenericServlet.init(GenericServlet.java:158)rn at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5229)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5516)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)rn at java.util.concurrent.FutureTask.run(FutureTask.java:262)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: org.springframework.<em>bean</em>s.factory.BeanCreationException: Could not autowire field: private com.user.biz.UserBiz com.user.controller.UserController.userBiz; nested exception is org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No unique <em>bean</em> of type [com.user.biz.UserBiz] is <em>defined</em>: Unsatisfied dependency of type [interface com.user.biz.UserBiz]: expected at least 1 matching <em>bean</em>rn at org.springframework.<em>bean</em>s.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:435)rn at org.springframework.<em>bean</em>s.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105)rn at org.springframework.<em>bean</em>s.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:240)rn ... 30 morernCaused by: org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No unique <em>bean</em> of type [com.user.biz.UserBiz] is <em>defined</em>: Unsatisfied dependency of type [interface com.user.biz.UserBiz]: expected at least 1 matching <em>bean</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:613)rn at org.springframework.<em>bean</em>s.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:412)rn ... 32 morernrn八月 28, 2014 2:02:43 下午 org.apache.catalina.core.StandardContext loadOnStartuprn严重: Servlet /web threw load() exceptionrnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No unique <em>bean</em> of type [com.user.biz.UserBiz] is <em>defined</em>: Unsatisfied dependency of type [interface com.user.biz.UserBiz]: expected at least 1 matching <em>bean</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:613)rn at org.springframework.<em>bean</em>s.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:412)rn at org.springframework.<em>bean</em>s.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105)rn at org.springframework.<em>bean</em>s.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:240)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.<em>bean</em>s.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)rn at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)rn at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)rn at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)rn at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)rn at javax.servlet.GenericServlet.init(GenericServlet.java:158)rn at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5229)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5516)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)rn at java.util.concurrent.FutureTask.run(FutureTask.java:262)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnrnrn下面是配置文件rn<em>springmvc</em>-servlet.xmlrnrnrn rn rn rn rn rnrn rn rnrn rn rnrn
关于NoSuchBeanDefinitionException: No bean named 'xxxx' is defined问题解决
问题如下 NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'userDao' is <em>defined</em> 查阅了网上关于IoC的资料后,明白了一些这方面的知识。这里单刀直入的给出解决方法。 楼主是在UserController中使用了如下代码 @Resource(name = "userDao") private UserDao us
No bean named 'SqlSessionFactoryBean' available
    在SSM的配置文件applicationContext.xml中需要配置SqlSessionFactoryBean,&amp;lt;<em>bean</em> id=&quot;sqlSessionFactoryBean&quot; class=&quot;org.mybatis.spring.SqlSessionFactoryBean&quot; p:configLocation=&quot;classpath:mybatis-config....
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'XXXX' is defined
这个错误是在配置的<em>springmvc</em>的配置文件时经常可能会出现的问题! 其主要原因是 1 看 报错信息中的<em>bean</em>  是否已经注入,或者得到的<em>bean</em>名字错误. 2 看spring的配置文件    是否扫描了正确的需要扫描的包 检查更正后,clean一下,再重新编译运行!
spring与mybatis中注入了却总提示no bean named
在spring与mybatis整合过程中,碰到一个很难理解的问题。 dao通过 @Autowired注册时,没问题,到如果用@Resource注册时,指令@Resource 的name时,name对应的DAO名称的前两位,要么都大写,在么都小写,否则报 No <em>bean</em> <em>named</em>  xxdao is <em>defined</em>。
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'board' available
今天学习了Spring框架的入门,然后做练习遇到很多小bug,记录一下 1.cvc-complex-type.2.4.d: Invalid content was found starting with element '<em>bean</em>'. No child element is expected at this point.标签中没有定义该子标签 2.Bean Definition Parsi...
No bean named 'userService' is defined 问题解决 maven ssh
代码:rnpackage sy.test;rnrnimport org.junit.Test;rnimport org.springframework.context.ApplicationContext;rnimport org.springframework.context.support.ClassPathXmlApplicationContext;rnrnimport sy.service.UserServiceI;rnrnpublic class TestSpring rnrnrn @Testrn public void test() rn ApplicationContext ac = new ClassPathXmlApplicationContext(new String[] "classpath:spring.xml" );rn UserServiceI userService = (UserServiceI) ac.getBean("[color=#FF0000]u[/color]serService");rn userService.test();rn rnrnrnrnrn修改:rnrn UserServiceI userService = (UserServiceI) ac.getBean("[color=#FF0000]U[/color]serService");rn userService.test();rn数据库中定义了的UserService和Java类中定义的不一致,特别是大小写的问题rnrnwebservice开发总结:rnrn1.命名空间的问题rnrn2.在实现类中添加注解rnrn3.数据库命名与java类的service注解的命名一致rnrn4.tomcat的部署和运行rnrn5.单元测试rn注意大小写:rn其他原因:rnrnrn报错rnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'userService' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:553)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)rn at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1098)rn at sy.test.TestSpring.test(TestSpring.java:15)rnrnrn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)rn at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)rn at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)rn at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)rn at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)rn at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)rn at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)rn at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)rn at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)rn at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)rn at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)rn at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)rn at org.junit.runners.ParentRunner.run(ParentRunner.java:300)rn at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)rn at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
框架整合的问题No bean named 'MySessionFactory' is defined
刚刚整合框架 出现错误,我的代码如下rn[b] index.jsp[/b]rnrn dfdqrn rn rn rn rn rn rnrnrn[b]web.xml[/b]rnrn index.jsprn rn rn rn log4jConfigLocationrn /WEB-INF/classes/log4j.propertiesrn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn rn contextConfigLocationrn classpath*:applicationContext.xmlrn rn rn rn struts2rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rnrn rn struts2rn /*rn rn rn rn rn setCharacterEncodingrn rn org.springframework.web.filter.CharacterEncodingFilterrn rn rn encodingrn UTF-8rn rn rn forceEncodingrn truern rn rnrn rn setCharacterEncodingrn /*rn rn rn rn rn HibernateOpenSession rn org.springframework.orm.hibernate3.support.OpenSessionInViewFilter rn rn sessionFactoryBeanName rn MySessionFactoryrn rn rnrn rn HibernateOpenSession rn /* rn rnrnrn[b][b][/b]struts.xml[/b]rnrnrn rn rn rn rn rnrn rn rn rn /success.jsprn /error.jsprn rn rnrnrnrnapplicationContext.xmlrn rn rn rn classpath:hibernate.cfg.xml rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rnrnrn[b] LoginAction类[/b]rnrn public class LoginAction extends ActionSupportrnrn private LoginServic loginService;rn private String username;rn private String password;rn public LoginServic getLoginService() rn return loginService;rn rnrnrn public void setLoginService(LoginServic loginService) rn this.loginService = loginService;rn rnrnrn public String getUsername() rn return username;rn rnrn public void setUsername(String username) rn this.username = username;rn rnrn public String getPassword() rn return password;rn rnrn public void setPassword(String password) rn this.password = password;rn rn rn public String execute() throws Exception rn System.out.println(username);rn System.out.println(password);rn if (loginService.isLogin(username, password)) rn return "success";rn rn return "error";rn rnrnrn[b]LoginServic 接口[/b]rnrnpublic interface LoginServic rn rn public boolean isLogin(String username,String password);rn rnrnrnLoginServiceImpl实现接口rnrnpublic class LoginServiceImpl implements LoginServic rnrnrn public boolean isLogin(String username, String password) rn rn if("admin".equals(username) && "admin".equals(password))rn System.out.println("我进入到spring");rn return true;rn rn return false;rnrn rnrnrnrn还有一个User类和一个hibernate的数据源配置文件,这个是测试数据库的,可是不能用。真是郁闷透顶啊rnrnrnrntype Exception reportrnrnmessagernrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexceptionrnrnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'MySessionFactory' is <em>defined</em>rn org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)rn org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)rn org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)rn org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)rn org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884)rn org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:243)rn org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:227)rn org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)rnrnrn这个是错误提示,有时候改下 web.xml以后,会出现LoginAction不能实例化rn[u]删掉这个[/u]rn rn HibernateOpenSession rn org.springframework.orm.hibernate3.support.OpenSessionInViewFilter rn rn sessionFactoryBeanName rn MySessionFactoryrn rn rnrnrn我强烈怀疑这错了。rnrn不知道怎么弄,我第一次搞整合。两两整合弄了,何在一起,在web,xml中写配置居然错误,真是难过啊rnrnrnrn
No bean named 'entityManagerFactory' is defined 异常怎么解决
我用spring 2.5+jpa+struts。我要用spring来管理jpa的entityManger便于管理延时加载。rn在没加spring管理延时加载的过滤器一切都正常使用,但是加上就报错rnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'entityManagerFactory' is <em>defined</em>rn org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)rn org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)rn org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)rn org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)rn org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884)rn org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.lookupEntityManagerFactory(OpenEntityManagerInViewFilter.java:151)rn org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.lookupEntityManagerFactory(OpenEntityManagerInViewFilter.java:134)rn org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:93)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rnrn我在web.xml这样配置rnrn contextConfigLocationrn classpath:spring.xmlrn rnrn rn org.springframework.web.context.ContextLoaderListenerrn rn rn Spring OpenEntityManagerInViewFilterrn org.springframework.orm.jpa.support.OpenEntityManagerInViewFilterrn rn rn Spring OpenEntityManagerInViewFilterrn /*rn rnrnspring.xml是这样rnrn rn rn rn rn rn rnrn rn rn rn
HttpInvoker,报错 No bean named 'openService' is defined!
在原有的对外接口中项目中添加了一个方法,想模拟测试的时候报找不到那个<em>bean</em>rn[img=https://img-bbs.csdn.net/upload/201805/25/1527238938_748607.jpg][/img]web.xml配置rn[img=https://img-bbs.csdn.net/upload/201805/25/1527238968_28165.jpg][/img]http-invoker.xml配置rn[img=https://img-bbs.csdn.net/upload/201805/25/1527239001_808273.jpg][/img]applicationContext.xml配置rn[img=https://img-bbs.csdn.net/upload/201805/25/1527239148_118896.jpg][/img]配置文件路径rn[img=https://img-bbs.csdn.net/upload/201805/25/1527239028_184529.jpg][/img]接口类rn[img=https://img-bbs.csdn.net/upload/201805/25/1527239045_223400.jpg][/img]实现类rn[img=https://img-bbs.csdn.net/upload/201805/25/1527239131_191429.jpg][/img]测试类
大虾帮帮忙 No bean named 'sessionFactory' is defined
No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>rn这是怎么回事啊 老是提示sessionFactory没有定义
在配置Shiro时,启动tomcat报错出现异常(org.springframework.beans.factory.BeanCreationException)
今天在配置完<em>shiro</em>后,启动服务器出现了一个问题(org.springframework.<em>bean</em>s.factory.BeanCreationException),我觉得可能我们都很容易就会碰到的一个问题。   org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating bea
关于SSM+shiro安全框架,No bean named 'shiroFilter' is defined 错误
先说出现错误的可能原因吧! 1:web.xml配置中的filter-name的<em>shiro</em>Filter 与spring-<em>shiro</em>.xml 中的 <em>bean</em>id命名的<em>shiro</em>Filter不一致。 2:保证在启动WEB容器的时候能加载到spring-<em>shiro</em>.xml 文件,检查文件路径是否正确,参考:classpath*:spring-<em>shiro</em>.xml。 3:很有可能是在web.xml中...
[NoSuchBeanDefinitionException] No bean named 'shiroFilter' is defined
spring <em>集成</em> <em>shiro</em>框架时,报出这个异常 这类异常NoSuchBeanDefinitionException,配置文件中<em>bean</em>加载异常。 严重: Exception starting filter <em>shiro</em>Filter org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'shi...
后台中 No bean named 'xxxx' is defined碰到的问题
我的程序中服务类的名字是ManageService ,Dao类的名字是ManageDao   在ManageService 中要定义 先定义全局变量private ManageDao ManageDao;  然后创建一个构造函数如下所示:   private ManageService(){ // TODO: 异常环境的日志记录、重试处理;交易记录缓存的周期性清理 ManageDao =
新手求助 No bean named 'cxf' is defined
严重: StandardWrapper.Throwablernorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'cxf' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:580)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1149)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:281)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)rn at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1151)rn at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:77)rn at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:71)rn at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)rn at java.util.concurrent.FutureTask.run(FutureTask.java:138)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at java.lang.Thread.run(Thread.java:619)rn2013-6-22 16:44:59 org.apache.catalina.core.StandardContext loadOnStartuprn严重: Servlet /project2 threw load() exceptionrnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'cxf' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:580)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1149)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:281)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)rn at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1151)rn at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:77)rn at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:71)rn at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)rn at java.util.concurrent.FutureTask.run(FutureTask.java:138)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at java.lang.Thread.run(Thread.java:619)
SSH整合:No bean named 'TestService' is defined
最近刚刚开始做SSH三大框架整合,搭建了好几天的开发环境,就卡在了Spring与Hibernaten整合上,n![图片说明](https://img-ask.csdn.net/upload/201505/17/1431793030_317551.png)nTestService.javanpackage com.zyf.test;nimport javax.annotation.Resource;nimport org.hibernate.Session;nimport org.hibernate.SessionFactory;nimport org.springframework.stereotype.Controller;nimport org.springframework.stereotype.Service;nimport org.springframework.transaction.annotation.Transactional;nimport cn.zyf.pj.domain.User;n@Servicenpublic class TestService n @Resourcen private SessionFactory sessionFactory;n @Transactionaln public void saveTwoUsers() n Session session = sessionFactory.getCurrentSession();n session.save(new User());n session.save(new User());n nnTestSpring.javanpackage com.zyf.test;nimport org.hibernate.SessionFactory;nimport org.junit.Test;nimport org.springframework.context.ApplicationContext;nimport org.springframework.context.support.ClassPathXmlApplicationContext;npublic class TestSpring n private ApplicationContext ac= new ClassPathXmlApplicationContext("applicationContext.xml");n //测试sessionFactoryn @Testn public void testSessionFactory() throws Exceptionn SessionFactory sessionFactory =(SessionFactory)ac.getBean("sessionFactory");n System.out.println(sessionFactory.openSession());n n //测试事物n @Testn public void testSaveUsers()n TestService ts=(TestService) ac.getBean("TestService");n ts.saveTwoUsers();n nnHibernate.cfg.xmlnnnn n n org.hibernate.dialect.MySQL5InnoDBDialectn n n truen updaten nnnnapplicationContext.xmlnnn n n n n n n n n n n n n n n n n n n n n n n n n n n nn n n n n n n n n nnnTestSpring.javanpackage com.zyf.test;nimport org.hibernate.SessionFactory;nimport org.junit.Test;nimport org.springframework.context.ApplicationContext;nimport org.springframework.context.support.ClassPathXmlApplicationContext;npublic class TestSpring n private ApplicationContext ac= new ClassPathXmlApplicationContext("applicationContext.xml");n //测试sessionFactoryn @Testn public void testSessionFactory() throws Exceptionn SessionFactory sessionFactory =(SessionFactory)ac.getBean("sessionFactory");n System.out.println(sessionFactory.openSession());n n //测试事物n @Testn public void testSaveUsers()n TestService ts=(TestService) ac.getBean("TestService");n ts.saveTwoUsers();n nnn对TestSpring进行单元测试,第一个方法正常执行,第二个方法报错No <em>bean</em> <em>named</em> 'TestService' is <em>defined</em>,并且在数据库中自动生成test_users表,困扰了好久了,麻烦大神指点一下!!!!
java-xcf异常 No bean named 'cxf' is defined
大家好,rn 在配置xcf的时候出下面问题,网上找了一般都说是版本问题,可换了好几个版本都出问题,请大侠帮忙下,谢谢!rn严重: StandardWrapper.Throwablernorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'cxf' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)rn at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)rn at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:75)rn at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:67)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)rn at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Unknown Source)rn2014-3-30 18:28:24 org.apache.catalina.core.StandardWrapperValve invokern严重: Allocate exception for servlet CXFServletrn[img=https://img-bbs.csdn.net/upload/201403/30/1396178550_345514.png][/img]
XFire No bean named 'xfire' is defined异常
web.xml中的配置:rnrnrn rn rn index.jsprn rn rn contextConfigLocationrn /WEB-INF/config/spring/applicationContext-<em>bean</em>s.xmlrn rn rn AppDispatcherrn org.springframework.web.servlet.DispatcherServletrn rn contextConfigLocationrn /WEB-INF/config/spring/applicationContext-base.xml,/WEB-INF/config/spring/applicationContext-ws.xmlrn rn 1rn rn rn AppDispatcherrn *.htmlrn rn rn rn XFireServletrn org.codehaus.xfire.spring.XFireSpringServletrn rn rn XFireServletrn /services/*rn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rnrnrnapplicationContext-ws.xml中内容:rn rn rn rnrn rn rn rn rn rn rnrn rnrn接口:rnimport javax.jws.WebMethod;rnimport javax.jws.WebService;rnrn@WebServicernpublic interface IHelloService rn rn @WebMethodrn String sayHello(String name);rnrnrnrn实现类:rnimport javax.jws.WebService;rnrnimport org.springframework.stereotype.Component;rnrn@Componentrn@WebService(serviceName = "HelloServiceImpl", endpointInterface = "com.oceansoft.IHelloService")rn// 配置服务名和接口rnpublic class HelloServiceImpl implements IHelloService rnrn @Overridern public String sayHello(String name) rn // TODO Auto-generated method stubrn return name + ",你好";rn rnrnrnrnJar包如下:rn[img=https://img-bbs.csdn.net/upload/201405/20/1400549337_851127.jpg][/img]rn[img=https://img-bbs.csdn.net/upload/201405/20/1400549371_924511.jpg][/img]rnrn一直报No <em>bean</em> <em>named</em> 'xfire' is <em>defined</em>,求大神帮解决。[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/83.gif][/img]rn
No bean named '' is defined
不知道大家有没有这样的经历,在Git或者SVN上更新了一下代码,好好的工程就跑不起来了,控制台报错信息 No <em>bean</em> <em>named</em> ” is <em>defined</em> 仔细检查代码,没有什么错误,考虑一下是否是编译的问题,导致读不到配置文件,去项目目录下看看 然后看看项目中目录下是不是有很多配置文件没有编译出来, 确认应该是编译的问题,不断的clean-build还是没有用~~~ 最后用一...
No bean named 'userDao' is defined
org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'memberAction' <em>defined</em> in file [D:\workspace\sns_party\WebRoot\WEB-INF\classes\cn\com\mongo\member\config\app-mem...
No bean named 'xxxService' is defined 的几种原因和解决方案(详细介绍)
问题描述:No <em>bean</em> <em>named</em> ‘xxxService’ is <em>defined</em> 问题本质:一般这种情况下都是因为你发布的包存在xml文件的丢失,这样的话会导致很多方法类加载不起来。 Pom介绍:所以这个时候你应该看看自己的pom.xml文件,包含了关于工程和各种配置细节的信息,当执行一个任务或者目标时,Maven 会查找当前目录下的 POM,从其中读取所需要的配置信息,然后执行目标。 ...
spring,hibernate,jpa No bean named 'sessionFactory' is defined
各位帮我看看是不是我配置文件写错了,应该怎么写?还有用了JPA之后SPRING的注解,是不是还跟原来一样的用,没有任何的影响?rnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>rnrnweb.xmlrnlistener>rn org.springframework.web.context.ContextLoaderListenerrn rn rn rn encodingrn org.springframework.web.filter.CharacterEncodingFilterrn rn encodingrn UTF-8rn rn rn forceEncodingrn truern rn rn rn encodingrn /*rn rn rn rn rn OpenSessionInViewFilterrn org.springframework.orm.hibernate3.support.OpenSessionInViewFilterrn rn rn OpenSessionInViewFilterrn /*rn rnrn<em>bean</em>s.xmlrnrnrnrnrnrnrnrnrn
springmvc集成shiro
<em>springmvc</em><em>集成</em><em>shiro</em>安全框架,实现用户身份认证、权限管理
Shiro系列教程ShiroFilter源码分析
Shiro系列教程ShiroFilter源码分析 DefaultFilter //一个枚举类定义了<em>shiro</em>全部的默认拦截器 public enum DefaultFilter { anon(AnonymousFilter.class), authc(FormAuthenticationFilter.class), authcBasic(BasicHttp
Error creating bean with name 'shiroFilter' defined in class path resource [com/
我在启动时报错。求大虾解救,,报错信息如下rnrn[ERROR] 2014-10-16 11:57:46 [ERROR] - org.springframework.web.context.ContextLoader -ContextLoader.java(319) -Context initialization failedrn org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name '<em>shiro</em>Filter' <em>defined</em> in class path resource [com/pactera/platform/reqm/resources/spring-security.xml]: Cannot resolve reference to <em>bean</em> 'securityManager' while setting <em>bean</em> property 'securityManager'; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'securityManager' <em>defined</em> in class path resource [com/pactera/platform/reqm/resources/spring-security.xml]: Cannot resolve reference to <em>bean</em> 'myRealm' while setting <em>bean</em> property 'realm'; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'myRealm': Injection of autowired dependencies failed; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Could not autowire field: private com.pactera.platform.reqm.core.service.IUserManageService com.pactera.platform.reqm.web.security.MyRealm.userService; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'userManageServiceImpl': Injection of persistence dependencies failed; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'entityManagerFactory' <em>defined</em> in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Cannot resolve reference to <em>bean</em> 'hibernateJpaVendorAdapter' while setting <em>bean</em> property 'jpaVendorAdapter'; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'hibernateJpaVendorAdapter' <em>defined</em> in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Cannot create inner <em>bean</em> 'com.pactera.platform.reqm.core.util.Hibernates#9fac35' of type [com.pactera.platform.reqm.core.util.Hibernates] while setting <em>bean</em> property 'databasePlatform'; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'com.pactera.platform.reqm.core.util.Hibernates#9fac35' <em>defined</em> in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Instantiation of <em>bean</em> failed; nested exception is org.springframework.<em>bean</em>s.factory.BeanDefinitionStoreException: Factory method [public static java.lang.String com.pactera.platform.reqm.core.util.Hibernates.getDialect(javax.sql.DataSource)] threw exception; nested exception is java.lang.RuntimeException: Could not get database urlrn at org.springframework.<em>bean</em>s.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)rn at org.springframework.<em>bean</em>s.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)rn at org.springframework.<em>bean</em>s.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)rn at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:753)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)rn at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)rn at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:595)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rnCaused by: org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'securityManager' <em>defined</em> in class path resource [com/pactera/platform/reqm/resources/spring-security.xml]: Cannot resolve reference to <em>bean</em> 'myRealm' while setting <em>bean</em> property 'realm'; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'myRealm': Injection of autowired dependencies failed; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Could not autowire field: private com.pactera.platform.reqm.core.service.IUserManageService com.pactera.platform.reqm.web.security.MyRealm.userService; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'userManageServiceImpl': Injection of persistence dependencies failed; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'entityManagerFactory' <em>defined</em> in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Cannot resolve reference to <em>bean</em> 'hibernateJpaVendorAdapter' while setting <em>bean</em> property 'jpaVendorAdapter'; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'hibernateJpaVendorAdapter' <em>defined</em> in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Cannot create inner <em>bean</em> 'com.pactera.platform.reqm.core.util.Hibernates#9fac35' of type [com.pactera.platform.reqm.core.util.Hibernates] while setting <em>bean</em> property 'databasePlatform'; nested exception is org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'com.pactera.platform.reqm.core.util.Hibernates#9fac35' <em>defined</em> in class path resource [com/pactera/platform/reqm/resources/spring-datasource.xml]: Instantiation of <em>bean</em> failed; nested exception is org.springframework.<em>bean</em>s.factory.BeanDefinitionStoreException: Factory method [public static java.lang.String com.pactera.platform.reqm.core.util.Hibernates.getDialect(javax.sql.DataSource)] threw exception; nested exception is java.lang.RuntimeException: Could not get database urlrn at org.springframework.<em>bean</em>s.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)rn at org.springframework.<em>bean</em>s.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)rn at org.springframework.<em>bean</em>s.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)rn at org.springframework.<em>bean</em>s.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)rn ... 38 morernrnrnrnrn
SpringMVC莫名其妙出现No bean named 'cacheManager' is defined错误
https://blog.csdn.net/u011403655/article/details/46676513
No bean named 'springSecurityFilterChain' is defined 解决方法
最近在配置Spring Security 3.0的时候,遇到了这个问题 'springSecurityFilterChain' 是默认配置在web.xml中的filter:   springSecurityFilterChain     org.springframework.web.filter.Delegatin
SpringBoot 与Shirofilter
  Shiro 一段时间没用,好多东西忘了,今天自定义Filter 注册到Shiro中的时候发现了几个问题: 1.这个Filter会执行2次  2.受Shiro管理的filter 无法使用Spring 的<em>bean</em> 所以干脆直接debug源码一探究竟: 先声明一点,我们在配置中通常都是通过ShiroFilterFactoryBean来配置的 public class ShiroFilt...
shiro框架一 :基于URL粗粒度的页面拦截过滤
对于<em>shiro</em>大家都不陌生,它是一个权限控制框架。 它对权限控制,主要分为两种方式。 1、粗粒度URL级别的权限控制 2、细粒度基于方法的权限控制 其实权限控制的话,也可以自己写,主要用到的技术有 自定义实现:实现权限控制, 可以自己写代码实现 (粗粒度权限控制 Filter、 细粒度权限控制 自 定义注解、代理、反射技术),博主能力有限就不自己写了,,,(其实是写不出来,,,)。还有一...
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '' is defined
org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'com.hxzy.service.PageService': Cannot resolve reference to <em>bean</em> 'pageServiceImp' while setting <em>bean</em> property 're...
shiro 整合sping 报错Error creating bean with name 'shiroFilter'
[code=java]rn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name '<em>shiro</em>Filter' <em>defined</em> in URL [file:/F:/work/smc/target/Fiddle/WEB-INF/classes/spring-app.xml]: BeanPostProcessor before instantiation of <em>bean</em> failed; nested exception is org.springframework.<em>bean</em>s.factoryrn[/code]rnrnspring-<em>shiro</em>.xmlrn[code=java]rnrn rn rn rn rn rnrn rn rn rn rn rn rnrn rn rn rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn /login=anonrn /** = authcrn rn rn rn rn rn rnrn rn rnrn rn rn rn rn[/code]rnrnweb.xmlrn[code=java]rnrnrnrn rn <em>shiro</em>Filterrn org.springframework.web.filter.DelegatingFilterProxyrn truern rn targetFilterLifecyclern truern rn rn rn <em>shiro</em>Filterrn /*rn rnrn rn rn springListenerrn org.springframework.web.context.ContextLoaderListenerrn rn rn org.springframework.web.util.IntrospectorCleanupListenerrn rn[/code]rnrn希望大神能帮忙看下,小弟不胜感激啊~rn
Springmvc集成Shiro实现权限管理
Springmvc<em>集成</em>Shiro实现权限管理 Shiro是一个安全框架,他可以<em>集成</em>其他开发开发框架 如:Springmvc,实现用户身份认证、权限管理等等功能,<em>shiro</em>详细的介绍也就不讲了,这里给出一些关键的知识点吧: 知识点: <em>shiro</em>中默认的过滤器 过滤器名称 过滤器类 描述 anon org.apache.<em>shiro</em>
springmvc集成shiro注解权限
<em>springmvc</em><em>集成</em><em>shiro</em>注解权限 源代码下载:http://download.csdn.net/detail/u013147600/9066923 java.lang.ClassNotFoundException: org.aspectj.lang.annotation.Around错误解决方法:http://blog.csdn.net/u013147600/article/det
Shiro集成SpringMVC工程整合
Apache Shiro Framework 介绍第一章:Shiro简介1、1 Shiro框架简介Apache Shiro是Java的一个安全框架,旨在简化身份验证和授权。Shiro在JavaSE和JavaEE项目中都可以使用。它主要用来处理身份认证,授权,企业会话管理和加密等。官网地址如下:http://<em>shiro</em>.apache.org/Shiro的具体功能点如下:![屏幕快照 2017-08-2
shiro源码分析之shiroFilter初始化过程
<em>shiro</em>源码分析之<em>shiro</em>Filter初始化过程1、首先看使用<em>shiro</em>(1.3.0)框架要使用的配置。 配置web.xml requests. Usu
spring配置文件中配置了,但找不到Bean , 启动不报错,运行报错No bean named
明明在spring配置文件中书写了,但找不到Bean , 而且启动还不报错 . 一运行就报错遇到这种问题一定是spring配置文件没有被加载(读取)到内存中 .错误如下 : 常见原因有以下两种:    1 . spring配置文件路径或文件名没有书写正确  .        解决 : 仔细检查web.xml中spring配置文件的路径和文件名.        2 . 如果在&amp;lt;context-...
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'lifecycleBeanPostPro
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No b...
Spring 框架主方法运行后 异常 No bean named 'XXX' is defined
十月 16, 2017 3:19:37 下午 org.springframework.context.support.AbstractApplicationContext prepareRefresh 信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@426a086a: startu
SpringMVC中为什么要配置Listener和Servlet
一直以来,我们使用SpringMVC的时候习惯性都配置一个ContextLoaderListener,虽然曾经有过疑问,配置的这个监听器和Servlet究竟做了什么,但也没深究。 要说任何Web框架都离不开Servlet,它是一个容器,也是一种规范,你要和Web搞上关系,无非就是那么几种,监听器、过滤器和Servlet,最终都是为了切进ServletContext。 SpringMVC是基于S
SSH整合出现NoSuchBeanDefinitionException: No bean named 'userinfoDao' is defined
org.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'test.TestSer
springMVC整合json时启动报错
启动时会报rnError creating <em>bean</em> with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter': Cannot create inner <em>bean</em> 'com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter4#0' of type [com.alibaba.fastjson.support.spring.rnFastJsonHttpMessageConverter4] while setting <em>bean</em> property 'messageConverters' with key [0]; nested exception is org.springframework.<em>bean</em>s.factory.CannotLoadBeanClassException: Cannot find class [com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter4] for <em>bean</em> with name 'com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter4#0' <em>defined</em> in class path resource [spring/<em>springmvc</em>.xml]; nested exception is java.lang.ClassNotFoundException: com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter4rnrn不论是整合的jackson还是fastjson,都会报'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter':这个相关的错。rnrnspringMVC.xmlrnrn rn rn rn rn text/html;charset=UTF-8rn application/jsonrn rn rn rn rn WriteMapNullValuern QuoteFieldNamesrn rn rn rn rn rn rn rn rn rn rn rn rn rn
h、s整合问题:No bean named 'sessionFactory' is defined
我用的是hibernate和spring整合,在<em>bean</em>s.xml写了sessionFactory.在类里面调用@Resource时就报错了rn@Resource(name="sessionFactory")rn public void setSessionFactory(SessionFactory sessionFactory) rn this.sessionFactory = sessionFactory;rn rn rnrn rn rn rn com.yyq.model.Userrn rn rn rn rn rn org.hibernate.dialect.MySQLDialectrn rn truern rn rn rnrnrnorg.springframework.<em>bean</em>s.factory.BeanCreationException: Error creating <em>bean</em> with name 'u': Injection of resource dependencies failed; nested exception is org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:306)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)rn at org.springframework.<em>bean</em>s.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)rn at org.springframework.<em>bean</em>s.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)rn at com.yyq.service.UserServiceTest.testAdd(UserServiceTest.java:15)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:601)rn at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)rn at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)rn at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)rn at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)rn at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)rn at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)rn at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)rn at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)rn at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)rn at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)rn at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)rn at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)rn at org.junit.runners.ParentRunner.run(ParentRunner.java:300)rn at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)rn at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)rnCaused by: org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:442)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:416)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:549)rn at org.springframework.<em>bean</em>s.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:159)rn at org.springframework.<em>bean</em>s.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:303)rn ... 36 morern
CXF WebService 整合 SrpingMVC 报错 No bean named 'sqlSessionFactory' is defined
之前没接触过webService,这两天要开发个接口,前面的很多错都已经解决了,大部分是jar包问题。rnrn现在还遇到一个错误就是 No <em>bean</em> <em>named</em> 'sqlSessionFactory' is <em>defined</em>rnrn错误详情:rn[color=#FF0000]rn1、Error creating <em>bean</em> with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' <em>defined</em> in ServletContext resource [/WEB-INF/spring4mvc-servlet.xml]: Cannot resolve reference to <em>bean</em> 'sqlSessionFactory' while setting <em>bean</em> property 'sqlSessionFactory'; nested exception is org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sqlSessionFactory' is <em>defined</em>rnrn2、org.springframework.<em>bean</em>s.factory.BeanCreationException:Error creating <em>bean</em> with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' <em>defined</em> in ServletContext resource [/WEB-INF/spring4mvc-servlet.xml]: Cannot resolve reference to <em>bean</em> 'sqlSessionFactory' while setting <em>bean</em> property 'sqlSessionFactory'; nested exception is org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sqlSessionFactory' is <em>defined</em>[/color]rnrn3、Caused by: org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sqlSessionFactory' is <em>defined</em>[/color]rnrn这3个错误是一起暴露出来的rnrn我的spring 是4.0.6版本rnjdk 是 1.7rn我添加的jar包如下rn[img=https://img-bbs.csdn.net/upload/201801/23/1516696110_921690.png][/img]rnrnrn这是web.xml配置rn[code=text]rn rn rn contextConfigLocationrn /WEB-INF/webservice.xmlrn rnrn rn CXF Servletrn CXFServletrn org.apache.cxf.transport.servlet.CXFServletrn 1rn rn rn CXFServletrn /webservice/*rn rn rn[/code]rnrn这个是自定义的webservice配置rn[img=https://img-bbs.csdn.net/upload/201801/23/1516696075_568826.png][/img]rnrn报错中提到的sqlSessionFactory是在spring的配置文件里配置的rn rn rn rn rn rnrnrn[color=#0000FF]说明一下,原来项目是正常运行的,加入webservice的配置和jar包启动tomcat就报错[/color]rnrn网上查了很多资料都没找到原因,所以来这里求助
shiro学习之LifecycleBeanPostProcessor的作用
在使用spring整合<em>shiro</em>的系统中,配置<em>bean</em>的时候往往要配置LifecycleBeanPostProcessor,一直没有深究这个的具体作用,只大概知道是用来管理<em>shiro</em>一些<em>bean</em>的生命周期。今天查了一下源码,总算揭开它的神秘面纱。 先来看看日常的配置: id="lifecycleBeanPostProcessor" class="org.apache.<em>shiro</em>.sprin
没有找到这个beanlifecycleBeanPostProcessor
-
代码改造引发的NoSuchBeanDefinitionException:no bean named 'XXXX' available问题解决方案
前段时间项目扫描出现一些不合规范的地方,有类问题就是不能动态加载。于是在代码中就换了一个方式:直接从Spring获得<em>bean</em>对象,然后通过getClass方法获得类。项目是使用Springboot开发的。 原来: Class&lt;? extends Object&gt; clazz = Class.forName(className); 现在: Object <em>bean</em> = app...
springboot集成shiro 实现权限控制
<em>shiro</em>apache <em>shiro</em> 是一个轻量级的身份验证与授权框架,与spring security 相比较,简单易用,灵活性高,springboot本身是提供了对security的支持,毕竟是自家的东西。springboot暂时没有<em>集成</em><em>shiro</em>,这得自己配。<em>shiro</em> 内置过滤器请看博文: http://blog.csdn.net/hxpjava1/article/details/70357
启动tomcat时 严重: Exception starting filter struts2
2009-3-11 15:05:31 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomca
NND, 项目移植报个No bean named 'sessionFactory' is defined
项目是SSH的架构,开发的时候是用的tomcat,并能正常运行,rn但是移植到weblogic10上后,访问页面竟然出现:rnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em> at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:360)rnrn[code=XML]rnrnrn rn rn contextConfigLocationrn classpath:/applicationContext*.xmlrn rn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn rn org.springframework.web.util.IntrospectorCleanupListenerrn rnrn rn rn encodingFilterrn org.springframework.web.filter.CharacterEncodingFilterrn rn encodingrn UTF-8rn rn rn rn rn rn lazyLoadingFilterrn org.springframework.orm.hibernate3.support.OpenSessionInViewFilterrn rn rn rn struts2rn org.apache.struts2.dispatcher.FilterDispatcherrn rn rn encodingFilterrn *.jsprn rn rn encodingFilterrn /*rn rn rn rn lazyLoadingFilterrn *.actionrn rn rn struts2rn /*rn rnrn rnrnrnrn rn 30rn rn rn rn rn /WEB-INF/tlds/c.tldrn /WEB-INF/tlds/c.tldrn rn rn /WEB-INF/tlds/fn.tldrn /WEB-INF/tlds/fn.tldrn rn rn /WEB-INF/tlds/fmt.tldrn /WEB-INF/tlds/fmt.tldrn rn rn rn rn login.jsprn rnrnrn[/code]
整合SSH出现的No bean named '/addUser' is defined错误
我的spring配置rnrnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn org.hibernate.dialect.MySQLDialectrn rn rn rn rn rn net/xie/hr/entity/Roles.hbm.xmlrn rn net/xie/hr/entity/Groups.hbm.xmlrn rn net/xie/hr/entity/Rights.hbm.xmlrn rn net/xie/hr/entity/User.hbm.xmlrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnrn我的sturts配置rnrnrnrnrn rn rn rnrn rnrn rn rn rn rn rn rnrn rnrn rn rn rn rnrnrnweb里没配。rnrnjsp页面rn rn rn JSP for AddUserForm formrn rn rn rn rn 用户名 : rn 密码 : rn rn rn rnrnrnrnrnrn报错:rn17:48:05,312 [http-8080-1] WARN RequestProcessor : Unhandled Exception thrown: class org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionExceptionrn2008-7-30 17:48:05 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet action threw exceptionrnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> '/addUser' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)rn at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884)rn at org.springframework.web.struts.DelegatingActionProxy.getDelegateAction(DelegatingActionProxy.java:127)rn at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:109)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)rn at java.lang.Thread.run(Unknown Source)rn
服务器启动时报No bean named 'sessionFactory' is defined,怎么解决呀
<em>bean</em>的配置rnrnrn rn rn rn rn rn rn rn rnrn其中CustomerDaoImpl继承HibernateDaoSupportrnrn---------------------------------------------------------rnweb.xmlrnrnrnrnrnrnrnrn rn actionrn org.apache.struts.action.ActionServletrn rn configrn /WEB-INF/struts-config.xmlrn rn rn debugrn 2rn rn rn detailrn 2rn rn 2rn rnrnrn rn rn actionrn *.dorn rn rn rn OpenSessionInViewFilterrn org.springframework.orm.hibernate3.support.OpenSessionInViewFilterrn rn rn rn OpenSessionInViewFilterrn /*rn rn rn rn rn contextConfigLocationrn classpath:applicationContext-*.xmlrn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rnrnrnrnrn
Servlet.service() for servlet jsp threw exception 和No bean named 'sessionFactory' is defined
配置SSH时候遇到的,准备做个登陆!!rn————————rn这是配置的applicationContextrn[code=Java]rn rn rn rn rn rn rn rn rnrnrn rn rn rn rn rn rn rn org.hibernate.dialect.SQLServerDialectrn rn truern rn rn rn rn cn/studclub/vo/User.hbm.xmlrn rn rn rnrn rn rn [/code]rnweb.xmlrnrn[code=Java]rnrn rn index.jsprn rn rn rn actionrn org.apache.struts.action.ActionServletrn rn configrn /WEB-INF/struts-config.xmlrn rn rn debugrn 2rn rn rn detailrn 2rn rn 2rn rnrnrn rn rn actionrn *.dorn rn rn rn contextConfigLocationrn classpath*:applicationContext.xmlrn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn rn Spring character encoding filterrn org.springframework.web.filter.CharacterEncodingFilterrn rn encodingrn GBKrn rn rnrn rn Spring character encoding filterrn /*rn rn rn rn hibernateFilterrn org.springframework.orm.hibernate3.support.OpenSessionInViewFilterrn rn rn hibernateFilterrn /*rn rnrn[/code]rnrn运行的时候就出现rnrn信息: Detected AnnotationXWorkConverter, initializing it...rnlog4j:ERROR setFile(null,true) call failed.rnjava.io.FileNotFoundException: \WEB-INF\petstore.log (系统找不到指定的路径。)rn at java.io.FileOutputStream.openAppend(Native Method)rn at java.io.FileOutputStream.(Unknown Source)rn at java.io.FileOutputStream.(Unknown Source)rnrnrn和,信息: Jk running ID=0 time=0/63 config=nullrn2008-12-8 20:36:38 org.apache.catalina.startup.Catalina startrn信息: Server startup in 18690 msrn2008-12-8 20:37:19 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet jsp threw exceptionrnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:353)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:916)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:243)rnrnrnat java.lang.Thread.run(Unknown Source)rn2008-12-8 20:38:35 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet jsp threw exceptionrnorg.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'sessionFactory' is <em>defined</em>rn at org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:353)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:916)rn at org.springframework.<em>bean</em>s.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:243)rnrnrnrn——————————————————————————————————rn各位帮帮忙,怎么个解决法,搞了一下午了~~~~~~~rnrn
struts+spring+hibernate 框架 出现 No bean named 'baseTransactionProxy' is defined错误。寻求帮助
第一次用struts+spring+hibernate搭建框架rnweb.xmlrn-------------------------------------------------rn rn contextConfigLocationrn /WEB-INF/config/dataAccessContext-local.xml /WEB- INF/config/applicationContext.xml rn rn contextrn org.springframework.web.context.ContextLoaderServletrn 1rn rn rn actionrn org.apache.struts.action.ActionServletrn rn configrn /WEB-INF/struts-config.xmlrn rn--------------------------------------------------------------------------------------rnstruts-config.xmlrn-------------------------------------------------------------------------------------rn rn rn rn rn rn rn rn rn--------------------------------------------------------------------------------------rnaction-servlet.xmlrn-----------------------------------------------------------------------------------------rnrnrn rn rn rn rn rnrnrn-------------------------------------------------------------------------------------rnapplicationContext.xmlrn----------------------------------------------------------------------------------------rnrnrn rn rn rn WEB-INF/config/jdbc.propertiesrn rn rn rn rn rn rn rn rn rn PROPAGATION_REQUIRED,readOnlyrn PROPAGATION_REQUIRED,readOnlyrn PROPAGATION_REQUIRED,readOnlyrn PROPAGATION_REQUIREDrn PROPAGATION_REQUIREDrn PROPAGATION_REQUIREDrn PROPAGATION_REQUIREDrn rn rn rn rn rn rn rn rn rn rn rn rnrn---------------------------------------------------------------------------------------------rndataAccessContext-local.xmlrn--------------------------------------------------------------------------------------rnrn rn rn $jdbc.driverrn rn rn $jdbc.urlrn rn rn $jdbc.usernamern rn rn $jdbc.passwordrn rn rn 1rn rn rn 25rn rn rn 5rn rn rn rn rn rn rnrn rn rn com/zwzx/student/dao/hibernate/pojo/Login.hbm.xmlrn rn rn rn rn org.hibernate.dialect.Oracle9Dialectrn falsern rn rn rn rn rn rn rn rn rn rn rnrn-----------------------------------------------------------------------------------rn有帖子说引入aopalliance.jar包,这个我已经引入了。rn并且在Action中写了 private LoginService loginService =null;rn并有loginService 的get和set方法。rn现在点击登陆提交后,页面会抛出异常rnjavax.servlet.ServletException: Error creating <em>bean</em> with name '/login' <em>defined</em> in ServletContext resource [/WEB-INF/config/action-servlet.xml]: Can't resolve reference to <em>bean</em> 'loginService' while setting property 'loginService'; nested exception is org.springframework.<em>bean</em>s.factory.NoSuchBeanDefinitionException: No <em>bean</em> <em>named</em> 'loginService' is <em>defined</em>: org.springframework.<em>bean</em>s.factory.support.DefaultListableBeanFactory defining <em>bean</em>s [/login]; root of BeanFactory hierarchyrn org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)rn org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)rn org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)rn org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)rn org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:709)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rnrn问题出在哪里呢?rn被一个问题折磨了一天了。求各位高手帮助。
dsp应用源代码下载
dsp原理及应用第七章,第八章源代码.AD50的源代码下载 相关下载链接:[url=//download.csdn.net/download/hubeiyuan112/2823713?utm_source=bbsseo]//download.csdn.net/download/hubeiyuan112/2823713?utm_source=bbsseo[/url]
如何跳出frame框架下载
可以用js解决在你想控制跳转的页面,比如login.jsp中的加入以下代码 相关下载链接:[url=//download.csdn.net/download/lyndameng/4551434?utm_source=bbsseo]//download.csdn.net/download/lyndameng/4551434?utm_source=bbsseo[/url]
嵌入式设备电源管理设计简稿下载
描述了一种基于linux操作系统的小型嵌入式设备的电源管理软件方案(3页) 相关下载链接:[url=//download.csdn.net/download/lanfs/5022864?utm_source=bbsseo]//download.csdn.net/download/lanfs/5022864?utm_source=bbsseo[/url]
相关热词 c++和c#哪个就业率高 c# 批量动态创建控件 c# 模块和程序集的区别 c# gmap 截图 c# 验证码图片生成类 c# 再次尝试 连接失败 c#开发编写规范 c# 压缩图片好麻烦 c#计算数组中的平均值 c#获取路由参数
我们是很有底线的