[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-2152) Timer table creation fails on MySQL 5
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Sat Dec 18 01:15:18 EST 2010
[ https://issues.jboss.org/browse/EJBTHREE-2152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571199#comment-12571199 ]
jaikiran pai commented on EJBTHREE-2152:
----------------------------------------
Frank, I just added a fix for the PostgreSQL DB issue. Is there any chance you can give it a try and see if it works? I don't have ready access to PostgreSQL setup. I have tested the change against the (default) HSQLDB that JBoss AS uses. If you are able to test this against PostgreSQL and able to report by tomorrow, then the chances of this fix making it to 6.0 Final are very high. I know, it's a bit too much to ask during a weekend, but sorry about that - I haven't had a chance to work on this given the other priorities.
Here's what you have to do to test this:
1) Download the latest JBoss AS from here (or you can even use JBoss AS 6.0 CR1) http://hudson.jboss.org/hudson/view/JBoss%20AS/job/JBoss-AS-6.0.x/lastSuccessfulBuild/artifact/JBossAS_6_0/build/target/jboss-6.0.x.zip.
2) Download the fixed timerservice jar from here https://repository.jboss.org/nexus/content/repositories/releases/org/jboss/ejb3/timerservice/jboss-ejb3-timerservice-mk2/1.0.0-alpha-12/jboss-ejb3-timerservice-mk2-1.0.0-alpha-12.jar
3) Remove (back it up first) the jboss-ejb3-timerservice-mk2.jar from JBOSS_HOME/common/deploy
4) Place the newly downloaded jboss-ejb3-timerservice-mk2.jar (that exactly how it should be named) into JBOSS_HOME/common/deploy.
5) Start the server and test your timerservice application against PostgreSQL.
Let us know how it goes.
> Timer table creation fails on MySQL 5
> -------------------------------------
>
> Key: EJBTHREE-2152
> URL: https://issues.jboss.org/browse/EJBTHREE-2152
> Project: EJB 3.0
> Issue Type: Bug
> Components: timerservice-mk2
> Environment: JBoss AS 6.0.0.M4, bom-as6:0.2.0-alpha-10
> Reporter: jaikiran pai
> Assignee: jaikiran pai
> Fix For: depchain-1.0.0-alpha-2
>
>
> 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.
>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list