Announcement Announcement Module
Collapse
No announcement yet.
NoSuchMethodError : TransactionInterceptor.setTransactionManagerBeanNa me Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NoSuchMethodError : TransactionInterceptor.setTransactionManagerBeanNa me

    Hi.I tried to integrate spring-data into my project and got next error

    Caused by: java.lang.NoSuchMethodError: org.springframework.transaction.interceptor.Transa ctionInterceptor.setTransactionManagerBeanName(Lja va/lang/StringV
    at org.springframework.data.repository.core.support.T ransactionalRepositoryProxyPostProcessor.(Transact ionalRepositoryProxyPostProcessor.java:76)
    at org.springframework.data.repository.core.support.T ransactionalRepositoryFactoryBeanSupport.setBeanFa ctory(TransactionalRepositoryFactoryBeanSupport.ja va:98)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeAwareMethods(Abst ractAutowireCapableBeanFactory.java:1439)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1408)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519) ... 63 more
    I tried digging into the code and the source and I can't find the reasons why. The internal implementation doesn't show any missing methods. I have checked my jars but I didn't find any old dependencies. JPARepository

    Code:
    public interface MyDemoRepository extends JpaRepository {}
    HTML Code:
    <jpa:repositories base-package="demo.repositories" transaction-manager-ref="txManager" />
    
    <beans:bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">  
         <beans:property name="dataSource" ref="DataSource"/>    
    </beans:bean>        
    
    <beans:bean id="DataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">            
        <beans:property name="driverClassName">            
             <beans:value>com.mysql.jdbc.Driver</beans:value> 
        </beans:property>       
        <beans:property name="url">            
            <beans:value>${db_url}</beans:value>        
        </beans:property> 
        <beans:property name="username">            
            <beans:value>${db_user}</beans:value>        
        </beans:property> 
        <beans:property name="password">            
            <beans:value>${db_pwd}</beans:value>        
        </beans:property> 
     </beans:bean>
    Does anyone have any ideas where I'm going wrong?Thanks

  • #2
    springframework-version 3.0.5.RELEASE
    hibernate.version 3.6.0.Final
    pring-data-jpa 1.0.2.RELEASE
    hibernate-jpa-2.0-api 1.0.0.Final

    Comment

    Working...
    X