javaeclipsejpaopenjpa

Turn off "error" about missing no-arg constructor in Eclipse


I'm using open-jpa and as we know it's shipped with enhancer which could create non private no-arg constructor during enhancement. It works, however eclipse have problem with it. It's quite rational that it doesn't know anything what would happen during ant build, so is there any possibility to turn off this particular error The Java class for mapped type ... must define a non-private zero-argument constructor bounded to @Entity annotation?


Solution

  • This works for me (Eclipse Mars.1 Release 4.5.1)

    Project / Properties / JPA / Errors/Warnings
    Enable Project Specific Settings
     Type
      ID class must have a public no-arg constructor (change from Error to something else)