Announcement Announcement Module
Collapse
No announcement yet.
"Not an managed type" after upgrading Spring Data JPA and Hibernate Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • "Not an managed type" after upgrading Spring Data JPA and Hibernate

    I upgraded to the most recent Spring Data JPA and Hibernate libraries yesterday.

    After upgrading I get "Not a managed type" errors during creation of Jpa repositories.

    All of my classes are listed in persistence.xml files. I tried using "packagesToScan" property on entity manager factory.

    I use multiple persistence units, multiple entity manager factories, and was using multiple persistence unit managers.

    All of this worked fine using the older version of Spring Data JPA and has caused me no problems for the last year.

    I only get this error after upgrade.

    The error seems to be caused by the order in which file imports are processed in the application context.

    I have a multi-module maven project. The error happened in the first module that uses multiple persistence units. After rearranging the imports in the main spring context file the error no longer happened in that module.

    Now the build gets farther but I get the same error in another module that has more imports and no amount of rearranging them seems to help.

    I have tried using depends-on property on beans. That makes no difference.


    This is a super frustrating error. I don't want to have to downgrade all my libraries to get to a working state but so far nothing else has worked for me.

    Any suggestions would be welcome.

    Thanks

  • #2
    Did you ever figure this out? I have the same issue

    Comment


    • #3
      Originally posted by cliffndonna View Post
      Did you ever figure this out? I have the same issue
      No. I had to revert back to an older version of hibernate and spring data jpa. Works fine in the old versions.

      I should probably submit a bug report or something but I don't want to make a sample project to reproduce the error.

      Good luck. If you figure out another solution let me know because I have seen the same error on two different projects now.

      Comment

      Working...
      X