[jboss-user] [JBoss Messaging] - Re: MQ migration help
tnine
do-not-reply at jboss.com
Tue Apr 15 17:28:06 EDT 2008
Thanks for the help. I've hit a bit of a snag, and I've found the solution. I changed the default datasource to use MySQL. Whenever I started jboss, I received this error
| 2008-04-16 09:02:40,752 DEBUG [org.jboss.messaging.core.impl.JDBCSupport] Failed to execute: CREATE TABLE JBM_POSTOFFICE (POSTOFFICE_NAME VARCHAR(255), NODE_ID INTEGER,QUEUE_NAME VARCHAR(255), CONDITION VARCHAR(1023), SELECTOR VARCHAR(1023), CHANNEL_ID BIGINT, CLUSTERED CHAR(1), ALL_NODES CHAR(1), PRIMARY KEY(POSTOFFICE_NAME, NODE_ID, QUEUE_NAME))
| com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 'CONDITION VARCHAR(1023), SELECTOR VARCHAR(1023), CHANNEL_ID BIGINT, CLUSTERED CH' at line 1
It appears that in mysql 5.0, some of the column names are reserved keywords or functions. I fixed it by manually escaping all the column names and executing the SQL myself.
| CREATE TABLE JBM_POSTOFFICE (`POSTOFFICE_NAME` VARCHAR(255), `NODE_ID` INTEGER,`QUEUE_NAME` VARCHAR(255), `CONDITION` VARCHAR(1023), `SELECTOR` VARCHAR(1023), `CHANNEL_ID` BIGINT, `CLUSTERED` CHAR(1), `ALL_NODES` CHAR(1), PRIMARY KEY(POSTOFFICE_NAME, NODE_ID, QUEUE_NAME))
|
This will be a pain when we start deploying this to different servers. Is there a configuration file somehwere I can change the create SQL?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144341#4144341
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4144341
More information about the jboss-user
mailing list