2 Replies Latest reply on Aug 18, 2010 6:48 AM by jaikiran pai

    JBoss 6 M4 vs MySQL 5.0

    Wim Vandenhaute Newbie

      Hi,

       

      I am encountering a table initialization failure during startup.

       

       

      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
      So it is failing to create the 'timer' table as the sql statement is invalid.
      Any thoughts on this?
      Best regards,
      Wim.