Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3688

Generating errors in ActiveRecord.aj for EntityManager

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.3.2.RELEASE
    • Fix Version/s: 2.0.0.M2
    • Component/s: PERSISTENCE
    • Labels:
      None
    • Environment:
      STS 3.7.1

      Description

      I have an abstract class and a concrete implementation as follows:

      @RooJavaBean
      @RooToString
      @RooJpaActiveRecord(inheritanceType="TABLE_PER_CLASS")
      public abstract class Task {
      @Size(min = 2)
      private String name;
      public abstract void execute(Object... parameters);
      }

      @RooJavaBean
      @RooToString
      @RooJpaActiveRecord
      public class ImportLoadPlanTask extends Task {
      @Size(min = 2)
      private String svnFile;

      @Override
      public void execute(Object... parameters)

      { .... }

      }

      However the ActiveRecord.aj file generated produces the following code:

      public static final EntityManager Task.entityManager() {
      EntityManager em = new Task() {
      public void execute(java.lang.Object parameters)

      { throw new UnsupportedOperationException(); }

      }.entityManager;
      if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)");
      return em;
      }

      And the error message from the IDE is :

      The type new Task(){} must implement the inherited abstract Task.execute(Object ...)

      This looks like a Roo bug.

        Attachments

          Activity

            People

            • Assignee:
              jcgarcia Juan Carlos García del Canto
              Reporter:
              Neriyan Neriyan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: