4 Replies Latest reply on Apr 25, 2005 6:12 PM by epbernard

    Did "Group" become a reserved word in EJB3 persistance frame

    vincent_os

      Hello,
      I recently updated my JBoss appserver with jboss-EJB-3.0 Preview 5 jars/libs. Since then I encountered the following problem:

      I have a entity bean called "Group" when I try to deploy this simple bean (it contains two persistant String attributes and an id field). I get an error when the EJB3.jar is deployed

      ERROR unexpected token GROUP ....

      Now if I change may bean class name to say Groupz.java it deploys fine!

      is this intended behavior?

        • 1. Re: Did
          kabirkhan

          Can you post the stack trace please?

          • 2. Re: Did
            epbernard

            Override the table name with backticks '
            GROUP is a SQL reserved word.

            • 3. Re: Did
              vincent_os

              OK, tried the following:

              @Entity
              @Table(name="MyGroup")
              public class Group implements Serializable, Cloneable
              {


              I still get the follwing error:

              6:58:08,912 ERROR [SchemaExport] Unsuccessful: create table Group (id integer generated by default as identity (start with 1), displayName varchar(255), description varchar(255), parentGroup_id integer, primary key (id))
              16:58:08,912 ERROR [SchemaExport] Unexpected token: GROUP in statement [create table Group]
              



              It seems that the annotation (@Table(name="MyGroup")) is not overriding the table name?




              • 4. Re: Did
                epbernard

                You most likely made a mistake. I'm pretty sure it works.