0 Replies Latest reply on Mar 4, 2009 9:21 PM by Shah din sani

    Problem when trying to configure transaction manager

    Shah din sani Newbie

      Hi,

      I am creating a simple application using JSF, Spring and Hibernate. Everything works fine and now i am trying to configure transaction manager from Spring. Following are the steps that i took.

      Spring Context file

      <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
       <property name="transactionManagerName" value="java:/TransactionManager"/>
       <property name="userTransactionName" value="UserTransaction"/>
       </bean>
      
       <bean id="transactionAdvisor" class="org.springframework.aop.support.DefaultPointcutAdvisor" >
       <constructor-arg index="0">
       <ref local="transactionPointcut"/>
       </constructor-arg>
       <constructor-arg index="1">
       <ref local="transactionAdvice"/>
       </constructor-arg>
       </bean>
       <bean id="transactionPointcut" class="org.springframework.aop.support.NameMatchMethodPointcut" >
       <property name="mappedNames">
       <list>
       <value>*</value>
       </list>
       </property>
       </bean>
       <bean id="transactionAdvice" class="org.springframework.transaction.interceptor.TransactionInterceptor" >
       <property name="transactionManager" ref="transactionManager" />
       <property name="transactionAttributeSource">
       <value>
       service.DeptBean.*=PROPAGATION_REQUIRED, -CommandException
       service.EmployBean.*=PROPAGATION_REQUIRED, -CommandException
       </value>
       </property>
       </bean>
      


      Next i included cglib-2.1.3.jar and asm-3.1.jar in my application path. Now when i deploy my application i am getting following error. Please advice.
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employBean' defined in ServletContext resource [/WEB-INF/config/appContext.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)