Announcement Announcement Module
Collapse
No announcement yet.
<tx:annotation-driven transaction-manager="transactionManager"/> error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <tx:annotation-driven transaction-manager="transactionManager"/> error

    Hello everybody, I have a problem with using <tx:annotation-driven transaction-manager="transactionManager"/> well it's generating an error"Error occured processing XML 'org/springframework/aop/config/AopNamespaceUtils'", i made sure to include the needed jars (aopalliance, spring-tx,spring-aop,spring-context) and to have the same version, but this error persists and as consequence, i can't use the annotation to inject my bean of the sessionFactory(@Autowired ) , i don't really know what to do? here i post my configuration file of spring:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xmlns:context="http://www.springframework.org/schema/context"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    	http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"
        
       >
    
    
    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url" value="jdbc:mysql://localhost:3306/mirath"/>
    <property name="username" value="root"/>
    <property name="password" value="allah1"/>
    </bean>
    
    <bean name="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
    <property name="dataSource" ref="dataSource"/>
    <property name="annotatedClasses">
    <list>
    <value>mirath.entity.Administrateur</value>
    <value>mirath.entity.Utilisateur</value>
    <value>mirath.entity.Problematique</value>
    <value>mirath.entity.Heritier</value>
    <value>mirath.entity.Gestion</value>
    </list>
    
    </property>
    <property name="hibernateProperties">
    <props>
    <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
    </props>
    </property>
    </bean>
    
    <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory" ref="sessionFactory"/>
    </bean>
    <tx:annotation-driven transaction-manager="transactionManager"/>
    <context:annotation-config />
    <context:component-scan base-package="mirath.entity"/>
    
    </beans>
    I'm using hibernate3 and spring3.
    Thank you for your help.
    Last edited by Arwa Samti; Mar 27th, 2012, 09:48 AM.
Working...
X