I';我在集成spring和hibernate时出错

I';我在集成spring和hibernate时出错,spring,hibernate,Spring,Hibernate,applicationContext.xml Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'stude

applicationContext.xml

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'studentDao' while setting bean property 'studentDao'; 
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentDao' defined in class path resource [applicationContext.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 [applicationContext.xml]: Initialization of bean failed; 
nested exception is java.lang.NoClassDefFoundError: javax/transaction/TransactionManager

Student.hbm.xml
org.hibernate.dialogue.mysqldialogue
假的
student.xml

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
    default-lazy-init="true">

    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
        <property name="url" value="jdbc:mysql://localhost:3306/Java2all"/>
        <property name="username" value="root"/>
        <property name="password" value="root"/>
    </bean>

    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="mappingResources">
            <list>
                <value>Student.hbm.xml</value>
            </list>
        </property>
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
                <prop key="hibernate.show_sql">false</prop>
            </props>
        </property>
    </bean>

    <bean id="studentDao" class="com.dao.impl.StudentDaoHibernate">
        <property name="sessionFactory" ref="sessionFactory" />
    </bean>

    <bean id="studentManager" class="com.manager.StudentManagerImpl">
        <property name="studentDao" ref="studentDao" />
    </bean>
</beans>


类路径中很可能缺少“JTA-X.X.jar”

请让你的问题可读,没有人会花时间去尝试和理解这一点。为了得到高质量的答案,提高可读性你真的花时间去阅读stacktrace吗
java.lang.NoClassDefFoundError:javax/transaction/TransactionManager
非常清楚。您缺少依赖项。
<!DOCTYPE hibernate-mapping PUBLIC 
     "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
     "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
    <class name ="com.springhibnernate.Student" table="Student">
        <id name="id" type="java.lang.Long">
            <generator class="native"/>
        </id>
        <property name="name" type="string">
            <column name="name" length="40"/>
        </property>
    </class>
</hibernate-mapping>