Results 1 to 2 of 2

Thread: JpaExceptionTranslatorAspect advice not applied in Spring 3.0

  1. #1
    Join Date
    Mar 2009
    Posts
    7

    Default JpaExceptionTranslatorAspect advice not applied in Spring 3.0

    Hi,

    First, congratulations to the Spring guys for the recent 3.0 release.

    I have been converting our app to use Spring 3.0.0.RELEASE and the only real issue I've run into are some warnings from aspectj:

    Code:
    [WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
    [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]
    I'm not worried about the Mocking advice right now, but the JpaExceptionTranslatorAspect means that my exception handling code is all broken.

    I have a Generic DAO that uses generics to support a number of different DAO instances. I've played with putting @Repository on a number of different interfaces or classes, but I'm just guessing at this point.

    It's probably because the JpaExceptionTranslatorAspect acts on an EntityManager, but the type of entitymanager in my code is a proxy to org.hibernate.ejb.EntityManagerImpl

    Is this a known issue with Spring 3.0, or have I made a mistake in my configuration?

    Is there a setting to make the entitymanager not be a proxy?

    thanks in advance,
    m

  2. #2
    Join Date
    Mar 2009
    Posts
    7

    Default

    OK, maybe this is something that wasn't working in 2.5.6 and now works in 3.0 and that explains the different behavior.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •