[ http://jira.undersunconsulting.com/browse/OFBIZ-359?page=comments#action_13945 ]
Marco Risaliti commented on OFBIZ-359: -------------------------------------- can this issue be closed ? Thanks Marco > Incompatible "create table" syntax, if using "table types" > ---------------------------------------------------------- > > Key: OFBIZ-359 > URL: http://jira.undersunconsulting.com/browse/OFBIZ-359 > Project: [OFBiz] Open For Business > Type: Bug > Components: entity > Versions: SVN > Environment: Linux 2.6.11 > JDK 1.4.2.08 > i386, AMD AlthonXP 1800 > Reporter: Zarick > Assignee: Jira Administrator > > > When using MySQL as the datasource, if you run 'ant run-install', it can't create tables, and I will put the relevant log excerpt at the end of this report! > I've track the source, and I think, the problem is caused by > org.ofbiz.entity.jdbc.DatabaseUtil:createTable() > It will append " TYPE " + this.dataSourceInfo.tableType > In the entity engine config 'entityengine.xml', datasource 'localmysql' as the attribute 'table-type="InnoDB"' > The final SQL statement is end with 'type InnoDB' > But, according to MySQL manual, the correct syntax should be type=InnoDB. > Is it a MySQL problem, or OFBiz problem? > As I don't see other datasource definition using that attribute.. I am not really sure. > The following is the relevant log excerpt: > [java] 75641[ DatabaseUtil.java:1362:org.ofbiz.entity.jdbc.DatabaseUtil:DEBUG] [createTable] sql=CREATE TABLE ACCTG_TRANS (ACCTG_TRANS_ID VARCHAR(20) NOT NULL, ACCTG_TRANS_TYPE_ID VARCHAR(20), DESCRIPTION VARCHAR(255), TRANSACTION_DATE DATETIME, IS_POSTED CHAR(1), POSTED_DATE DATETIME, GL_JOURNAL_ID VARCHAR(20), GL_FISCAL_TYPE_ID VARCHAR(20), VOUCHER_REF VARCHAR(60), VOUCHER_DATE DATETIME, GROUP_STATUS_ID VARCHAR(20), FIXED_ASSET_ID VARCHAR(20), INVENTORY_ITEM_ID VARCHAR(20), PHYSICAL_INVENTORY_ID VARCHAR(20), PARTY_ID VARCHAR(20), ROLE_TYPE_ID VARCHAR(20), INVOICE_ID VARCHAR(20), PAYMENT_ID VARCHAR(20), THEIR_ACCTG_TRANS_ID VARCHAR(60), CREATED_BY_USER_LOGIN VARCHAR(250), LAST_MODIFIED_BY_USER_LOGIN VARCHAR(250), LAST_UPDATED_STAMP DATETIME, LAST_UPDATED_TX_STAMP DATETIME, CREATED_STAMP DATETIME, CREATED_TX_STAMP DATETIME, CONSTRAINT PK_ACCTG_TRANS PRIMARY KEY (ACCTG_TRANS_ID)) TYPE InnoDB > [java] 75851[ DatabaseUtil.java:318:org.ofbiz.entity.jdbc.DatabaseUtil:ERROR] Could not create table "ACCTG_TRANS": SQL Exception while executing the following: > [java] CREATE TABLE ACCTG_TRANS (ACCTG_TRANS_ID VARCHAR(20) NOT NULL, ACCTG_TRANS_TYPE_ID VARCHAR(20), DESCRIPTION VARCHAR(255), TRANSACTION_DATE DATETIME, IS_POSTED CHAR(1), POSTED_DATE DATETIME, GL_JOURNAL_ID VARCHAR(20), GL_FISCAL_TYPE_ID VARCHAR(20), VOUCHER_REF VARCHAR(60), VOUCHER_DATE DATETIME, GROUP_STATUS_ID VARCHAR(20), FIXED_ASSET_ID VARCHAR(20), INVENTORY_ITEM_ID VARCHAR(20), PHYSICAL_INVENTORY_ID VARCHAR(20), PARTY_ID VARCHAR(20), ROLE_TYPE_ID VARCHAR(20), INVOICE_ID VARCHAR(20), PAYMENT_ID VARCHAR(20), THEIR_ACCTG_TRANS_ID > VARCHAR(60), CREATED_BY_USER_LOGIN VARCHAR(250), LAST_MODIFIED_BY_USER_LOGIN VARCHAR(250), LAST_UPDATED_STAMP DATETIME, LAST_UPDATED_TX_STAMP DATETIME, CREATED_STAMP DATETIME, CREATED_TX_STAMP DATETIME, CONSTRAINT PK_ACCTG_TRANS PRIMARY KEY (ACCTG_TRANS_ID)) TYPE InnoDB > [java] Error was: java.sql.SQLException: 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 'InnoDB' at line 1 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.undersunconsulting.com/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |