求大牛帮忙 sping3.2和Hibernate4.1.8整合出问题了
在applicationContext.xml 配置数据源没有错误 但是把数据源注入到SessionFactory就报错了
下面是错误信息
2013-1-13 21:04:59 org.springframework.context.support.AbstractApplicationContext prepareRefresh
 信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@998b08: startup date [Sun Jan 13 21:04:59 CST 2013]; root of context hierarchy
 2013-1-13 21:05:00 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
 信息: Loading XML bean definitions from class path resource [applicationContext.xml]
 2013-1-13 21:05:01 org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
 信息: Loading properties file from class path resource [dbcp.properties]
 2013-1-13 21:05:01 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
 信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1ad98ef: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,datasource,SessionFactory]; root of factory hierarchy
 2013-1-13 21:05:02 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
 信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1ad98ef: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,datasource,SessionFactory]; root of factory hierarchy
 Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SessionFactory' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dataSource' is defined
  at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)
  at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1391)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
  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:589)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
  at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
  at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
  at test.test1.main(test1.java:17)
 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dataSource' is defined
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:549)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
  at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)
  ... 15 more我翻译了一下 说不支持dataSource 可是我单独配置一个dataSource的时候没有问题 但是加上SessionFactory就报这个错误了
求大牛帮帮我 谢谢了 我在线等啊hibernatesping