Uploaded image for project: 'PicketLink'
  1. PicketLink
  2. PLINK-75

Schema population with JPA fails in MySQL because of use of reserved words in DatabaseGroup

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • PLINK_2.5.0.Final
    • IDM
    • None

    Description

      MySQL schema population with JPA fails in MySQL because of user of reserved words in DatabaseGroup:

      The log shows:
      06:34:48,994 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-2) HHH000388: Unsuccessful: create table DatabaseGroup (internalId bigint not null auto_increment, createdDate datetime, enabled boolean not null, expiryDate datetime, id varchar(255), key varchar(255), name varchar(255), parentGroup_internalId bigint, primary key (internalId))
      06:34:48,997 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-2) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'varchar(255),
      name varchar(255),
      parentGroup_internalId bigint,
      ' at line 7
      06:34:48,998 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-2) HHH000388: Unsuccessful: create table DatabaseRole (internalId bigint not null auto_increment, createdDate datetime, enabled boolean not null, expiryDate datetime, id varchar(255), key varchar(255), name varchar(255), primary key (internalId))
      06:34:48,999 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-2) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'varchar(255),
      name varchar(255),
      primary key (internalId)
      )' at line 7
      06:34:49,003 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-2) HHH000388: Unsuccessful: create table DatabaseUser (internalId bigint not null auto_increment, createdDate datetime, enabled boolean not null, expiryDate datetime, id varchar(255), key varchar(255), email varchar(255), firstName varchar(255), fullName varchar(255), lastName varchar(255), primary key (internalId))
      06:34:49,004 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-2) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'varchar(255),
      email varchar(255),
      firstName varchar(255),
      ' at line 7

      The generated script is:
      create table DatabaseGroup (internalId bigint not null auto_increment,
      createdDate datetime,
      enabled boolean not null,
      expiryDate datetime,
      id varchar(255),
      key varchar(255),
      name varchar(255),
      parentGroup_internalId bigint,
      primary key (internalId));

      Attachments

        Activity

          People

            psilva@redhat.com Pedro Igor Craveiro
            esteve_jira Esteve Aviles (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: