日期:2014-05-19  浏览次数:20692 次

SSH合成加入spring后一直报错不止 第一次用S2帮忙一下谢谢了
信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@139eeda: defining beans [org.springframework.aop.config.internalAutoProxyCreator,dataSource,sessionFactory,tManager,txAdvice,methodPoint,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,loginDao,loginBo,loginAction,registerAction]; root of factory hierarchy
2012-9-19 14:38:22 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@139eeda: defining beans [org.springframework.aop.config.internalAutoProxyCreator,dataSource,sessionFactory,tManager,txAdvice,methodPoint,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,loginDao,loginBo,loginAction,registerAction]; root of factory hierarchy
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginDao' defined in class path resource [applicationContext-beans.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sf'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext-common.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [applicationContext-common.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'configLocation' of bean class [org.springframework.jdbc.datasource.DriverManagerDataSource]: Bean property 'configLocation' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.