Announcement Announcement Module
No announcement yet.
Entity factory fails with multi module maven build Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Entity factory fails with multi module maven build

    I have two modules, a common module and a persistence module (which depends on the common module) in my maven build, both of them have JUnit tests that use hibernate. When run the tests, the persistence module tests fail with "MappingException: Unknown entity" errors. If I remove the tests and hibernate configuration from the common module then the persistence tests work fine.

    The best I can figure is that when the persistence tests run, they are reusing the entity factory from when the common module ran. This is a bit surprising since they have separate context files, persistence files, etc.

    How do I configure the two modules so that they don't interfere with each other?