Announcement Announcement Module
Collapse
No announcement yet.
LTW breaks repositories Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • LTW breaks repositories

    Hi there,

    I just tried to enable load time weaving to inject beans into hibernate managed beans. Since I put <context:load-time-weaver /> into the configuration file, I get following error:

    Code:
    Caused by: java.lang.NoSuchMethodError: org.springframework.transaction.aspectj.AbstractTransactionAspect.invokeWithinTransaction(Ljava/lang/reflect/Method;Ljava/lang/Class;Lorg/springframework/transaction/interceptor/TransactionAspectSupport$InvocationCallback;)Ljava/lang/Object;
        at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)
        at org.springframework.data.jpa.repository.support.SimpleJpaRepository.setLockMetadataProvider(SimpleJpaRepository.java:102)
        at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:88)
        at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:67)
        at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:147)
        at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:162)
        at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:44)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
    This error only occurrs while spring tries to create my JPA repositories, all other beans are not affected.

    When I remove <context:load-time-weaver /> from my configuration, everything works fine but Injection into my entities does not happen.

    So, what have I done wrong?

    Regards
    Rene

  • #2
    What jars and versions of jars do you have on your classpath? It's possible you are mixing different versions of Spring jars.

    Also, please note that we are currently in the process of moving to stackoverflow.com for our forums. If you're still having this issue please consider asking it again at http://stackoverflow.com using the #spring tag and someone should be able to help you. Thanks!

    Comment

    Working...
    X