Announcement Announcement Module
Collapse
No announcement yet.
NoClassDefFoundError: javax/transaction/TransactionManager Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NoClassDefFoundError: javax/transaction/TransactionManager

    Hello,

    As I tried to test my spring framework, I ran into the error below:

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory' defined in file [C:\eclipse\eclipse3.1\workspace\Lob2Portal\WEB-INF\appContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/transaction/TransactionManager
    java.lang.NoClassDefFoundError: javax/transaction/TransactionManager

    I searched for the error on the internet but couldn't find the answer. Could anyone please help me with this? Below is my context.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="sessionFactory" class="org.springframework.orm.hibernate.LocalSess ionFactoryBean">
    <property name="configLocation"> <value>C:/eclipse/eclipse3.1/workspace/Lob2Portal/WEB-INF/hibernate.cfg.xml</value>
    </property>
    </bean>

    <bean id="transactionManager" class="org.springframework.orm.hibernate.Hibernate TransactionManager">
    <property name="sessionFactory">
    <ref bean="sessionFactory"/>
    </property>
    </bean>

    <bean id="hibernateDAO" class="com.rhi.domain.common.data.hibernate.Hibern ateDAO">
    <property name="sessionFactory">
    <ref bean="sessionFactory"/>
    </property>
    </bean>
    <bean id="educationDAO" class="com.rhi.domain.common.data.hibernate.Educat ionDAO">
    <property name="sessionFactory">
    <ref bean="sessionFactory"/>
    </property>
    </bean>
    <bean id="logonInfoDAO" class="com.rhi.domain.common.data.hibernate.LogonI nfoDAO">
    <property name="sessionFactory">
    <ref bean="sessionFactory"/>
    </property>
    </bean>
    <bean id="registrationAO" class="com.rhi.domain.registration.app.Registratio nAO">
    <property name="educationDAO"><ref bean="educationDAO"/></property>
    <property name="logonInfoDAO"><ref bean="logonInfoDAO"/></property>
    </bean>
    </beans>

    thank you for your help.

    Bes regards,
    Sahra

    P.S. btw, the search result page of this web site is not found.

  • #2
    You need to include jta.jar. It can be found in the lib/j2ee directory.

    Comment


    • #3
      Thanks for the tip. The jar was in hibernate lib dir.

      Best regards,
      Sahra

      Comment

      Working...
      X