Spring 启动时报错 Injection of resource dependencies failed [问题点数:50分,无满意结帖,结帖人zhuanpenglve0711]

Bbs1
本版专家分:0
结帖率 100%
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Injection of resource dependencies failed;错误几种解决方法
Error creating bean with name 'connDataController': <em>Injection</em> of <em>resource</em> <em>dependencies</em> <em>failed</em>; 最近研究ssm项目的时候出现这个问题,去网上一搜那答案真是差不多,都没有解决我的问题,后来在重复搭建项目后才发现web.xml文件没有加 org.springframework.web.context.
Spring boot 项目启动因为@value报错Injection of autowired dependencies failed
-
SpringData由于xml文件错误导致 Injection of resource dependencies failed异常
注入自动连接的依赖项失败;嵌套异常 app.xml文件中扫描Repositories Bean所在的package值配错 应为 &lt;jpa:repositories base-package="com.yao.jpa" entity-manager-factory-ref="entityManagerFactory"&gt;&lt;/jpa:repositories&...
Injection of resource dependencies failed—方法增强时的报错原因与解决
在学习<em>Spring</em>——aop的时候,遇到了下面的<em>报错</em> <em>Injection</em> of <em>resource</em> <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'studentService' is expected to...
关于Failed dependencies
error: Failed <em>dependencies</em>:rnlibart_lgpl.so.2 is needed by BearPaw1200CU_GB2312-1.1.0-1.i386rnlibdb.so.2 is needed by BearPaw1200CU_GB2312-1.1.0-1.i386rnlibgdk-1.2.so.0 is needed by BearPaw1200CU_GB2312-1.1.0-1.i386rnlibgdk_imlib.so.1 is needed by BearPaw1200CU_GB2312-1.1.0-1.i386rnlibglib-1.2.so.0 is needed by BearPaw1200CU_GB2312-1.1.0-1.i386rnlibgmodule-1.2.so.0 is needed by BearPaw1200CU_GB2312-1.1.0-1.i386rnlibgnome.so.32 is needed by BearPaw1200CU_GB2312-1.1.0-1.i386rnlibgnomesupport.so.0 is needed by BearPaw1200CU_GB2312-1.1.0-1.i386rnlibgnomeui.so.32 is needed by BearPaw1200CU_GB2312-1.1.0-1.i386rnlibgtk-1.2.so.0 is needed by BearPaw1200CU_GB2312-1.1.0-1.irn问一下这是缺了那个包了阿谢谢~
【求助】跟着书本学习spring,遇到Injection of autowired dependencies failed,请求大佬帮忙看看
我是用IDEA创建的MAVEN项目,结构如下rn[img=https://img-bbs.csdn.net/upload/201903/11/1552314904_529221.png][/img]rn然后在dao层rn[b]userDao[/b]rn[code=java]@Repositoryrnpublic class UserDao rnrn @Autowiredrn private JdbcTemplate jdbcTemplate;rnrnrn public int getMatchCount(String userName, String password) rn String sqlStr = " SELECT count(*) FROM t_user "rn + " WHERE user_name =? and password=? ";rn return jdbcTemplate.queryForInt(sqlStr, new Object[]userName, password);rn [/code]rn[b]LoginLogDao[/b]rn[code=java]@Repositoryrnpublic class LoginLogDao rn @Autowiredrn private JdbcTemplate jdbcTemplate;rnrn public void insertLoginLog(LoginLog loginLog) rn String sqlStr = "INSERT INTO t_login_log(user_id,ip,login_datetime) "rn + "VALUES(?,?,?)";rn Object[] args = loginLog.getUserId(), loginLog.getIp(),rn loginLog.getLoginDate();rn jdbcTemplate.update(sqlStr, args);rn [/code]rnservice层[b]UserService[/b]rn[code=java]@Servicernpublic class UserService rnrn @Autowiredrn private UserDao userDao;rnrn @Autowiredrn private LoginLogDao loginLogDao;rnrn public boolean hasMatchUser(String userName, String password) rn int matchCount = userDao.getMatchCount(userName, password);rn return matchCount > 0;rn rnpublic void loginSuccess(User user) rn LoginLog loginLog = new LoginLog();rn loginLog.setUserId(user.getUserId());rn loginLog.setIp(user.getLastIp());rn loginLog.setLoginDate(user.getLastVisit());rn loginLogDao.insertLoginLog(loginLog);rn [/code]rn然后使用testng对userservice下的方法进行测试rn[b]UserServiceTest[/b]rn[code=java]@ContextConfiguration(locations = "/applicationContext*.xml")rnpublic class UserServiceTest extends AbstractTestNG<em>Spring</em>ContextTests rnrn @Autowiredrn private UserService userService;rnrn @Testrn public void hasMatchUser() rn boolean b1 = userService.hasMatchUser("admin", "123456");rn boolean b2 = userService.hasMatchUser("admin", "1111");rn assertTrue(b1);rn assertTrue(!b2);rn rnrnrnrn @Testrn public void loginSuccess() rn User user = userService.findUserByUserName("admin");rn user.setUserId(1);rn user.setUserName("admin");rn user.setLastIp("192.168.12.7");rn user.setLastVisit(new Date());rn userService.loginSuccess(user);rn rn[/code]rn运行<em>报错</em>如下rn[code=text]三月 11, 2019 10:14:14 下午 org.springframework.context.support.AbstractApplicationContext prepareRefreshrn信息: Refreshing org.springframework.context.support.GenericApplicationContext@62ee68d8: startup date [Mon Mar 11 22:14:14 CST 2019]; root of context hierarchyrn三月 11, 2019 10:14:14 下午 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletonsrn信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3e57cd70: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchyrn三月 11, 2019 10:14:14 下午 org.springframework.test.context.TestContextManager prepareTestInstancern严重: Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.Dependency<em>Injection</em>TestExecutionListener@768b970c] to prepare test instance [com.smart.service.UserServiceTest@79698539]rnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smart.service.UserServiceTest': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.smart.service.UserService com.smart.service.UserServiceTest.userService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.smart.service.UserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: @org.springframework.beans.factory.annotation.Autowired(required=true)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:374)rn at org.springframework.test.context.support.Dependency<em>Injection</em>TestExecutionListener.injectDependencies(Dependency<em>Injection</em>TestExecutionListener.java:110)rn at org.springframework.test.context.support.Dependency<em>Injection</em>TestExecutionListener.prepareTestInstance(Dependency<em>Injection</em>TestExecutionListener.java:75)rn at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321)rn at org.springframework.test.context.testng.AbstractTestNG<em>Spring</em>ContextTests.springTestContextPrepareTestInstance(AbstractTestNG<em>Spring</em>ContextTests.java:133)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)rn at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:543)rn at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:212)rn at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)rn at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:175)rn at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:107)rn at org.testng.TestRunner.privateRun(TestRunner.java:758)rn at org.testng.TestRunner.run(TestRunner.java:613)rn at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)rn at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)rn at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)rn at org.testng.SuiteRunner.run(SuiteRunner.java:240)rn at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)rn at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)rn at org.testng.TestNG.runSuitesSequentially(TestNG.java:1137)rn at org.testng.TestNG.runSuitesLocally(TestNG.java:1062)rn at org.testng.TestNG.run(TestNG.java:974)rn at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:73)rn at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)rnCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.smart.service.UserService com.smart.service.UserServiceTest.userService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.smart.service.UserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: @org.springframework.beans.factory.annotation.Autowired(required=true)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:506)rn at org.springframework.beans.factory.annotation.<em>Injection</em>Metadata.inject(<em>Injection</em>Metadata.java:87)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)rn ... 29 morernCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.smart.service.UserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: @org.springframework.beans.factory.annotation.Autowired(required=true)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:924)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:793)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)rn ... 31 morernrnrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.smart.service.UserServiceTest': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.smart.service.UserService com.smart.service.UserServiceTest.userService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.smart.service.UserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: @org.springframework.beans.factory.annotation.Autowired(required=true)rnrn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:374)rn at org.springframework.test.context.support.Dependency<em>Injection</em>Tes[/code]
框架新手在整合spring和mvc的tomcat报Injection of autowired dependencies failed;
eclipse版本4.9.0     tomact版本7.0   jdk版本1.8rnrn刚学完spring和springmvc想要整合一下简单的连一下数据库查询一些数据实验一下。tomac运行的时候直接后台<em>报错</em>。具体错误如下:rnrnrnrn```rn严重: Context initialization <em>failed</em>rnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helpKeywordController': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.service.UserService com.tz.crm.controller.HelpKeywordController.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.dao.UserDao com.tz.crm.service.UserService.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:292)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:381)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:293)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5077)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5591)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)rn at java.util.concurrent.FutureTask.run(FutureTask.java:266)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)rn at java.lang.Thread.run(Thread.java:748)rnCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.service.UserService com.tz.crm.controller.HelpKeywordController.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.dao.UserDao com.tz.crm.service.UserService.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)rn at org.springframework.beans.factory.annotation.<em>Injection</em>Metadata.inject(<em>Injection</em>Metadata.java:87)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)rn ... 22 morernCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.dao.UserDao com.tz.crm.service.UserService.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:292)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1014)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:957)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:855)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:480)rn ... 24 morernCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.dao.UserDao com.tz.crm.service.UserService.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)rn at org.springframework.beans.factory.annotation.<em>Injection</em>Metadata.inject(<em>Injection</em>Metadata.java:87)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)rn ... 35 morernCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:292)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1014)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:957)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:855)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:480)rn ... 37 morernCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)rn at org.springframework.beans.factory.annotation.<em>Injection</em>Metadata.inject(<em>Injection</em>Metadata.java:87)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)rn ... 48 morernCaused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:967)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:855)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:480)rn ... 50 morernrn三月 18, 2019 10:22:52 上午 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 'helpKeywordController': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.service.UserService com.tz.crm.controller.HelpKeywordController.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.dao.UserDao com.tz.crm.service.UserService.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:292)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:381)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:293)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5077)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5591)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)rn at java.util.concurrent.FutureTask.run(FutureTask.java:266)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)rn at java.lang.Thread.run(Thread.java:748)rnCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.service.UserService com.tz.crm.controller.HelpKeywordController.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.dao.UserDao com.tz.crm.service.UserService.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)rn at org.springframework.beans.factory.annotation.<em>Injection</em>Metadata.inject(<em>Injection</em>Metadata.java:87)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)rn ... 22 morernCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.dao.UserDao com.tz.crm.service.UserService.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:292)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1014)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:957)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:855)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:480)rn ... 24 morernCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tz.crm.dao.UserDao com.tz.crm.service.UserService.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)rn at org.springframework.beans.factory.annotation.<em>Injection</em>Metadata.inject(<em>Injection</em>Metadata.java:87)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)rn ... 35 morernCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:292)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1014)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:957)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:855)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:480)rn ... 37 morernCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jdbc.core.JdbcTemplate com.tz.crm.dao.UserDao.template; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)rn at org.springframework.beans.factory.annotation.<em>Injection</em>Metadata.inject(<em>Injection</em>Metadata.java:87)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)rn ... 48 morernCaused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.jdbc.core.JdbcTemplate] is defined: expected single matching bean but found 2: org.springframework.jdbc.core.JdbcTemplate#0,org.springframework.jdbc.core.JdbcTemplate#1rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:967)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:855)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:480)rn ... 50 morernrn三月 18, 2019 10:22:52 上午 org.apache.catalina.core.StandardContext startInternalrn严重: One or more listeners <em>failed</em> to start. Full details will be found in the appropriate container log filern三月 18, 2019 10:22:52 上午 org.apache.catalina.core.StandardContext startInternalrn严重: Context [/ssmvc] startup <em>failed</em> due to previous errorsrn三月 18, 2019 10:22:52 上午 org.apache.catalina.core.ApplicationContext logrn信息: Closing <em>Spring</em> root WebApplicationContextrn三月 18, 2019 10:22:52 上午 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["http-bio-8080"]rn三月 18, 2019 10:22:52 上午 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["ajp-bio-8009"]rn三月 18, 2019 10:22:52 上午 org.apache.catalina.startup.Catalina startrn信息: Server startup in 3053 msrn```rnrn搜索了很多帖子,试了各种方法,但是一直没有解决实际问题。rnrndao层rnrnrn```rnimport org.springframework.beans.factory.annotation.Autowired;rnimport org.springframework.jdbc.core.BeanPropertyRowMapper;rnimport org.springframework.jdbc.core.JdbcTemplate;rnimport org.springframework.jdbc.core.RowMapper;rnimport org.springframework.stereotype.Component;rnimport org.springframework.stereotype.Repository;rnrnimport com.tz.crm.bean.HelpKeyword;rnrnrn@Repositoryrnpublic class UserDao rn rnrn @Autowiredrn private JdbcTemplate template;rn rn public List getList() rn String sql="select help_keyword_id id,name from help_keyword";rn RowMapper rowMapper=new BeanPropertyRowMapper(HelpKeyword.class);rn List list = template.query(sql, rowMapper);rn return list;rn rn rnrn```rnrnservice层rnrnrn```rnpackage com.tz.crm.service;rnrnimport java.util.List;rnrnimport org.springframework.beans.factory.annotation.Autowired;rnimport org.springframework.stereotype.Service;rnimport org.springframework.transaction.annotation.Transactional;rnrnimport com.tz.crm.bean.HelpKeyword;rnimport com.tz.crm.dao.UserDao;rnrn@Servicernpublic class UserService rn rn @Autowiredrn private UserDao dao;rnrn @Transactional(readOnly=true)rn public List getList() rn rn return dao.getList();rn rnrnrn```rncontroller层rnrnrn```rnpackage com.tz.crm.controller;rnrnimport java.util.List;rnrnimport org.springframework.beans.factory.annotation.Autowired;rnimport org.springframework.stereotype.Controller;rnimport org.springframework.web.bind.annotation.RequestMapping;rnimport org.springframework.web.bind.annotation.ResponseBody;rnrnimport com.tz.crm.bean.HelpKeyword;rnimport com.tz.crm.service.UserService;rnrn@Controllerrn@RequestMapping("/keyword")rnpublic class HelpKeywordController rn rn @Autowiredrn private UserService userService;rnrn @RequestMapping("/list")rn @ResponseBodyrn public List getList() rn return userService.getList();rn rnrnrn```rnspring配置文件rnrnrn```rnrnrnrnrnrnrn rn rn rn rnrnrnrnrnrnrnrnrn rnrnrnrnrnrnrnrn rnrn```rnrnmvc配置文件rnrnrn```rnrnrnrnrnrnrnrnrnrn```rnrn连接的数据库是mysql自带的mysql数据库中的help_keyword表rnrn现在手足无措不知道怎么往下进行,希望各位大佬出手相助。rnrn万分感谢!
spring注入失败 Injection of resource dependencies failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'visitCopyRightSubjectService': <em>Injection</em> of <em>resource</em> <em>dependencies</em> <em>failed</em>; nested exception is org.springframewor
Spring 启动报错 Injection of resource dependencies failed; 求大神帮忙 !
信息: Initializing <em>Spring</em> root WebApplicationContext 2014-10-28 16:37:58 (ContextLoader.java:319) - Co
解决:Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.
今天调试项目代码,出现的引<em>resource</em>的<em>Injection</em><em>报错</em>,查原因查了好长时间才找到,现在这里总结一下,以免以后忘掉以及给大家参考。 最终原因是循环调用,也就是我要注入的那个类也调用了我当前在写的类; <em>报错</em>大致内容入下: Error starting ApplicationContext. To display the auto-configuration report re...
Injection of resource dependencies failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customBlackL
Spring项目@Resource注解报错
在spring项目中引入@Resource注解的时候,有红色下划线错误,而且输入注解的时候不能出现自动代码补全,出现警告。 解决方式:进入build-path找到JRE,把JRE改成自己的Java环境即可。记得保存
Spring配置文件在tomcat启动时报错
[b]大家好,我tomcat在<em>启动时</em>,报这个错:[/b]rn[code=text]org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext <em>resource</em> [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext <em>resource</em> [/WEB-INF/applicationContext.xml][/code]rnrn[b]web.xml中是这样写的:[/b]rn[code=text]rnrn rn index.jsprn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rnrn rn contextConfigLocationrn rn classpath:beans.xmlrn rn rn rn struts2rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rnrn rn struts2rn /*rn rn rnrn[/code]rnrn[b]spring的beans.xml位于src目录下,里面内容是这样的:[/b][code=text]rnrn rn rnrnrn rn rn classpath:jdbc.propertiesrn rn rnrn rn rn rn rn rn rn rn rnrn rn rn rn rn com.uds.porn rn rn rn rn rn rn org.hibernate.dialect.SQLServerDialectrn rn truern threadrn updatern rn rn rn rn rn rn rnrnrn[/code]
Failed to load resource
[img=http://my.csdn.net/uploads/201206/12/1339497778_9625.jpg][/img]rnapcehe下,出现这个问题,iis没有问题,知道的指教下。
Dependencies 报错之 版本号
Dependencies <em>报错</em>之 版本号在依赖库中添加依赖的时候回因为版本号的不符,会这样的一个错误this support library should not use a different version (xx) than the compilesdkversion (xx),这个原因很明显是因为版本不符所导致的,虽不影响使用但是特别丑,那么如何解决呢?解决方式 方式一: 将你的以来版本库调
系统启动时提示【FAILED】
Activating Swap partition:swapong:/dev/hdb9:Invalid argument [FAILED]rnrnrn我的swap应该是在/dev/hdb10,所以才<em>报错</em>吧?rnrnrn可是怎么更改使错误不出现呢?
java异常-Injection of resource dependencies failed
1、实现类的注解没有加2、如果是加了的@Resource换成@Autowired试试。
Injection of resource dependencies failed; nested exception is org.springframework.beans.factory
异常信息 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService’: <em>Injection</em> of <em>resource</em> <em>dependencies</em> <em>failed</em>; nested exception is org.springf...
解决Error creating bean with name XXX: Injection of resource dependencies failed
解决SSH整合时出现的错误,错误如上图所示。 该错误是因为Mybatis中需要的注解,spring没有检测到此注解信息。 错误原因可能有四处: (1):web.xml没有配置spring的上下文环境和核心的监听器 解决办法: 在web.xml添加 &amp;amp;amp;lt;!--spring的上下文--&amp;amp;amp;gt; &amp;amp;amp;lt;context-param&amp;amp;amp;gt; &amp;amp;amp;lt;param-name&amp
Spring MVC项目 Injection of autowired dependencies failed错误
大家好! 我在 <em>Spring</em> MVC 3.0 的一个项目里面,现在Console窗口报注入失败的错误如下: 严重: Context initialization <em>failed</em> org.springfr
spring dependencies 依赖包 扩展包
一共三个包,看清楚了,三个全下,然后解压就行.
Error creating bean with name 'adminLoginJCaptchaFilter': Injection of resource
ERROR org.springframework.web.context.ContextLoader - Context initialization <em>failed</em>rnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adminLoginJCaptchaFilter': <em>Injection</em> of <em>resource</em> <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'captchaService' defined in class path <em>resource</em> [applicationContext.xml]: Instantiation of bean <em>failed</em>; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.octo.captcha.service.image.DefaultManageableImageCaptchaService]: Constructor threw exception; nested exception is java.lang.SecurityException: class "org.apache.commons.collections.FastHashMap"'s signer information does not match signer information of other classes in the same packagern 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:4887)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)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.deployWAR(HostConfig.java:977)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:542)rn at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1462)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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)rn at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)rn at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1445)rn at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:677)rn at org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:435)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)rn at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)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)rnCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'captchaService' defined in class path <em>resource</em> [applicationContext.xml]: Instantiation of bean <em>failed</em>; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.octo.captcha.service.image.DefaultManageableImageCaptchaService]: Constructor threw exception; nested exception is java.lang.SecurityException: class "org.apache.commons.collections.FastHashMap"'s signer information does not match signer information of other classes in the same packagern at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)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: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.<em>Injection</em>Metadata$InjectedElement.inject(<em>Injection</em>Metadata.java:147)rn at org.springframework.beans.factory.annotation.<em>Injection</em>Metadata.inject(<em>Injection</em>Metadata.java:84)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:297)rn ... 53 morernCaused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.octo.captcha.service.image.DefaultManageableImageCaptchaService]: Constructor threw exception; nested exception is java.lang.SecurityException: class "org.apache.commons.collections.FastHashMap"'s signer information does not match signer information of other classes in the same packagern at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)rn at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)rn ... 66 morernCaused by: java.lang.SecurityException: class "org.apache.commons.collections.FastHashMap"'s signer information does not match signer information of other classes in the same packagern at java.lang.ClassLoader.checkCerts(ClassLoader.java:776)rn at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:615)rn at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)rn at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2888)rn at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1172)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn at com.octo.captcha.service.captchastore.FastHashMapCaptchaStore.rn帮我看看是什么问题
Spring 项目使用 @Resource 注解报错问题
原因 1:javax.annotation 包不存在。JDK 中含有这个包,正常情况不会有这个问题。 解决:导入 jar 包。 原因 2:存在多个 jar 包导致 jar 包冲突。JDK 自带一个 jar 包,再导入1个 jar 包,或者服务器 lib 中有这个 jar 包,会导致 jar 包冲突。 解决:去掉一个 jar 包。 原因 3:Java9 及以上的声明注解类与之前版本不同 J...
Spring项目@Resource报错以及无法导入
<em>Spring</em>项目@Resource<em>报错</em>以及无法导入 自动导入找不到包 @Resource是jdk的注释 原因是maven配置porm.xml中未导入java注释需要的包 &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;javax.annotation&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;jsr250-api&amp;lt;/ar...
Failed to load resource: net::ERR_EMPTY_RESPONSE
java导入execl的时候浏览器出现[color=#FF0000]Failed to load <em>resource</em>: net::ERR_EMPTY_RESPONSE[/color]这个错误,rn我导入execl的时间很长,这个错误是一分钟后页面出现的,怎么解决这个错误啊?
Spring+MyBatis整合开发时 Injection of autowired dependencies failed的错误解决方法
Python转java开发,瞬间感觉框架好难受,总是不注意注解,找的很辛苦,读次文章,一定一定请注意注解,,,,,   今天在调试代码时,<em>Spring</em>启动后出现了错误:<em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>;……的错误。 详细的错误信息如下: Exception in thread &quot;main&quot; org.springframework.bea...
Injection of autowired dependencies failed; 的解决办法!
1.检查你项目中有没有多余的@Autowired   如果你引入了多余(或者错误的)的@Autowired就会导致以上错误     一般这个错误都是发生在controll,dao,service中,看看你的注解是否有多余或者错误 Dao—@Repository Service—@Service Controller—@Controller        2.检查是否配置路径不正确...
Error creating bean with name 'controller':Injection of resource dependencies failed
使用@Resource注入,启动tomcat时抛出异常(解决办法在异常信息下面): org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adminController': <em>Injection</em> of <em>resource</em> <em>dependencies</em> <em>failed</em>; nested
SSH注解式Injection of autowired dependencies failed求教
严重: Exception sending context initialized event to listener instance of class org.springframework.we
Error creating bean with name 'userController': Injection of resource dependencies failed
1.翻译过来也就是注入失败。注解没有起作用2.再翻看后面由什么导致的    Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/ persist ence/Table由上述<em>报错</em>可知:缺少javax/ persist ence/Table,需要...
spring 提交事务 报错 Batch update failed: 0
org.hibernate.jdbc.BatchFailedException: Batch update <em>failed</em>: 0rn at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:57)rn at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)rn at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:68)rn at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)rn at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)rn at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:92)rn at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87)rn at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2367)rn at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)rn at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)rn at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)rn at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)rn at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)rn at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)rn at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)rn at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)rn at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)rn at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)rn at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)rn at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:656)rn at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)rn at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)rn at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:394)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)rn at com.oms.services.impl.OmsStkoutHdServiceImpl$$EnhancerByCGLIB$$749e26b7.ExpTrackingUpdateNumber()rn at com.oms.struts.action.stk.StkOutHdAction.bookingForm(StkOutHdAction.java:242)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 com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:453)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:292)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:255)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.oms.struts.interceptor.InformationInterceptor.intercept(InformationInterceptor.java:85)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.rest.RestActionInvocation.invoke(RestActionInvocation.java:139)rn at com.opensymphony.xwork2.DefaultActionProxy.execute(DefaultActionProxy.java:147)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn
linux安装mysql rpm包,Failed dependencies
linux是CentOS5.4rnrn[root@localhost mysql]# rpm -Uvh MySQL-server-advanced-5.5.8-1.rhel5.x86_64.rpm rnerror: Failed <em>dependencies</em>:rn libaio.so.1()(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libc.so.6()(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libc.so.6(GLIBC_2.2.5)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libc.so.6(GLIBC_2.3)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libc.so.6(GLIBC_2.3.4)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libc.so.6(GLIBC_2.4)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libcrypt.so.1()(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libcrypt.so.1(GLIBC_2.2.5)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libdl.so.2()(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libdl.so.2(GLIBC_2.2.5)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libm.so.6()(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libm.so.6(GLIBC_2.2.5)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libpthread.so.0()(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libpthread.so.0(GLIBC_2.2.5)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn libpthread.so.0(GLIBC_2.3.2)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn librt.so.1()(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rn librt.so.1(GLIBC_2.2.5)(64bit) is needed by MySQL-server-advanced-5.5.8-1.rhel5.x86_64rnrn这些缺少的so,去CentOS安装包里只能找到一部分。我安装那些包后,装MYSQL还是报这些错误。rn另外,我用yum安装这些so也不成功。rnrn[root@localhost mysql]# yum install glibcrnLoaded plugins: fastestmirrorrnLoading mirror speeds from cached hostfilernSetting up Install ProcessrnNothing to dornrn如果使用--nodeps来安装RPM,肯定是不行的。安装上了对运行会有影响。rnrnrn求支招!3Q
启动时报错
以下是具体的<em>报错</em>内容。rnrnrn事件类型: 信息rn事件来源: Application Popuprn事件种类: 无rn事件 ID: 26rn日期: 2003-8-2rn事件: 10:10:50rn用户: N/Arn计算机: ZHUJYrn描述:rn弹出应用程序: 服务控制管理器 : 在系统<em>启动时</em>至少有一个服务或驱动程序产生错误。详细信息,请使用事件查看器查看事件日志。rnrnrn有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。rn
ajax报错-2146697208,the download of the specified resource has failed
[code=JScript]function ajax_request(url, data, callback, context)rnrn var request = ajax_create_request(context);rn var async = typeof(callback) == 'function';rn rn if(async) request.obj.onreadystatechange = function()rn rn if(request.obj.readyState == 4)rn callback(new ajax_response(request));rn rn rn request.obj.open('POST', url, async);rn request.obj.send(data);[/code]rnrn上面是代码,在send那里<em>报错</em>rn在IE7下报的是:the download of the specified <em>resource</em> has <em>failed</em>rn在IE8下报的错却是: 系统错误: -2146697208。rnrn最奇怪的是,有时<em>报错</em>,有时又正常rn在本地测试机又没发现任何问题。rnrn有人有类似的问题或经验吗?请帮忙指点。
pyleus build 时提示 Failed to install dependencies
我打算在centos中使用pyleus build一个topology,需要用到MySQLdb模块,在系统中已经安装了MySQLdb,可以import,而且也在requirements.txt中写了MySQLdb,但是当我用pyleus build的时候提示错误:rnpyleus build: error: [VirtualenvError] Failed to install <em>dependencies</em> for this topology. Run with --verbose for detailed info.rn求帮助!急
Dubbo环境下Injection of resource dependencies failed; nested exception is org.springframewo错误
Error creating bean with name ‘basItemController’: <em>Injection</em> of <em>resource</em> <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of...
spring&Injection of resource dependencies failed&Bean named 'generalDao' must be of type [com.oracle
今天编写小程序时又遇到问题了。。。。 spring 操作数据库 extends hibernateDaoSupport 类,先测试加入 sessionFactory ,正常 然后又加入 transaction ,<em>报错</em> <em>Injection</em> of <em>resource</em> <em>dependencies</em> <em>failed</em>&Bean named 'generalDao' must be of type [com.or
Spring MVC 配置报错: Error creating bean with name 'userController': Injection of resource dependencies
今天做了一个简单的项目,用spring+springMVC实现用户的CRUD,看似简单的一个小demo,却在配置上浪费了不少时间,首先看一下目录结构:项目要求使用jdbcTemplate配置数据源,下面附上spring的配置文件和springMVC的配置文件,分别如下:applicationContext.xml如下:spring-MVC.xml配置如下:web.xml配置如下:&amp;lt;?xml ...
Error creating bean with name 'userController': Injection of resource dependencies failed;
-
系统启动时,spring校验webservice报错
因为是联调系统,对方的webservice有时不会启动,这时我启动项目时就会<em>报错</em>。rnrn如何让spring在<em>启动时</em>,不去校验webservice连接。
急求spring高手。启动时报错
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenernorg.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext <em>resource</em> [/WEB-INF/classes/applicationContext.xml]; nested exception is java.net.UnknownHostException: springnCaused by: java.net.UnknownHostException: springn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)n at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)n at java.net.Socket.connect(Socket.java:529)n at java.net.Socket.connect(Socket.java:478)n at sun.net.NetworkClient.doConnect(NetworkClient.java:163)n at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)n at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)n at sun.net.www.http.HttpClient.(HttpClient.java:233)n at sun.net.www.http.HttpClient.New(HttpClient.java:306)n at sun.net.www.http.HttpClient.New(HttpClient.java:323)n at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)n at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)n at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)n at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)n at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)n at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1315)n at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1282)n at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:283)n at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1194)n at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1090)n at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1003)n at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)n at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)n at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)n at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)n at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)n at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)n at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)n at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)n at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:405)n at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)n at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)n at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)n at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)n at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:123)n at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:91)n at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)n at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:292)n at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)n at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)n at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)n at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)n at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)n at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)n at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)n at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)n at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)n at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)n at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)n at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)n at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)n at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)n at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)n at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)n at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)n at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)n at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)n at org.apache.catalina.core.StandardService.start(StandardService.java:516)n at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)n at org.apache.catalina.startup.Catalina.start(Catalina.java:566)n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)n at java.lang.reflect.Method.invoke(Method.java:597)n at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)n at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)n2015-5-12 15:39:02 org.apache.catalina.core.StandardContext startn严重: Error listenerStart
springboot出现 Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
springboot出现Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]],也就是tomcat启动不起来, 原因:可能是 servlet-api-x.x.jar冲突,原来我在pom.xml中配置了         javax.servlet     jsp-api     2.0    
spring启动时
1.把配置xml文件转换成<em>resource</em>。<em>resource</em>的转换是先通过ResourcePatternResolver来解析可识别格式的配置文件的路径 (如&quot;classpath*:&quot;等),如果没有指定格式,默认会按照类路径的资源来处理。 2.利用XmlBeanDefinitionReader完成对xml的解析,将xml Resource里定义的bean对象转换成统一的BeanDefinit...
Spring Boot dependencies与dependencyManagement的区别(
从零开始学<em>Spring</em> Boot视频教程,该课程主要讲解<em>Spring</em> Boot技术,理论+实战、一步一步带你入门 。《<em>Spring</em> Boot 自定义Starter 》3节;《<em>Spring</em> Boot WebSocket单聊+群聊》6节;《<em>Spring</em> Boot MyBatis 注解篇》12节;《<em>Spring</em> Boot MyBatis XML篇》 8节。
Error creating bean with name 'sysUserController': Injection of resource dependencies failed; nested
控制台输出的错误: 四月 07, 2017 7:19:55 下午 org.apache.catalina.core.ApplicationContext log 信息: Initializing <em>Spring</em> FrameworkServlet ‘spring’ 四月 07, 2017 7:19:55 下午 org.springframework.web.servlet.DispatcherSe
eclipse下启动tomcat时,报错Injection of resource dependencies failed; nested exception
在eclipse 下通过server启动tomcat工程时,报找不到注入依赖org/apache/ibatis/cursor/Cursor,直接在tomcat中运行打好的war就不会<em>报错</em>。 可是,我项
BUG记录-springMVC返回JSON报错:Handler processing failed; nested exception is java.lang.StackOverflowError
新入职一家,,遇到一个JSON返回一直报堆栈溢出的错误.,框架配置过了JSON解析器,所有写法无误.于是纠结了三个小时没找到问题所在. 后经排查是JAR使用不一致导致! 被坑了,非常郁闷! JSON解析器被要求用封装的工具类,这个工具类用的JSON包为:import net.sf.json.JSONArray; import net.sf.json.JSONObject;实体继承的基类所用的JSO...
Tomcat启动时报错,Failed to start component [StandardEngine[Catalina].StandardHost[loc
tomcat启动<em>报错</em>,[img=https://img-bbs.csdn.net/upload/201709/05/1504579210_620633.png][/img][img=https://img-bbs.csdn.net/upload/201709/05/1504579216_602209.png][/img][img=https://img-bbs.csdn.net/upload/201709/05/1504579222_177213.png][/img]rn这是我的包rnrn[img=https://img-bbs.csdn.net/upload/201709/05/1504579245_618313.png][/img]rn这是报的错
@Resource 注解报错问题
使用@Resource注解,在import时<em>报错</em>rn[img=https://img-bbs.csdn.net/upload/201710/24/1508814935_951442.png][/img]rn其<em>报错</em>内容为rn[img=https://img-bbs.csdn.net/upload/201710/24/1508814864_175683.png][/img]rnrn使用环境为IDEA,JDK版本为9.rn新手刚刚开始学习注解,希望大家帮忙答疑解惑一下[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/83.gif][/img]
appium+eclipse+appiumAndroidContactsTest.java 报错The resource 'appium' is not
appium已启动、rnappium-doctor 也都没有问题、rn用的是安卓模拟器rn[img=https://img-bbs.csdn.net/upload/201606/14/1465873617_997226.png][/img]rnrn[img=https://img-bbs.csdn.net/upload/201606/14/1465873628_993883.png][/img]rnrn[img=https://img-bbs.csdn.net/upload/201606/14/1465873639_275700.png][/img]rnrnrnrnimport org.junit.After;rnimport org.junit.Before;rnimport org.junit.Test;rnimport org.openqa.selenium.*;rnimport org.openqa.selenium.interactions.HasTouchScreen;rnimport org.openqa.selenium.interactions.TouchScreen;rnimport org.openqa.selenium.remote.CapabilityType;rnimport org.openqa.selenium.remote.DesiredCapabilities;rnimport org.openqa.selenium.remote.RemoteTouchScreen;rnimport org.openqa.selenium.remote.RemoteWebDriver;rnimport java.io.File;rnimport java.net.URL;rnimport java.util.List;rnrnpublic class AndroidContactsTest rn private WebDriver driver;rnrn @Beforern public void setUp() throws Exception rn // set up appiumrn File classpathRoot = new File(System.getProperty("user.dir"));rn rn File appDir = new File(classpathRoot, "apps");rn File app = new File(appDir, "ContactManager.apk");rn DesiredCapabilities capabilities = new DesiredCapabilities();rn capabilities.setCapability("device","Android");rn capabilities.setCapability(CapabilityType.BROWSER_NAME, "");rn rn capabilities.setCapability(CapabilityType.VERSION, "4.2.2");rn rn capabilities.setCapability(CapabilityType.PLATFORM, "WINDOWS");rn capabilities.setCapability("app", app.getAbsolutePath());rn capabilities.setCapability("app-package", "com.example.android.contactmanager");rn capabilities.setCapability("app-activity", ".ContactManager");rn driver = new SwipeableWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);rn rnrn @Afterrn public void tearDown() throws Exception rn driver.quit();rn rnrn @Testrn public void addContact()rn WebElement el = driver.findElement(By.name("Add Contact"));rn el.click();rn List textFieldsList = driver.findElements(By.tagName("textfield"));rn textFieldsList.get(0).sendKeys("wangyang");rn textFieldsList.get(1).sendKeys("18872573204");rn textFieldsList.get(2).sendKeys("stephenwang@gmail.com");rn driver.findElement(By.name("Save")).click();rn rnrn public class SwipeableWebDriver extends RemoteWebDriver implements HasTouchScreen rn private RemoteTouchScreen touch;rnrn public SwipeableWebDriver(URL remoteAddress, Capabilities desiredCapabilities) rn super(remoteAddress, desiredCapabilities);rn touch = new RemoteTouchScreen(getExecuteMethod());rn rnrn public TouchScreen getTouch() rn return touch;rn rn rn
Spring入门之Resource案例
直接看样例: package com.tutorialspoint; import java.io.IOException; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework....
Springresource的相关配置
首先,先上两张图: 下面,就根据这四种load方式来做实验 1.classpath实现load //1.类 package com.imooc.<em>resource</em>; import java.io.IOException; import org.springframework.beans.BeansException; import org.springframework.co...
第一次搭建ssm,一直报注入失败
报的错 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userCont
关于spring依赖注入注解问题
@Resource是按ByName自动注入,BeanFactory查找容器中全部bean,找出其中id属性与属性同名的bean进行注入。 对于这句不是很懂 "找出其中id属性与属性同名的bean进行注
Injection of autowired dependencies failed;
1. 给Con [2014-10-14 11:47:28,881] Artifact application-mobile-web:war exploded: Deploy took 6,384 milliseconds 11:47:29,842 ERROR org.springframework.web.servlet.DispatcherServlet (457) - Contex
Error creating bean with name 'menuController': Injection of autowired dependency……
出现了一大串错误,Error creating bean with name 'userController': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>。。。。。  查了代码后发现,原来是在UserServiceImpl中忘了写一句话@Service("userService"),以至于因此导致一系列错误。 在控制层调用业务层,必须在业
Sping-20(Spring注解-Resource)
深入浅出讲解<em>Spring</em>原理与技术实战
spring Resource管理详解
spring Resource管理详解 运行环境:eclipse 构建工具:maven 不提供maven构建,maven用来解决jar包的依赖
九、Spring注解:@Resource
一、@Resource注解 ​ @Resource注解与@Autowired注解一样,都可以用来自动装配bean。但我们要知道,@Autowired注解是属于<em>Spring</em>的,而@Resource注解是Java规范。@Resource注解也可以用在字段或者setter方法上。 写在字段上 @Resource private ColorService colorService; 或者 ...
Spring的@Resource注解及原理
package cn.xhx.spring.di.annotation.test; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; imp
spring resource code
多个关键字请用空格分隔,最多填写5个。点击右侧Tag快速添加 多个关键字请用空格分隔,最多填写5个。点击右侧Tag快速添加
SpringMVC的Service互相循环调用错误: org.springframework.beans.factory.BeanCurrentlyInCreationException
以下是<em>报错</em>的内容,我的项目这种错误的导致原因:是我在<em>Spring</em>MVC的Service中的两个Service进行了互相调用,即servce1中注解了service2,又在service2中注解了service1,并且调用了方法,这里就会产生错误,大概是循环调用的原因,类似于数据库表的自关联循环产生的错误,即自己调用的方法里还有自己,造成无限循环。解决办法:比较简单的对数据库的操作直接注解Model层
SSM 整合发生异常:Error creating bean with name 'itemsController': Injection of resource dependencies fail
运行SSM工程发生异常: Error creating bean with name 'itemsController': <em>Injection</em> of <em>resource</em> <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qua
BeanCreationException:Injection of autowired dependencies failed异常的解决思路
关于BeanCreationException:<em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>异常的解决思路 总结一下今天下午的研究成果,整合SSM项目时候,最后测试从库中查询数据报了一个这样的异常,很是让我头大,足足百度+stackoverflow了一下午,愣是没有研究出成果,最后快要吃饭的时候静下心来想一想,到底是哪里出了问题,从最开始的流程去想
Error creating bean with name 'barchService': Injection of resource dependencies failed
这个问题困扰我一个小时,项目使用的是Sringmvc maven mybatis ,在service成使用@Service 老<em>报错</em>误创建bean失败,习惯性的去看错误,搞了半天,真是日*够了,看日志只看一半,直接上代码,记录下。[o.m.s.mapper.ClassPathMapperScanner:158] - No MyBatis mapper was found in '[com.bug.d...
Spring源码阅读之Resource接口
org.springframework.core.io.Resource接口是<em>Spring</em>中的一个重要接口,正如名字所示的一样,它是用来描述资源的接口。 Resource接口继承自InputStreamSource接口,这个接口只有一个方法getInputStream public interface InputStreamSource { /** * Return an
@Resource注入spring失败
普通的class中的代码rn1、@Resourcern private AdBannerService bannerService;rnrnAdBannerService为接口 提供了AdBannerServiceImpl实现类rnrn2、spring的配置:是一次性把整个包都注入的rn[color=#FF0000] rn [/color]rn运行List adBanners=bannerService.adBannerList();rn就会报NullpointException错误,框架是SSI的rn不知道为什么会注入失败?求解!rnrn rn
spring @Resource注解的困惑
使用@Resource注解,在jsp中不能获取。rn我有一个公共类Page,交给spring管理rn@Componentrnpublic class Page rn......rnrnrnAction 也交给spring管理rn@Controller @Scope("prototype")rnpublic class TrainCheckTypeAction extends ActionSupport rn@Resourcernprivate Page page;rnrnpublic String searchTypeByPage() throws Exceptionrn...rnpage = trainServiceImpl.getCheckTypeByPage(pageNo, Constant.PAGE_SIZE);rn....rnrnrn在对应的jsp调用rn$page.pageBar 没有发现值 在中的Value Stack 也看到page的变量rnrn只能写page的get和set方法,难道@Resource在这里无效?rn还有一个疑问就是Resource是不是只能用于类的注解?rn
spring中Resource和Component注解
NULL 博文链接:https://cdxs2.iteye.com/blog/1941621
spring @Resource 注入问题
servlet引入@Resource<em>报错</em>:rnjavax.naming.NameNotFoundException: Name testService is not bound in this Contextrn at org.apache.naming.NamingContext.lookup(NamingContext.java:770)rn at org.apache.naming.NamingContext.lookup(NamingContext.java:153)rn at org.apache.catalina.util.DefaultAnnotationProcessor.lookupFieldResource(DefaultAnnotationProcessor.java:276)rn at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:187)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1153)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:102)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)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:859)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)rn代码如下:rnservlet :rnpublic class testServlet extends HttpServlet rn private static final long serialVersionUID = -4732854077814547321L;rn @Resource(name = TestService.IOC_BEAN_ID)rn private TestService test1;rnservice:rnpublic interface TestService rn public static final String IOC_BEAN_ID = "testService";rn public Map getSysdate();rnrnrn@Service(TestService.IOC_BEAN_ID)rnpublic class TestServiceImpl extends BaseService implements TestServicernrn public Map getSysdate()rn Map sysdateMap = (Map) ibatisClient.queryForObject("test.test", "");rn return sysdateMap;rn rnrnspring 配置:rnrn
tomcat启动报错Injection of autowired dependencies failed
tomcat启动<em>报错</em>:Injectjion of autowired <em>dependencies</em> <em>failed</em> 环境: 操作系统:centos6.5 tomcat: 7.0.52 jdk:openjdk 1.8.101 <em>报错</em>背景: 将原有的tomcat环境移植到新的服务器后,tomcat无法正常启动,<em>报错</em>如下: 严重: StandardWrapper.Throw
Error creating bean with name 'XXX': Injection of autowired dependencies failed解决办法
使用<em>Spring</em>MVC框架,这条完整的error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountCtrl': <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is org.spr
关于springboot注入jpa接口失败
-
新手请教:spring boot 中@Autowired注解无法自动注入的错误。
学习spring boot,遇到@Autowired总是<em>报错</em>,自己折腾了半天也没搞定,请大家帮忙看看: 这是controller和dao的调用和目录结构 这是一个简单的dao,参照书上写的 结果<em>启动时</em>
spring boot 集成mybatis报错
Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate'
关于spring的注解@Resource
@Servicernpublic class UserServiceImpl implements UserService 这样写相当于在xml这样配置rnrnrnrn那如果我加一个@Resource注解在类中呢:rn@Servicernpublic class UserServiceImpl implements UserService rn @Resource()rn private UserDao userDao;rn rn rn 如果我给<em>resource</em>指定了name属性比如name=“abc”,对应的xml文件是怎么样的rn 都不明白name属性指的是xml中bean的id 或者是其中的的name或是refrn rn 希望知道的能说一下,谢谢!rn
报错not overflow on horizontal.assert failed!
今天写的程序运行时报这个错,请问下怎么回事?
Debug Assertion failed报错
程序的debug版在运行时出现Debug Assertion <em>failed</em>!<em>报错</em>,因为一时找不出错在那里,rn请问有其它的方法使debug版在运行时不出Debug Assertion <em>failed</em>!<em>报错</em>
Nginx报错 malloc failed
Nginx 版本:1.9.6.1 一开始那几天还好,最近几天经常报内存不足的错误,而且是不稳定重现,rnrn[img=https://img-bbs.csdn.net/upload/201510/30/1446171676_265204.png][/img]rnrn贴上配置,服务器配置:16核32G windows 2008rnrn#user nobody;rnworker_processes 8;rn#error_log logs/error.log;rn#error_log logs/error.log notice;rn#error_log logs/error.log info;rn#pid logs/nginx.pid;rnevents rnworker_connections 32768;rnrnhttp rninclude mime.types;rndefault_type application/octet-stream;rn#log_format main '$remote_addr - $remote_user [$time_local] "$request" 'rn# '$status $body_bytes_sent "$http_referer" 'rn# '"$http_user_agent" "$http_x_forwarded_for"';rnrn#access_log logs/access.log main;rn#large_client_header_buffers 8 128k;rnrnrn # 设定请求缓冲 设置开始 rnrn #server_names_hash_bucket_size 128;rnrn client_header_buffer_size 128k;rnrn large_client_header_buffers 4 256k;rnrn client_max_body_size 64M; # 允许客户端请求的最大单文件字节数rnrn client_body_buffer_size 128k; # 缓冲区代理缓冲用户端请求的最大字节数rnrn # 设定请求缓冲 设置结束rnrn #log_format main '$remote_addr - $remote_user [$time_local] "$request" 'rnrn # '$status $body_bytes_sent "$http_referer" 'rnrn # '"$http_user_agent" "$http_x_forwarded_for"';rnrn #access_log logs/access.log main;rnrn sendfile on;rnrn tcp_nopush on;rnrn #keepalive_timeout 0;rnrn keepalive_timeout 150;rnrn tcp_nodelay on;rnrn fastcgi_connect_timeout 300;rnrn fastcgi_send_timeout 300;rnrn fastcgi_read_timeout 300;rnrn fastcgi_buffer_size 64k;rnrn fastcgi_buffers 4 64k;rnrn fastcgi_busy_buffers_size 128k;rnrn fastcgi_temp_file_write_size 128k;rnrn ##cache 配置 ##rnrn proxy_connect_timeout 600;#nginx 跟后端服务器连接超时时间 ( 代理连接超时 )rnrn proxy_read_timeout 600;# 连接成功后,后端服务器响应时间 ( 代理接收超时 )rnrn proxy_send_timeout 600; # 后端服务器数据回传时间 ( 代理发送超时 )rnrn proxy_buffer_size 64M; # 设置代理服务器( nginx )保存用户头信息的缓冲区大小rnrn proxy_buffers 4 64M; #proxy_buffers 缓冲区,网页平均在 32k 以下的话,这样设置rnrn proxy_busy_buffers_size 128M;# 高负荷下缓冲大小( proxy_buffers*2 )rnrn proxy_temp_file_write_size 200m;# 设定缓存文件夹大小,大于这个值,将从 upstream 服务器传rnrnrn #gzip 压缩开始rnrn gzip on;rnrn gzip_min_length 1k;rnrn gzip_buffers 4 8k;rnrn gzip_http_version 1.1;rnrn gzip_types text/plain image/jpg image/jpeg image/gif image/png;rnrn gzip_disable "MSIE [1-6]\.";rnrn #gzip 压缩结束rnrn #服务器的集群 rn upstream ********* rn #ip_hash;rn #服务器集群名字 rn #server 172.16.21.13:8081 weight=1;#服务器配置 weight是权重的意思,权重越大,分配的概率越大。 rn server 10.251.148.218 max_fails=3 fail_timeout=30s weight=10; rn server 10.144.229.83 max_fails=3 fail_timeout=30s weight=10;rn server 10.163.200.195 max_fails=3 fail_timeout=30s weight=15;rn server 10.163.226.8 max_fails=3 fail_timeout=30s weight=20;rnrn #server 10.165.59.203:8001 max_fails=3 fail_timeout=30s weight=10; rn #server 10.165.59.203:8002 max_fails=3 fail_timeout=30s weight=10; rn #server 10.165.59.203:8003 max_fails=3 fail_timeout=30s weight=10; rn rnrnserver rn listen 80;rn server_name *********rn #charset koi8-r;rnrn access_log logs/host.access.log ;rnrn if ($http_user_agent ~* "Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|Yahoo! Slurp|Yahoo! Slurp China|MSNBot|ia_archiver|Tomato Bot") rn return 403; rn rnrnrn location / rn proxy_pass ********* rn proxy_redirect default; rnrn # 传递真实 ip 给分发服务器 获取真实访问用户 iprn # 在后台可以使用 HttpContext.Current.Request.Headers["X-Real-IP"]rnrn proxy_set_header Host $host;rn proxy_set_header X-Real-IP $remote_addr;rn proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;rn rnrn # 请求包含 Admin 带头的所有文件rnrn location /Content rnrn proxy_pass *********rnrn proxy_redirect off;rnrn proxy_set_header Host $host;rnrn # 请求静态文件设置rnrn proxy_cache_valid 200 302 1d;# 设置 http 状态码为 200,302 缓存时间为 1 小时rnrn proxy_cache_valid 301 1d;# 设置失期时间,为 30 天rnrn proxy_cache_valid any 1h;rnrn expires 30d;rnrn # 传递真实 ip 给分发服务器rnrn proxy_set_header X-Real-IP $remote_addr;rnrn rnrn # 请求包含 Resource 带头的所有文件rnrn location /Resource rnrn proxy_pass *********rnrn proxy_redirect off;rnrn proxy_set_header Host $host;rnrn # 请求静态文件设置rnrn proxy_cache_valid 200 302 1d;# 设置 http 状态码为 200,302 缓存时间为 1 小时rnrn proxy_cache_valid 301 1d;# 设置失期时间,为 30 天rnrn proxy_cache_valid any 1m;rnrn expires 30d;rnrn rnrnrn #error_page 404 /404.html;rnrn # redirect server error pages to the static page /50x.htmlrn #rn error_page 500 502 503 504 /50x.html;rn #location = /50x.html rn # root html;rn #rnrn # proxy the PHP scripts to Apache listening on 127.0.0.1:80rn #rn #location ~ \.php$ rn # proxy_pass http://127.0.0.1;rn #rnrn # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000rn #rn #location ~ \.php$ rn # root html;rn # fastcgi_pass 127.0.0.1:9000;rn # fastcgi_index index.php;rn # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;rn # include fastcgi_params;rn #rnrn # deny access to .htaccess files, if Apache's document rootrn # concurs with nginx's onern #rn #location ~ /\.ht rn # deny all;rn #rnrnrnrn# another virtual host using mix of IP-, name-, and port-based configurationrn#rn#server rn# listen 8000;rn# listen somename:8080;rn# server_name somename alias another.alias;rnrn# location / rn# root html;rn# index index.html index.htm;rn# rn#rnrnrn# HTTPS serverrn#rn#server rn# listen 443;rn# server_name localhost;rnrn# ssl on;rn# ssl_certificate cert.pem;rn# ssl_certificate_key cert.key;rnrn# ssl_session_timeout 5m;rnrn# ssl_protocols SSLv2 SSLv3 TLSv1;rn# ssl_ciphers HIGH:!aNULL:!MD5;rn# ssl_prefer_server_ciphers on;rnrn# location / rn# root html;rn# index index.html index.htm;rn# rn#
Dependencies
Dependencies An open-source modern Dependency Walker https://github.com/lucasg/Dependencies
Spring 启动报错 Injection of autowired dependencies failed 求大神帮忙 !
2013-10-11 18:45:02,944 - org.springframework.web.context.ContextLoader -3 ERROR org.springframewor
启动服务器如下错误求助求助
-
Injection of autowired dependencies failed
在做<em>Spring</em> MVC 项目时,当运行单元测试时会报这样的错: <em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>。。。。 解决方法是将DAO、Service层的@Repository,@Service注释去掉。
Injection of resource dependencies failed; nested exception is org.springframework.beans.factor的报错解决
<em>报错</em>信息 org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘adminLoginAction’: <em>Injection</em> of <em>resource</em> <em>dependencies</em> <em>failed</em>; nested exception is org.springframework.beans...
异常:Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentExceptio
这个异常是出现在注入配置文件中配置好的属性时<em>报错</em>的:<em>Injection</em> of autowired <em>dependencies</em> <em>failed</em>; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'my.name' in value "${my.name}"此时配置文件默认的名称为:a
又出错 the download specified resource has failed
程序调用了DLL,DLL中用了XMLDocument。在工程文件夹中可以正常运行。单独运行,则<em>报错</em>:the download specified <em>resource</em> has <em>failed</em> line 0rnrn有用CoInitialize(NULL)。rnrnrn请问大侠,是怎么回事?哪里的错误?
Resource Manager Creation Failed: Result Code = 0x8004d01c
我在启动我的sql后 在sql日志中会出现这个提示rnResource Manager Creation Failed: Result Code = 0x8004d01crn请问高手们这个是什么提示 什么地方出了问题 该怎么解决
Android resource linking failed怎么解决?
build的时候出问题了,之前还是可以build成功的
tomcat启动时报错
我用的MyEclipse8.0 tomcat5.5.25 rn之前一直是好的 这2天开始就会在启动服务的时候报一下错:rn[code=Java]rn严重: IOException while loading persisted sessions: java.io.EOFExceptionrnjava.io.EOFExceptionrn at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)rn at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)rn at java.io.ObjectInputStream.readStreamHeader(Unknown Source)rn at java.io.ObjectInputStream.(Unknown Source)rn at org.apache.catalina.util.CustomObjectInputStream.(CustomObjectInputStream.java:58)rn at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:362)rn at org.apache.catalina.session.StandardManager.load(StandardManager.java:321)rn at org.apache.catalina.session.StandardManager.start(StandardManager.java:637)rn at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:432)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4160)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:448)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:552)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)rn2010-11-3 11:10:57 org.apache.catalina.session.StandardManager startrn严重: Exception loading sessions from persistent storagernjava.io.EOFExceptionrn at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)rn at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)rn at java.io.ObjectInputStream.readStreamHeader(Unknown Source)rn at java.io.ObjectInputStream.(Unknown Source)rn at org.apache.catalina.util.CustomObjectInputStream.(CustomObjectInputStream.java:58)rn at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:362)rn at org.apache.catalina.session.StandardManager.load(StandardManager.java:321)rn at org.apache.catalina.session.StandardManager.start(StandardManager.java:637)rn at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:432)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4160)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:448)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:552)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)rnlog4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).rn[/code]rn网上资料说是rn[code=Java]解决办法:将tomcat6.0\work\Catalina\localhost\peam\SESSIONS.ser删除。如果正常关闭服务端,该文件是自动删除的。[/code]rn但是在我的tomcat的localhost下 没有他说的这个文件 rn这该怎么解决?? 先谢谢了!!!
c教程 山大课件及考验复习资料下载
c教程可使同学们很快对c语言从熟悉到掌握 相关下载链接:[url=//download.csdn.net/download/shisanxing/3357624?utm_source=bbsseo]//download.csdn.net/download/shisanxing/3357624?utm_source=bbsseo[/url]
成绩管理系统下载
可以输入学生成绩信息查询删除等功能,可以做课程设计 相关下载链接:[url=//download.csdn.net/download/u011120612/5640111?utm_source=bbsseo]//download.csdn.net/download/u011120612/5640111?utm_source=bbsseo[/url]
Flying Saucer ,简单实用的pdf转换api下载
Flying Saucer ,简单实用的pdf转换api 相关下载链接:[url=//download.csdn.net/download/cjh910/6507801?utm_source=bbsseo]//download.csdn.net/download/cjh910/6507801?utm_source=bbsseo[/url]
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件
我们是很有底线的