当运行项目时抛出这样的异常:Error creating bean with name 'DAOProxy' defined in class path resource [appcontext.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [appcontext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [appcontext.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 [appcontext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not load JDBC driver class [com.microsoft.jdbc.sqlserver.SQLServerDriver]; nested exception is java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver我的配置文件为appcontext.xml,内容如下:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE beans PUBLIC "-//SPRING/DTD BEAN/EN"
                "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
  <bean id="dataSource"
    class="org.springframework.jdbc.datasource.DriverManagerDataSource"
    destroy-method="close">
    <property name="driverClassName">
      <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
    </property>
    <property name="url">
      <value>jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=DB_JXC_Data</value>
    </property>
    <property name="username">
      <value>sa</value>
    </property>
    <property name="password">
      <value>820205</value>
    </property>
  </bean>
  <bean id="sessionFactory"
        class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    <property name="dataSource">
      <ref local="dataSource"/>
    </property>
    <property name="mappingResources">
      <list>
        <value>appjxc/model/obj_medicine.hbm.xml</value>
        <value>appjxc/model/Obj_gys.hbm.xml</value>
        <value>appjxc/model/Obj_client.hbm.xml</value>
        <value>appjxc/model/Obj_SellMain.hbm.xml</value>
        <value>appjxc/model/Obj_SellDetaile.hbm.xml</value>
        <value>appjxc/model/Obj_BuyMain.hbm.xml</value>
        <value>appjxc/model/Obj_BuyDetaile.hbm.xml</value>
        <value>appjxc/model/Obj_Stock.hbm.xml</value>
        <value>appjxc/model/Obj_SellDetaileTh.hbm.xml</value>
        <value>appjxc/model/Obj_UserName.hbm.xml</value>
      </list>
    </property>
    <property name="hibernateProperties">
      <props>
        <prop key="hibernate.show_sql">true</prop>
      </props>
    </property>
  </bean>
  <bean id="transactionManager"
        class="org.springframework.orm.hibernate3.HibernateTransactionManager">
     <property name="sessionFactory">
       <ref local="sessionFactory"/>
     </property>
  </bean>
  <bean id="DAO" class="appjxc.dao.DaoSupport">
    <property name="sessionFactory">
      <ref local="sessionFactory"/>
    </property>
  </bean>  <bean id="DAOProxy"
        class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    <property name="transactionManager">
      <ref bean="transactionManager"/>
    </property>
    <property name="target">
      <ref local="DAO"/>
    </property>
    <property name="proxyTargetClass" value="true"/>
    <property name="transactionAttributes">
      <props>
        <prop key="insert*">PROPAGATION_REQUIRED</prop>
        <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
      </props>
    </property>
  </bean></beans>