Error creating bean with name 'sqlMapClient' defined in ServletContext resource [/WEB-INF/config/common/applicationContext.xml]: Unsatisfied dependency expressed through bean property 'configLocation':
Cannot find class [com.neusoft.gmsbs.gms.user.dao.impl.UserDAOImpl] for bean with name 'userDAO' defined in ServletContext resource [/WEB-INF/config/gms/user/applicationContext_user.xml]; nested exception is java.lang.ClassNotFoundException:
以上是错误信息提示,我在applicationContext_user.xml中的配置是
<?xml version="1.0" encoding="UTF-8"?>
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
">
scope="prototype">
路径都没错,我检查了N遍,这个问题让我研究了2天了,请求高手给我解脱!
No bean named 'dataSource' is defined
这里不是显示没有定义dataSource吗?
楼主是东软的哈,sqlMapClient这个依赖的bean不能实例化。
Unsatisfied dependency expressed through bean property 'configLocation':
提示的很清楚呀。。没有注入这个bean:sqlMapClient
你把代码传上来吧,依赖的jar就不需要了,只要源代码
你把错误的代码贴全一些吧,感觉还有一部分没有显示
我说的是异常信息
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.web.core.conn.SQLManager#0': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.springframework.jdbc.core.JdbcTemplate com.web.core.conn.SQLManager.jdbctemplate; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.web.sch.action.QueryAction] for bean with name 'queryAction' defined in file [D:\Tomcat 7.0\webapps\xjcweb\WEB-INF\classes\spring\applicationContext-datasource.xml]; nested exception is java.lang.ClassNotFoundException: com.web.sch.action.QueryAction
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:286)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1064)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.springframework.jdbc.core.JdbcTemplate com.web.core.conn.SQLManager.jdbctemplate; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.web.sch.action.QueryAction] for bean with name 'queryAction' defined in file [D:\Tomcat 7.0\webapps\xjcweb\WEB-INF\classes\spring\applicationContext-datasource.xml]; nested exception is java.lang.ClassNotFoundException: com.web.sch.action.QueryAction
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:507)