Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Spring3、hibernate、dbcp和derby连接问题_Java_Spring_Hibernate_Derby - Fatal编程技术网

Java Spring3、hibernate、dbcp和derby连接问题

Java Spring3、hibernate、dbcp和derby连接问题,java,spring,hibernate,derby,Java,Spring,Hibernate,Derby,我使用的是Spring3、Hibernate3、Derby10.11和ApacheDBCP2。我正在使用dao(TestDao)创建hibernate会话工厂。这把刀是自动接线的。 当IOC试图实例化dao时,我遇到了以下异常 package com.springtest.dao; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.S

我使用的是Spring3、Hibernate3、Derby10.11和ApacheDBCP2。我正在使用dao(TestDao)创建hibernate会话工厂。这把刀是自动接线的。 当IOC试图实例化dao时,我遇到了以下异常

package com.springtest.dao;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import com.springtest.entities.HotelAvailability;

@Repository
public class TestDao { 

@Autowired
@Qualifier("sessionFactory")
private SessionFactory sessionFactory;

public List<HotelAvailability> getHotels() {
    Session session = sessionFactory.getCurrentSession();
    session.beginTransaction();
    Criteria criteria = session.createCriteria(HotelAvailability.class);
    List<HotelAvailability> hotels = (List<HotelAvailability>) criteria.list();
    session.getTransaction().commit();
    return hotels;
}
package com.springtest.dao;
导入java.util.List;
导入org.hibernate.Criteria;
导入org.hibernate.Session;
导入org.hibernate.SessionFactory;
导入org.springframework.beans.factory.annotation.Autowired;
导入org.springframework.beans.factory.annotation.Qualifier;
导入org.springframework.stereotype.Repository;
导入com.springtest.entities.HotelAvailability;
@存储库
公共类TestDao{
@自动连线
@限定符(“会话工厂”)
私人会话工厂会话工厂;
公共酒店名单{
Session Session=sessionFactory.getCurrentSession();
session.beginTransaction();
条件=session.createCriteria(HotelAvailability.class);
List hotels=(List)criteria.List();
session.getTransaction().commit();
返回酒店;
}
applicationcontext.xml

   <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:mvc="http://www.springframework.org/schema/mvc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:p="http://www.springframework.org/schema/p"
   xmlns:tx="http://www.springframework.org/schema/tx"   
   xmlns:context="http://www.springframework.org/schema/context"
   xmlns:aop="http://www.springframework.org/schema/aop"       
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
   http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
   http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
  http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">

<context:component-scan base-package="com.springtest"/>

<bean id="datasource" class="org.apache.commons.dbcp2.BasicDataSource">
    <property name="driverClassName" value="org.apache.derby.jdbc.ClientDriver"/>
    <property name="url" value="jdbc:derby://localhost:1527/home/atanu/derby/testdb"/>
    <property name="initialSize" value="2"/>
    <property name="maxTotal" value="5"/>
     <!-- <property name="username" value="atanu"/>
    <property name="password" value="passw0rd"/> -->
</bean>

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
    <property name="dataSource" ref="datasource"/>
    <property name="packagesToScan"  value="com.springtest.entities"/>
    <property name="hibernateProperties">
        <props>
            <prop key="dialect">
                org.hibernate.dialect.DerbyDialect
            </prop>
        </props>
    </property>
</bean>

<aop:aspectj-autoproxy/>
 <aop:config>
     <aop:pointcut expression="execution(* com.springtest.di.Party.getType(..))" 
             id="mypointcut"/>
     <aop:aspect ref="myadvice">

         <!-- <aop:before method="before" pointcut-ref="mypointcut"/>
         <aop:after method="after" pointcut-ref="mypointcut"/> -->
         <aop:around method="watchPartyCreation" pointcut-ref="mypointcut" />

     </aop:aspect>
     <aop:aspect>
         <aop:declare-parents types-matching="com.springtest.di.Party+aopParent" 
             implement-interface="com.springtest.di.AopParent"
             default-impl="com.springtest.di.AopParentImpl"/>
     </aop:aspect>
 </aop:config>

</beans>

org.hibernate.dialogue.derbydialogue
例外情况:

    Sep 19, 2015 1:53:00 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1904b13: startup date [Sat Sep 19 13:53:00 IST 2015]; root of context hierarchy
Sep 19, 2015 1:53:00 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [applicationContext.xml]
Sep 19, 2015 1:53:00 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4336ff: defining beans [person,testDI,compositeBean,myadvice,organization,testDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,datasource,sessionFactory,org.springframework.aop.config.internalAutoProxyCreator,mypointcut,org.springframework.aop.aspectj.AspectJPointcutAdvisor#0,org.springframework.aop.aspectj.DeclareParentsAdvisor#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
Sep 19, 2015 1:53:01 PM org.hibernate.cfg.annotations.Version <clinit>
INFO: Hibernate Annotations 3.3.0.GA
Sep 19, 2015 1:53:01 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2 cr4
Sep 19, 2015 1:53:01 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Sep 19, 2015 1:53:01 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
Sep 19, 2015 1:53:01 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Sep 19, 2015 1:53:01 PM org.hibernate.cfg.AnnotationBinder bindClass
INFO: Binding entity from annotated class: com.springtest.entities.HotelAvailability
Sep 19, 2015 1:53:01 PM org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity com.springtest.entities.HotelAvailability on table HOTELAVAILABILITY
Sep 19, 2015 1:53:01 PM org.hibernate.cfg.AnnotationConfiguration secondPassCompile
INFO: Hibernate Validator not found: ignoring
Sep 19, 2015 1:53:01 PM org.springframework.orm.hibernate3.LocalSessionFactoryBean buildSessionFactory
INFO: Building new Hibernate SessionFactory
Sep 19, 2015 1:53:01 PM org.hibernate.cfg.AnnotationConfiguration secondPassCompile
INFO: Hibernate Validator not found: ignoring
Sep 19, 2015 1:53:01 PM org.hibernate.connection.ConnectionProviderFactory newConnectionProvider
INFO: Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
Sep 19, 2015 1:53:01 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4336ff: defining beans [person,testDI,compositeBean,myadvice,organization,testDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,datasource,sessionFactory,org.springframework.aop.config.internalAutoProxyCreator,mypointcut,org.springframework.aop.aspectj.AspectJPointcutAdvisor#0,org.springframework.aop.aspectj.DeclareParentsAdvisor#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDI': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.springtest.dao.TestDao com.springtest.di.TestDI.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.springtest.dao.TestDao.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.apache.derby.client.net.NetConnection.isValid(I)Z
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1146)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)
    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 com.springtest.di.TestDI.loadSpringContext(TestDI.java:21)
    at com.springtest.di.TestDI.main(TestDI.java:32)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.springtest.dao.TestDao com.springtest.di.TestDI.dao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.springtest.dao.TestDao.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.apache.derby.client.net.NetConnection.isValid(I)Z
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:517)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:286)
    ... 14 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.springtest.dao.TestDao.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.apache.derby.client.net.NetConnection.isValid(I)Z
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1146)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:912)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:855)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:770)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:489)
    ... 16 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.springtest.dao.TestDao.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.apache.derby.client.net.NetConnection.isValid(I)Z
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:517)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:286)
    ... 27 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.apache.derby.client.net.NetConnection.isValid(I)Z
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:912)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:855)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:770)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:489)
    ... 29 more
Caused by: java.lang.AbstractMethodError: org.apache.derby.client.net.NetConnection.isValid(I)Z
    at org.apache.commons.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:918)
    at org.apache.commons.dbcp2.PoolableConnection.validate(PoolableConnection.java:283)
    at org.apache.commons.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:357)
    at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2307)
    at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2290)
    at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2039)
    at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533)
    at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:83)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216)
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:863)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:782)
    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:188)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
    ... 39 more
2015年9月19日下午1:53:00 org.springframework.context.support.AbstractApplicationContext prepareRefresh
信息:刷新org.springframework.context.support。ClassPathXmlApplicationContext@1904b13:启动日期[Sat Sep 19 13:53:00 IST 2015];上下文层次结构的根
2015年9月19日下午1:53:00 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息:从类路径资源[applicationContext.XML]加载XMLBean定义
2015年9月19日下午1:53:00 org.springframework.beans.factory.support.DefaultListableBeanFactory预实例化单例
信息:在org.springframework.beans.factory.support中预实例化单例。DefaultListableBeanFactory@4336ff:定义bean[person,testDI,compositeBean,myadvice,organization,testDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotaOnProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,datasource,sessionFactory,org.springframework.aop.config.internalAutoProxyCreator,mypointcut,org.springframework.aop.aspectj.aspectj.DeclareParentsAdvisor#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor];工厂层次结构的根
2015年9月19日下午1:53:01 org.hibernate.cfg.annotations.Version
信息:Hibernate Annotations 3.3.0.GA
2015年9月19日下午1:53:01 org.hibernate.cfg.Environment
信息:Hibernate 3.2 cr4
2015年9月19日下午1:53:01 org.hibernate.cfg.Environment
信息:找不到hibernate.properties
2015年9月19日下午1:53:01 org.hibernate.cfg.Environment buildBytecodeProvider
信息:字节码提供程序名称:cglib
2015年9月19日下午1:53:01 org.hibernate.cfg.Environment
信息:使用JDK1.4java.sql.Timestamp处理
2015年9月19日下午1:53:01 org.hibernate.cfg.AnnotationBinder bindClass
信息:来自注释类的绑定实体:com.springtest.entities.HotelAvailability
2015年9月19日下午1:53:01 org.hibernate.cfg.annotations.EntityBinder bindTable
信息:绑定实体com.springtest.entities.HotelAvailability表上的HotelAvailability
2015年9月19日下午1:53:01 org.hibernate.cfg.AnnotationConfiguration secondPassCompile
信息:未找到Hibernate验证程序:忽略
2015年9月19日下午1:53:01 org.springframework.orm.hibernate3.LocalSessionFactoryBean buildSessionFactory
信息:构建新的Hibernate SessionFactory
2015年9月19日下午1:53:01 org.hibernate.cfg.AnnotationConfiguration secondPassCompile
信息:未找到Hibernate验证程序:忽略
2015年9月19日下午1:53:01 org.hibernate.connection.ConnectionProviderFactory newConnectionProvider
信息:初始化连接提供程序:org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
2015年9月19日下午1:53:01 org.springframework.beans.factory.support.DefaultSingletonBean注册销毁Singleton
信息:在org.springframework.beans.factory.support中销毁单例。DefaultListableBeanFactory@4336ff:定义bean[person,testDI,compositeBean,myadvice,organization,testDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotaOnProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,datasource,sessionFactory,org.springframework.aop.config.internalAutoProxyCreator,mypointcut,org.springframework.aop.aspectj.aspectj.DeclareParentsAdvisor#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor];工厂层次结构的根
线程“main”中出现异常org.springframework.beans.factory.BeanCreationException:创建名为“testDI”的bean时出错:自动关联依赖项注入失败;嵌套异常为org.springframework.beans.factory.BeanCreationException:无法自动关联字段:com.springtest.dao.TestDao com.springtest.di.testDI.dao;嵌套异常为org.springframework.beans.factory.BeanCreationException:创建名为“testDao”的bean时出错:自动关联依赖项注入失败;嵌套异常为org.springframework.beans.factory.BeanCreationException:无法自动关联字段:private org.hibernate.SessionFactory com.springtest.dao.testDao.SessionFactory;嵌套异常为org.springframework.beans.factory比恩克雷酒店