2 Replies Latest reply on Mar 2, 2006 9:41 AM by Roberto Colmegna

    EJB3 compilation failure

    Roberto Colmegna Newbie

      Hi,

      I have a small test bean:

      --------------------------------
      package test.ejb.entity;

      import java.util.*;
      import javax.persistence.*;

      @Entity
      public class IdEntityBean {

      @Id(generate=javax.persistence.GeneratorType.AUTO)
      Integer id;
      public Integer getId() { return id;}
      }

      --------------------------

      If I compile it I obtain this error:

      symbol : method generate()
      location: @interface javax.persistence.Id
      @Id(generate=javax.persistence.GeneratorType.AUTO)
      ^
      test/ejb/entity/IdEntityBean.java:9: cannot find symbol
      symbol : class GeneratorType
      location: package javax.persistence
      @Id(generate=javax.persistence.GeneratorType.AUTO)
      ^
      2 errors


      Any idea?

      TIA
      Roberto Colmegna