Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-2152

Timer table creation fails on MySQL 5

    XMLWordPrintable

Details

    • timerservice-mk2:1.0.0-alpha-8

    Description

      Timer table creation fails during AS 6.0.0.M4 startup against MySQL5 DB. Please see the referenced forum thread for complete details. Here's the relevant logs:

      12:34:30,492 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=#timerdb
      12:34:30,492 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
      12:34:30,509 INFO [SchemaUpdate] Running hbm2ddl schema update
      12:34:30,509 INFO [SchemaUpdate] fetching database metadata
      12:34:30,510 INFO [SchemaUpdate] updating schema
      12:34:30,513 INFO [DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
      12:34:30,519 INFO [DatabaseMetadata] table not found: Calendar_Timer
      12:34:30,546 INFO [TableMetadata] table found: trust.TimeoutMethod_methodParams
      12:34:30,546 INFO [TableMetadata] columns: [methodparams, timeoutmethod_id]
      12:34:30,547 INFO [TableMetadata] foreign keys: []
      12:34:30,547 INFO [TableMetadata] indexes: [fkf294c964b7de2d8a]
      12:34:30,551 INFO [TableMetadata] table found: trust.Timeout_Method
      12:34:30,551 INFO [TableMetadata] columns: [id, methodname, cachedtostring, declaringclass]
      12:34:30,551 INFO [TableMetadata] foreign keys: []
      12:34:30,551 INFO [TableMetadata] indexes: [primary]
      12:34:30,552 INFO [DatabaseMetadata] table not found: timer
      12:34:30,553 INFO [DatabaseMetadata] table not found: Calendar_Timer
      12:34:30,554 INFO [DatabaseMetadata] table not found: timer
      12:34:30,575 ERROR [SchemaUpdate] Unsuccessful: create table Calendar_Timer (autoTimer bit not null, dayOfMonth varchar(255), dayOfWeek varchar(255), endDate datetime, hour varchar(255), minute varchar(255), month varchar(255), second varchar(255), startDate datetime, timezone varchar(255), year varchar(255), id tinyblob not null, timeoutMethod_id bigint, primary key (id))
      12:34:30,576 ERROR [SchemaUpdate] BLOB/TEXT column 'id' used in key specification without a key length
      12:34:30,576 ERROR [SchemaUpdate] Unsuccessful: create table timer (id tinyblob not null, info longblob, initialDate datetime not null, interval bigint not null, nextDate datetime, previousRun datetime, timedObjectId varchar(255) not null, timerState integer, primary key (id))
      12:34:30,576 ERROR [SchemaUpdate] 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 'interval bigint not null, nextDate datetime, previousRun datetime, timedObjectId' at line 1
      12:34:30,577 ERROR [SchemaUpdate] Unsuccessful: alter table Calendar_Timer add index FKEDED5B04E6E6EF93 (id), add constraint FKEDED5B04E6E6EF93 foreign key (id) references timer (id)
      12:34:30,577 ERROR [SchemaUpdate] Table 'trust.Calendar_Timer' doesn't exist
      12:34:30,577 ERROR [SchemaUpdate] Unsuccessful: alter table Calendar_Timer add index FKEDED5B04B7DE2D8A (timeoutMethod_id), add constraint FKEDED5B04B7DE2D8A foreign key (timeoutMethod_id) references Timeout_Method (id)
      12:34:30,577 ERROR [SchemaUpdate] Table 'trust.Calendar_Timer' doesn't exist
      12:34:30,578 INFO [SchemaUpdate] schema update complete

      I think using a BLOB field for primary key, in itself is probably a bad idea.

      Attachments

        Activity

          People

            jaikiran Jaikiran Pai (Inactive)
            jaikiran Jaikiran Pai (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: