Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Major
-
Resolution: Complete
-
Affects Version/s: 1.2.5.RELEASE
-
Fix Version/s: 1.3.0.RELEASE
-
Component/s: PERSISTENCE
-
Labels:None
Description
When an Abstract-entity-class implements an interface, the related Jpa_ActiveRecord.aj is generated with a compilation error.
Example:
1. Launch clinic.roo
2. Create an interface AnInterface on domain package:
AnInterface.java
public interface AnInterface { public int getInt(); }
3. Make AbstractPerson implements AnInterface
AbstractPerson.java
@RooJavaBean @RooToString @RooJpaActiveRecord public abstract class AbstractPerson implements AnInterface { ...
4. Implements getInt() on Owner and Vet
Vet.java
... public int getAnInt(){ return 0; } ...
When you run mvn clean compile you get:
[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.4:compile (default) on project petclinic: Compiler errors: [ERROR] error at EntityManager em = new AbstractPerson() { [ERROR] ^^^^^^^ [ERROR] /../.../src/main/java/com/springsource/petclinic/domain/AbstractPerson_Roo_Jpa_ActiveRecord.aj:18:0::0 The type new AbstractPerson(){} must implement the inherited abstract method AnInterface.getAnInt()
A project backup with this example is attached.