eclipse行,tomcat出现No bean named 'shiroFilter' is defined,为啥? [问题点数:50分]

Bbs1
本版专家分:10
Blank
黄花 2007年2月 Web 开发大版内专家分月排行榜第二
结帖率 99.7%
Bbs1
本版专家分:10
Blank
黄花 2007年2月 Web 开发大版内专家分月排行榜第二
Bbs1
本版专家分:10
Blank
黄花 2007年2月 Web 开发大版内专家分月排行榜第二
Bbs1
本版专家分:0
Bbs1
本版专家分:13
Bbs1
本版专家分:0
其他相关推荐
项目“No bean named 'shiroFilter' is defined”错误处理
一个项目在本地运行一直报“No bean named ‘shiroFilter’ is defined”,但从Gitlab上面拉下来的代码却能正常动行, 为了找到原因,下载了Beyond Compare进行文件对比,最后发现.settings隐藏目录下的org.eclipse.wst.common.component文件存在差异。错误信息严重: Exception starting filter
No bean named 'shiroFilter' is defined
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'shiroFilter' is defined
No bean named 'shirofilter' available 报错
这个报错一般是没有找到这个shirofilter,如果确定有,那么请检查类名,或者xml有没有写错,握手第二次遇到这个错误了, 以下图片就是我今天遇到的,就是名字没写对。框架整合还是要细心 这里写图片描述
SuchBeanDefinitionException: No bean named 'shiroFilter' is defined
异常的意思是说shiroFilter没有定义,可能的一个原因是配置文件没有被编译,看看Tomcat下相应的位置是否有配置文件,如果木有,重新编译整个项目,重新部署到Tomcat。
报错No bean named ' is defined的原因和解决方案
项目为dubbo+springmvc+spring+mybatis贴上项目目录 如下:baidu-dubbo为父项目;其他的都是子项目;其中core项目 和  ifc 项目为jar包  core项目是项目自己的一些接口     ifc是暴露出来的公共接口service项目和web项目是war包;   service是业务处理层  web是主要是负责页面跳转逻辑的core项目中引入了ifc项目  s...
SpringMvc整合shiro报错(一)
在使用SpringMvc整合shiro框架时,新建好的项目上传到svn上之后,重新下载之后的项目启动时报以下错误: 严重: Exception starting filter shiroSecurityFilter org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'shiroSecur
关于shiro+springMVC整合使用的问题
最近做新系统的时候,关于权限刚开始考虑用spring security,研究了两天发现好复杂,就换了shiro,又折腾了几天,总算调试通过了,但是这过程也到处是坑,这里做个记录,如果有同样需求的,以防再掉进去。 从网上搜shiro教程的时候,大部分都是基于配置文件或者是角色进行管理的,但是我们平时做web系统根本不会这么用的,我们都是基于权限permissions的管理方式,这里推荐一个比价
错误的创建shiroFilter这个bean
案例引入 shiro权限控制,用户授权管理功能的实现 一:bug截图 二:案例代码 三:原因分析 1:在安全管理器用配置了ref的引用类, 2:但是在RosrRealm类中缺少@service这个类的注解 四:解决方案 配置@service注解,指定值与ref的属性值一致
后台中 No bean named 'xxxx' is defined碰到的问题
我的程序中服务类的名字是ManageService ,Dao类的名字是ManageDao   在ManageService 中要定义 先定义全局变量private ManageDao ManageDao;  然后创建一个构造函数如下所示:   private ManageService(){ // TODO: 异常环境的日志记录、重试处理;交易记录缓存的周期性清理 ManageDao =
spring与mybatis中注入了却总提示no bean named
在spring与mybatis整合过程中,碰到一个很难理解的问题。 dao通过 @Autowired注册时,没问题,到如果用@Resource注册时,指令@Resource 的name时,name对应的DAO名称的前两位,要么都大写,在么都小写,否则报 No bean named  xxdao is defined
jeecms6.1部署后在tomcat启动时报错
1 . 问题描述如下: 2015-11-16 11:25:32 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\JavaX64\apache-tomcat-7.0.64-forMyEclipse\apache-tomcat-7.0.64\w
spring boot 整合shiro 配置类报错问题
这里传入的是下边返回的自定义Realm,下边是报错,报的是该类不能被装载,由jdk自己装载,这里不是太懂,记录一下,由于错误太长,不好截屏,直接复制错误内容 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> /////////////////////////////////////////////
菜鸟解jeecmsv7之源码安装(一)
1.关于jeecms的定义之类的内容,请登录官网http://www.jeecms.com/自行了解。 2.开发环境及工具:jeecmsv7-src开源版,ecplise,jre7,tomcat6或tomcat7。源码安装教程:http://www.jeecms.com/rjaz/477.htm 。安装完成,启动服务器,显示成功。 3.报错:a.未更改jdbc.properties中的数据库和
服务是正常的,有个service有的时候能依赖,有的时候没有找到依赖(no named bean 'XXXXservice' defined)
1、 排查思路一: 服务是正常的,偶尔找不到依赖,怀疑是部署的问题,通知运维重新部署,问题依然存在;  2、 排查思路二: 查看代码重新验证,本地再次验证,测试环境再次验证一切正常的,怀疑是生产代码没有部署上去,  但是服务偶尔是正常的,两个思路有点互斥,但是是排查问题,只能看生产的部署代码,拉生产代码反编译文件,发现代码确实是最新的,  问题依然存在,继续排查;  3、 排查思路三: 生
有大神可以帮忙看下吗?搭建的ssm框架报错显示No bean named 'sessionFactory' available
异常信息web.xml文件applicationContext.xml文件项目架构和controller的java文件mybatis-spring-1.3.1.jar这个包重新下载了几次,该有的注解都已经配置完了,帮忙看下哪里出错了以及解决方法。谢谢!...
No bean named 'xxxService' is defined 的几种原因和解决方案(详细介绍)
问题描述:No bean named ‘xxxService’ is defined 问题本质:一般这种情况下都是因为你发布的包存在xml文件的丢失,这样的话会导致很多方法类加载不起来。 Pom介绍:所以这个时候你应该看看自己的pom.xml文件,包含了关于工程和各种配置细节的信息,当执行一个任务或者目标时,Maven 会查找当前目录下的 POM,从其中读取所需要的配置信息,然后执行目标。 ...
学习springmvc的第十三天(自定义类型转换器ConversionServiceFactoryBean)
1、新建一个controller; 2、新建一个类TestConverter实现Converter接口,实现convert方法; 3、在springmvc.xml中配置自定义的转换器; 4、在add.jsp中重新写一个form; 备注: 本次是将字符串转换成对象;
jeesite配置shiro与CAS认证
公司最近搞了个单点登录的项目,公司用的是jeesite框架,里面自带集成了shiro 自己花了蛮多时间弄这个东西,总算是好了。分享出来希望大家碰到这个坑的时候可以少花点时间。 一、jesstie.properties中添加如下配置 #单点登录CAS设置 shiro.cas.service=http://127.0.0.1:8080/ems_cas/a/cas shiro.cas.serverU
No bean named 'companyService' is defined
昨天都可以成功运行项目,然后把项目备份了一份,今天修改项目遇到点问题,拿出备份的出来测试,居然也报错了,companyService大小写检查了,路径也检查了,也存在,但是就是报错,谁能帮我瞧瞧到底什么错哦
No bean named 'helloWorld' is defined
[img=http://img.bbs.csdn.net/upload/201612/12/1481476774_910020.png][/img]rnrn[img=http://img.bbs.csdn.net/upload/201612/12/1481476809_804946.png][/img]rnrn就是一个简单的例子,但就是报错。rn是配置文件有问题还是哪里错了?rn望告知
No bean named 'dataSource' is defined
大神看看怎么回事rn这是异常:[img=http://img.bbs.csdn.net/upload/201609/07/1473243878_75936.png][/img]rnrnapplicationContext-security.xml配置文件引用数据源rn[img=http://img.bbs.csdn.net/upload/201609/07/1473243871_777095.png][/img]rnrn配置数据源rn[img=http://img.bbs.csdn.net/upload/201609/07/1473243884_58893.png][/img]
No bean named 'SQService' is defined
这个问题如何解决No bean named 'SQService' is defined???
No bean named 'filterChainProxy' is defined
遇见个问题,搜了快一天都没解决~~rn启动tomcat报这个错, org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'filterChainProxy' is definedrnrnrn我的配置文件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求大神帮解决,百度上的结果基本上看完了吧。。。都不行~~
SpringMVC集成Shiro时启动报错 No bean named 'shiroFilter' is defined
错误信息--------------------------------------------------------------------------------------------------------------------------------------------------rnDEBUG 2017-12-19 14:17:34,465 org.springframework.beans.factory.support.DefaultListableBeanFactory: No bean named 'shiroFilter' found in org.springframework.beans.factory.support.DefaultListableBeanFactory@4710ad01: defining beans []; root of factory hierarchyrn十二月 19, 2017 2:17:34 下午 org.apache.catalina.core.StandardContext filterStartrn严重: Exception starting filter shiroFilterrnorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'shiroFilter' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:575)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1114)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:279)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)rn at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1121)rn at org.springframework.web.filter.DelegatingFilterProxy.initDelegate(DelegatingFilterProxy.java:323)rn at org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(DelegatingFilterProxy.java:235)rn at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:194)rn at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)rn at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)rn at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)rn at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4950)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1296)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2038)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)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)rnweb.xml配置信息-------------------------------------------------------------------------------------------------------------------------------------rnrnrn rn rn index.jsprn rn rn rn rn Dispatcherrn org.springframework.web.servlet.DispatcherServletrn rn contextConfigLocationrn /WEB-INF/spring-mvc.xmlrn rn rn 1rn rn rn rn Dispatcherrn rn *.dorn rn rn rn rn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rnrn rn rn contextConfigLocationrn classpath*:spring-*.xmlrn rnrn rn rn org.springframework.web.util.IntrospectorCleanupListenerrn rnrn rn rn encodingFilterrn org.springframework.web.filter.CharacterEncodingFilterrn rn encodingrn UTF-8rn rn rn forceEncodingrn truern rn rn rn rn encodingFilterrn /*rn rn rn rn rn rn 405 rn /WEB-INF/405.jsp rn rn rn 404 rn /WEB-INF/404.jsp rn rn rn 500 rn /WEB-INF/500.jsp rn rn rn java.lang.Throwable rn /WEB-INF/500.jsp rn rn rn rn rn rn shiroFilterrn org.springframework.web.filter.DelegatingFilterProxyrn rn targetFilterLifecyclern truern rn rn rn shiroFilterrn /*rn REQUESTrn FORWARDrn INCLUDErn ERRORrn rnrnrnspringMVC.xml中配置-------------------------------------------------------------------------------------------------------------------------rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn /*=anonrn rn rn rn rn rn rn rn项目结构-----------------------------------------------------------------------------------------------------------------------------------------------------------rn[img=http://img.bbs.csdn.net/upload/201712/19/1513665499_780590.png][/img]rn还望大神们不吝赐教,谢谢!在线等回应。
No bean named '' is defined
eclipse的控制台启动tomcat后,tomcat正常运行,可是通过tomcat访问页面时,tomcat报如下的错误信息:rn信息: Server startup in 11766 msrn2007-7-29 22:29:33 org.apache.catalina.core.ApplicationContext logrn信息: HTMLManager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost'rn2007-7-29 22:29:33 org.apache.catalina.core.ApplicationContext logrn信息: HTMLManager: init: Global resources are availablern2007-7-29 22:29:33 org.apache.catalina.core.ApplicationContext logrn信息: HTMLManager: list: Listing contexts for virtual host 'localhost'rn2007-7-29 22:29:36 org.apache.catalina.core.ApplicationContext logrn信息: HTMLManager: list: Listing contexts for virtual host 'localhost'rn 2007-07-29 22:29:37 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/spring].[jsp]] - rnorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:360)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:686)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:219)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:149)rn at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:541)rn at org.acegisecurity.util.FilterChainProxy.obtainAllDefinedFilters(FilterChainProxy.java:221)rn at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:136)rn at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)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:210)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)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:151)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)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:685)rn at java.lang.Thread.run(Thread.java:595)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.beans.factory.BeanCreationException: Error creating bean with name 'commonDao': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is defined[/color]rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)rn at org.springframework.beans.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.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:527)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1083)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274)rn at org.springframework.beans.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.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:156)rn at org.springframework.beans.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.beans.factory.BeanCreationException: Error creating bean with name 'commonDao': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is definedrn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:300)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)rn at org.springframework.beans.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.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:527)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1083)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:274)rn at org.springframework.beans.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.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:156)rn at org.springframework.beans.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 '/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我想是没有遗漏的地方了, 问题出在哪里了呢?
Spring学习及整合遇到的问题(一)
1. 错误一 Error creating bean with name 'helloServiceImpl' defined in class path resource [spring-service.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePr
spring入门(16)--spring常见错误总结
本文转自 杨凯专属频道  在学习spring过程中遇见了种种不同的异常错误,这里做了一下总结,希望遇见类似错误的同学们共勉一下。 1. 错误一 Error creating bean with name 'helloServiceImpl' defined in class path resource [spring-service.xml]: Error setting propert
Eureka错误
 Failed to bind properties under 'eureka.client.service-url' to java.util.Map<java.lang.String, java.lang.String> 该错误的提示是这样的 2018-08-10 13:35:04.596 INFO 13848 --- [ main] c.s.c.de...
Spring MVC和shiro整合时自动注入的问题
spring mvc和shiro进行整合时,我采用的是注解的方式,也就是@Autowired,发现service服务无法再自定义的realm中进行注入,会出现以下错误。 Error creating bean with name 'shiroFilter' defined in class path resource [spring-shiro.xml]: Cannot resolve refe
springmvc 与freemarker整合时出的异常,求解!
org.springframework.context.ApplicationContextException: Must define a single FreeMarkerConfig bean in this web application context (may be inherited): FreeMarkerConfigurer is the usual implementation
Python3中遇到的错误和解决方法
在看Python,准备下周的比赛,据说要用到python,Python菜鸟刚刚开始看。试着写程序遇到了一些问题,和大家分享一下。 1. ImportError: No module named 'cookielib'1 Python3中,改成 import  http.cookiejar,然后方法里也改成 http.cookiejar,查找替换就行 2. NameEr
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 '/companyAdmin' is defined
输入http://localhost/companyAdmin.do时,程序报如下错:rnrnorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '/companyAdmin' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:355)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:800)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:237)rn at org.springframework.beans.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)
SSH——No bean named 'AssistantService' is defined。。
[b]报错[/b]:rnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'LoginAction' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Cannot resolve reference to bean 'AssistantService' while setting bean property 'AssistantService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'AssistantService' is definedrnrn[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
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 bean named 'sessionFactory' is defined错误rn我用的是Eclipse 然后是Spring MVC + Hibernate + Maven编写的0.0
weblogic:No bean named 'sessionFactory' is defined
tomcat,mysql的项目改到weblogic,oracle上rnrn访问登录页面,输入用户名密码就出这个错误rnrnorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.beans.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
javax.servlet.ServletException: No bean named '/test' is defined
我领导给我的一个SPRING MVC 模板一直报错 有人可以帮我看下那里有错误吗 +我QQ 1582770447 我把项目包给你 求救rn[img=http://img.bbs.csdn.net/upload/201507/25/1437826020_877686.jpg][/img][img=http://img.bbs.csdn.net/upload/201507/25/1437826025_947133.jpg][/img]rnrn就一些配置文件加上3个测试网页 不过一直找不到/test类
(Activiti6.0.0)SpringProcessEngineConfiguration配置bean时属性注入不了,问题已经找到
             SpringProcessEngineConfiguration配置bean时属性注入不了 我用Spring搭建了个activiti的项目,但是在配置 org.activiti.spring.SpringProcessEngineConfiguration的bean时注入不了属性 请高手帮我看看,具体配置信息我放报错信息的最后面; SpringProcessEngin...
shiro配置报错问题
开始在配置shiro一直报错 下面直接上代码,我开始的配置是这样的:
JPA与Spring2.5整合时发生不能创建entityManagerFactory的问题解决方法
今天在做jpa与spring整合时,发现个异常... 如下异常内容: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [beans.xml]:: Invocation of init method failed; nested exception is
spring注入的processEngine突然就不好使了,项目启动不了
用activiti5.20.0版本, spring注入的processEngine突然就不好使了,原来只注入到一个service里面,现在又写了个service,相当于注入到两个地方,但是我取消注入新的service,还是不行,莫名其妙,项目启动不了, 报错 Caused by: org.springframework.beans.factory.BeanNotOfRequiredTypeE
dorado7数据库准备工作出现的错误
异常提示 Error creating bean with name ‘dorado.jdbc.dataInterceptor’ defined in class path resource [com/bstek/dorado/jdbc/context-defaultRule.xml]: Cannot resolve reference to bean ‘transactionManager’ w
在SpringMVC框架下提供dubbo服务(提供者)
dubbo服务提供者xml配置 ******************************************************************************************** http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchem
shiroFilter配置详解
Shiros是我们开发中常用的用来实现权限控制的一种工具包,它主要有认证、授权、加密、会话管理、与Web集成、缓存等功能。Shiro  权限配置一般使用的有两种,一种是采用注解的方式,在我们的  Controller  方法上,或者Action 方法上写入一些权限判断注解,具体怎么使用,我不做介绍,我主要推荐使用配置的方式。这也是我们现在要讲到的配置方式加载系统基础权限控制,采用对Url 进行控制...
配置多数据源异常
Caused by: java.lang.NoClassDefFoundError: com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceBuilder at io.renren.datasources.DynamicDataSourceConfig.firstDataSource(DynamicDataSourceConfig....
spring集成quartz报bean找不到的错误
我们用spring集成了quartz,集成过程就不多说了,最近发生了一个“诡异”的问题,突然quartz的定时任务运行不稳定了,有时候可以调用,有时候不能调用,且在控制台有时候还会显示找不到bean的错误。 在解决实际问题的时候,我们常常会倾向于采用比较法,而当比较法看起来不那么有用的时候,你就需要将问题简单化,构造出不同(成功 或 失败),然后再通过比较法去分析和定位问题。但就这次的问题来说告诉我们,数据库也是一种共享的资源,只要是共享的资源都会有并发的问题发生,所以在简化问题的时候一定要将数据库考虑在内
Spring项目集成ShiroFilter简单实现权限管理
微信测试
Shiro的Filter机制详解---源码分析
Shiro的Filter机制详解 首先从spring-shiro.xml的filter配置说起,先回答两个问题: 1, 为什么相同url规则,后面定义的会覆盖前面定义的(执行的时候只执行最后一个)。 2, 为什么两个url规则都可以匹配同一个url,只执行第一个呢。   下面分别从这两个问题入手,最终阅读源码得到解答。 问题一解答 相同url但定义在不同的行,后面覆盖前面
关于dorado中在配置sessionFactory中的packagesToScan的时候出现bean报错的情况
关于dorado中在配置sessionFactory中的packagesToScan的时候出现bean报错的情况 受以下文章的启发: http://www.blogjava.net/vcok/archive/2009/05/07/269321.html http://www.bianceng.cn/Programming/Java/201104/25431.htm
Eclipse的Servers中无法添加Tomcat服务器
今天又碰见了Tomcat无法创建的问题,问题截图: 这里总结了下 处理方法:      1.  关闭Eclipse       2.  打开项目所在的位置 即WorkSpace所在的位置。     项目文件夹 /.metadata/.plugins/org.eclipse.core.runtime/.settings       删除以下2个文件   org.ecl
SSH整合中sessionFactory创建失败问题
Error creating beanwith name 'sessionFactory' defined in class path resource [bean.xml] must specify an identifier type  Invocation of init method failed; nestedexception is org.hibernate.
第一行代码 Android 第2版
《*行代码 Android 第2版》被Android开发者誉为Android学习经典。全书系统全面、循序渐进地介绍了Android软件开发的知识、经验和技巧。第2版基于Android 7.0对第1版进行了全面更新,将所有知识点都在新的Android系统上进行重新适配,使用全新的Android Studio开发工具代替之前的Eclipse,并添加了对Material Design、运行时权限、Gradle、RecyclerView、百分比布局、OkHttp、Lambda表达式等全新知识点的详细讲解。
配置MongoDB+Spring是时mongoTemplate的bean初始化失败问题
首先给出运行出错时的application-mongodb.xml中的信息: http://www.springf
莫名其妙的BeanCreationException异常
前言 根据部门技术要求,同时提高系统的稳定性和易维护性,需要对现有系统进行技术升级改造,在技术改造的过程中难免会遇到一些问题,令我印象比较深刻的就是文章标题所说的BeanCreationException异常,这个看似比较常见的异常出现的原因却和常见的配置文件错误以及包冲突不太一样,本文针对解决这个异常问题做一个简单的总结。 背景 当时项目启动之初,为了使项目能够尽快上线,把部门原有项目...
Python2.7与Python3.3不同而产生的错误
今天刚开始学习Python就遇到了很多error,主要是我用的是Python3.3,而大多数教程都是Python 2.x。所以把自己目前遇到的一些主要错误记下来,留着以后纠错时,可能会用到吧。呵呵我记性不好,整理在下面(边学边整理) 1.Python 3.3.2,出现NameError: name 'raw_input' is not defined,原因是版本3.0 中去掉了raw_input
Target runtime Apache Tomcat 6.0 is not defined 解决方法
. eclipse 4.1 导入项目后 Target runtime Apache Tomcat v6.0 is not defined
Spring NoSuchBeanDefinitionException六大原因总结(非常实用)
1. Overview In this article, we are discussing the Springorg.springframework.beans.factory.NoSuchBeanDefinitionException – this is a common exception thrown by the BeanFactory when trying to reso
shiroFilter设计原理与实现
本篇文章篇幅比较长,但是细看下去相信对学习Shiro应该会有帮助。好了,闲话不多说,直接进入正题: Shiro提供了与Web集成的支持,其通过一个ShiroFilter入口来拦截需要安全控制的URL,然后进行相应的控制,ShiroFilter类似于如Strut2/SpringMVC这种web框架的前端控制器,其是安全控制的入口点,其负责读取配置(如ini配置文件),然后判断URL是否需要登录/权
No bean named 'cxf' is defined怎么解决
使用CXF+Spring开发webservice 报错No bean named 'cxf' is defined 我确认我没有这个bean 同时也在bean配置中添加了rnrnrnrn在线等
Shiro添加自己的Filter
因为前后端分离,添加了自己的过滤器,根据cookie判断传过来的uuid是否是登录的token 使用到了cache,稍后会加上源码也稍后上传 ShiroConfiguration @Bean public ShiroFilterFactoryBean shirFilter(SecurityManager securityManager) { //这里设置了自己的过滤器 S
大虾帮帮忙 No bean named 'sessionFactory' is defined
No bean named 'sessionFactory' is definedrn这是怎么回事啊 老是提示sessionFactory没有定义
框架整合的问题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.beans.factory.NoSuchBeanDefinitionException: No bean named 'MySessionFactory' is definedrn org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)rn org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)rn org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)rn org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn org.springframework.beans.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
spring mvc 注解:No bean named 'userBiz' is defined
之前发过一个帖子,但是因为我不知道论坛不能连续回复3次也不能删评论,弄的我不能发言了。rn报的错是rn严重: StandardWrapper.Throwablernorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userController': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.user.biz.UserBiz com.user.controller.UserController.userBiz; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.user.biz.UserBiz] is defined: Unsatisfied dependency of type [interface com.user.biz.UserBiz]: expected at least 1 matching beanrn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:243)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.beans.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.beans.factory.BeanCreationException: Could not autowire field: private com.user.biz.UserBiz com.user.controller.UserController.userBiz; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.user.biz.UserBiz] is defined: Unsatisfied dependency of type [interface com.user.biz.UserBiz]: expected at least 1 matching beanrn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:435)rn at org.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:240)rn ... 30 morernCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.user.biz.UserBiz] is defined: Unsatisfied dependency of type [interface com.user.biz.UserBiz]: expected at least 1 matching beanrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:613)rn at org.springframework.beans.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.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.user.biz.UserBiz] is defined: Unsatisfied dependency of type [interface com.user.biz.UserBiz]: expected at least 1 matching beanrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:613)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:412)rn at org.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:240)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)rn at org.springframework.beans.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下面是配置文件rnspringmvc-servlet.xmlrnrnrn rn rn rn rn rnrn rn rnrn rn rnrn
java-xcf异常 No bean named 'cxf' is defined
大家好,rn 在配置xcf的时候出下面问题,网上找了一般都说是版本问题,可换了好几个版本都出问题,请大侠帮忙下,谢谢!rn严重: StandardWrapper.Throwablernorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cxf' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)rn at org.springframework.beans.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=http://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-beans.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=http://img.bbs.csdn.net/upload/201405/20/1400549337_851127.jpg][/img]rn[img=http://img.bbs.csdn.net/upload/201405/20/1400549371_924511.jpg][/img]rnrn一直报No bean named 'xfire' is defined,求大神帮解决。[img=http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/83.gif][/img]rn
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 bean named 'TestService' is defined,并且在数据库中自动生成test_users表,困扰了好久了,麻烦大神指点一下!!!!
springMVC报错No bean named 'INVO_myReqUrl' is defined
[b]beans.xml如下:[/b]rnrn rn [b]rn rn rn [/b]rnrn[b]invocation如下:[/b]rn[b]@Component("INVO_myReqUrl")[/b]rnpublic class HomepageInvocation implements BaseInvocationrn public InvocationResult queryHomepageShowInfo(InvocationContext context)rn System.out.println("返回对象了,擦擦擦");rn return null;rn rn rnrnrn报错如下:rnorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'INVO_myReqUrl' is definedrnrn这到底什么情况啊?谢谢rnrn
解决tomcat启动产生[SetPropertiesRule]警告问题
[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:*' did not find a matching property. 出现SetPropertiesRule警告的原因是因为Tomcat在server.xml的C
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.beans.factory.NoSuchBeanDefinitionException: No bean named 'userService' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:553)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277)rn at org.springframework.beans.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)
spring,hibernate,jpa No bean named 'sessionFactory' is defined
各位帮我看看是不是我配置文件写错了,应该怎么写?还有用了JPA之后SPRING的注解,是不是还跟原来一样的用,没有任何的影响?rnorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sessionFactory' is definedrnrnweb.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 rnrnbeans.xmlrnrnrnrnrnrnrnrnrn
No bean named 'entityManagerFactory' is defined 异常怎么解决
我用spring 2.5+jpa+struts。我要用spring来管理jpa的entityManger便于管理延时加载。rn在没加spring管理延时加载的过滤器一切都正常使用,但是加上就报错rnorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' is definedrn org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:387)rn org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)rn org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)rn org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)rn org.springframework.beans.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
openSessionInViewFilter报No bean named 'sessionFactory' is defined错误
我是使用注解配置spring的。配置sessionfactory的代码如下rn[code=java]/**rn * 数据源beanrn */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的bean列表,发现有sessionFactory的bean,为什么openSessionInViewFilter就是提示找不到呢?求大牛解答
新手求助 No bean named 'cxf' is defined
严重: StandardWrapper.Throwablernorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'cxf' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:580)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1149)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:281)rn at org.springframework.beans.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.beans.factory.NoSuchBeanDefinitionException: No bean named 'cxf' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:580)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1149)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:281)rn at org.springframework.beans.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)
Springboot整合Swagger过程中遇到的坑
Springboot整合swagger的步骤以及出现问题的解决 第一步:引入swagger的依赖文件:          io.springfox          springfox-swagger2 2.7.0 io.springfox springfox-swagger-ui 2.7.0 这里的版本为2.7.0。
关于ssh整合jbpm4.4 无法获取processEngine的问题
先说环境 我的环境是 struts2.1.8+spring2.5.6+hibernate3.5.0+tomcat7.0 错误提示如下 org.hibernate.MappingException: Unknown entity: org.jbpm.pvm.internal.id.PropertyImpl at org.hibernate.impl.SessionFactoryImpl.get
shiro源码分析之shiroFilter初始化过程
shiro源码分析之shiroFilter初始化过程1、首先看使用shiro(1.3.0)框架要使用的配置。 配置web.xml