java.lang.IllegalArgumentException: Method 'entityManager' already defined in target type 'com.foo.Food' (ITD target 'com.foo.Food_Roo_Entity')

Spring JIRA | Ben Alex | 7 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Method 'entityManager' already defined in target type 'com.foo.Food' (ITD target 'com.foo.Food_Roo_Entity')

      at org.springframework.roo.support.util.Assert.isNull()
    2. org.springframework.roo
      EntityMetadataProvider.getMetadata
      1. org.springframework.roo.support.util.Assert.isNull(Assert.java:89)
      2. org.springframework.roo.classpath.details.DefaultItdTypeDetailsBuilder.addMethod(DefaultItdTypeDetailsBuilder.java:93)
      3. org.springframework.roo.addon.entity.EntityMetadata.<init>(EntityMetadata.java:143)
      4. org.springframework.roo.addon.entity.EntityMetadataProvider.getMetadata(EntityMetadataProvider.java:73)
      4 frames