Page 1 of 1

Unable to start demoapp with mysql

Posted: Thu Mar 13, 2014 1:15 pm
by ragavkb
Hi,

I followed the steps mentioned in http://docs.broadleafcommerce.org/core/ ... l-tutorial and when i start the jetty server, I'm getting the below errors.

My SQL version - 5.6.16

[artifact:mvn] [ERROR] 11:48:12 SchemaExport - HHH000389: Unsuccessful: drop table BLC_PRODUCT_BUNDLE if exists
[artifact:mvn] [ERROR] 11:48:12 SchemaExport - 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 'if exists' at line 1
[artifact:mvn] [ERROR] 11:48:12 SchemaExport - HHH000389: Unsuccessful: drop table BLC_PRODUCT_CROSS_SALE if exists
[artifact:mvn] [ERROR] 11:48:12 SchemaExport - 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 'if exists' at line 1
[artifact:mvn] [ERROR] 11:48:12 SchemaExport - HHH000389: Unsuccessful: drop table BLC_PRODUCT_FEATURED if exists

[artifact:mvn] [ERROR] 11:48:12 SchemaExport - HHH000389: Unsuccessful: create table BLC_CATEGORY (CATEGORY_ID bigint not null, ACTIVE_END_DATE timestamp, ACTIVE_START_DATE timestamp, ARCHIVED char(255), DESCRIPTION varchar(255), DISPLAY_TEMPLATE varchar(255), FULFILLMENT_TYPE varchar(255), INVENTORY_TYPE varchar(255), LONG_DESCRIPTION clob(2147483646), NAME varchar(255) not null, TAX_CODE varchar(255), URL varchar(255), URL_KEY varchar(255), DEFAULT_PARENT_CATEGORY_ID bigint, primary key (CATEGORY_ID))
[artifact:mvn] [ERROR] 11:48:12 SchemaExport - 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 'clob(2147483646), NAME varchar(255) not null, TAX_CODE varchar(255), URL varchar' at line 1

[artifact:mvn] [ERROR] 11:48:13 SchemaExport - HHH000389: Unsuccessful: create table BLC_FULFILLMENT_OPTION (FULFILLMENT_OPTION_ID bigint not null, FULFILLMENT_TYPE varchar(255) not null, LONG_DESCRIPTION clob(2147483646), NAME varchar(255), TAX_CODE varchar(255), TAXABLE boolean, USE_FLAT_RATES boolean, primary key (FULFILLMENT_OPTION_ID))
[artifact:mvn] [ERROR] 11:48:13 SchemaExport - 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 'clob(2147483646), NAME varchar(255), TAX_CODE varchar(255), TAXABLE boolean, USE' at line 1

[artifact:mvn] [ERROR] 11:48:13 SchemaExport - HHH000389: Unsuccessful: create table BLC_OFFER (OFFER_ID bigint not null, APPLIES_WHEN_RULES clob(2147483646), APPLIES_TO_RULES clob(2147483646), APPLY_OFFER_TO_MARKED_ITEMS boolean, APPLY_TO_SALE_PRICE boolean, ARCHIVED char(255), AUTOMATICALLY_ADDED boolean, COMBINABLE_WITH_OTHER_OFFERS boolean, OFFER_DELIVERY_TYPE varchar(255), OFFER_DESCRIPTION varchar(255), OFFER_DISCOUNT_TYPE varchar(255), END_DATE timestamp, MARKETING_MESSASGE varchar(255), MAX_USES_PER_CUSTOMER bigint, MAX_USES integer, OFFER_NAME varchar(255) not null, OFFER_ITEM_QUALIFIER_RULE varchar(255), OFFER_ITEM_TARGET_RULE varchar(255), OFFER_PRIORITY integer, QUALIFYING_ITEM_MIN_TOTAL numeric(19,5), REQUIRES_RELATED_TAR_QUAL boolean, STACKABLE boolean, START_DATE timestamp, TARGET_SYSTEM varchar(255), TOTALITARIAN_OFFER boolean, USE_NEW_FORMAT boolean, OFFER_TYPE varchar(255) not null, USES integer, OFFER_VALUE numeric(19,5) not null, primary key (OFFER_ID))
[artifact:mvn] [ERROR] 11:48:13 SchemaExport - 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 'clob(2147483646), APPLIES_TO_RULES clob(2147483646), APPLY_OFFER_TO_MARKED_ITEMS' at line 1

[artifact:mvn] [ERROR] 11:48:13 SchemaExport - HHH000389: Unsuccessful: create table BLC_OFFER_ITEM_CRITERIA (OFFER_ITEM_CRITERIA_ID bigint not null, ORDER_ITEM_MATCH_RULE clob(2147483646), QUANTITY integer not null, primary key (OFFER_ITEM_CRITERIA_ID))
[artifact:mvn] [ERROR] 11:48:13 SchemaExport - 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 'clob(2147483646), QUANTITY integer not null, primary key (OFFER_ITEM_CRITERIA_ID' at line 1

[artifact:mvn] [ERROR] 11:48:13 SchemaExport - HHH000389: Unsuccessful: create table BLC_OFFER_RULE (OFFER_RULE_ID bigint not null, MATCH_RULE clob(2147483646), primary key (OFFER_RULE_ID))
[artifact:mvn] [ERROR] 11:48:13 SchemaExport - 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 'clob(2147483646), primary key (OFFER_RULE_ID))' at line 1


:?

Has anyone succeeded in deploying the demoapp with mysql?
Can someone help me in figuring out what am i missing ?

Regards
Ragav.

Re: Unable to start demoapp with mysql

Posted: Sun Mar 23, 2014 7:26 pm
by phillipuniverse
We haven't seen any problems with MySQL but I am not sure if we have tested with MySQL 5.6. I know for a fact that 5.1 and 5.5 should work.

Could you open an issue on https://github.com/BroadleafCommerce/BroadleafCommerce? This warrants more investigation.

Re: Unable to start demoapp with mysql

Posted: Mon Jun 02, 2014 12:12 pm
by cuong09m
I got the same problem, you can edit site/pom.xml file and add the latest version of mysql connector to the mysql connector dependency:

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.30</version>
</dependency>

It solved the problem for me. I'm using mysql 5.6

Re: Unable to start demoapp with mysql

Posted: Sat Aug 01, 2015 12:27 am
by langcaiye
I'm using MySql5.6.22, and below driver, but still get this syntax error.

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.34</version>
</dependency>