Page 1 of 1

Demo-3.0.8 startup errors

Posted: Sun Feb 09, 2014 5:35 am
by pokemon007
I'm trying a fresh installation of latest demo 3.0.8, and configure to use MySQL. When start the site war, I got following errors. It seems it tries to alter tables. But this is fresh database. The tables are created, but no demo data.

Code: Select all

[SUPPORT] 19:44:14 DirectCopyClassTransformer(Offer Audit Fix) - Offer Audit Fix - START - Transform - Copying into [org.broadleafcommerce.core.offer.domain.OfferAuditImpl] from [org.broadleafcommerce.core.offer.domain.OfferAuditWeaveImpl]
[SUPPORT] 19:44:15 DirectCopyClassTransformer(Offer Audit Fix) - Offer Audit Fix - END - Transform - Copying into [org.broadleafcommerce.core.offer.domain.OfferAuditImpl] from [org.broadleafcommerce.core.offer.domain.OfferAuditWeaveImpl]
[ WARN] 19:44:20 AbstractEhcacheRegionFactory - HHH020003: Could not find a specific ehcache configuration for cache named [org.hibernate.cache.spi.UpdateTimestampsCache]; using defaults.
[ WARN] 19:44:20 AbstractEhcacheRegionFactory - HHH020003: Could not find a specific ehcache configuration for cache named [org.hibernate.cache.internal.StandardQueryCache]; using defaults.
[ WARN] 19:44:21 AbstractEhcacheRegionFactory - HHH020003: Could not find a specific ehcache configuration for cache named [blSandBoxElements]; using defaults.
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADDITIONAL_OFFER_INFO drop foreign key FK3BFDBD63B5D9C34D
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_additional_offer_info' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADDITIONAL_OFFER_INFO drop foreign key FK3BFDBD63D5F3FAF4
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_additional_offer_info' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADDITIONAL_OFFER_INFO drop foreign key FK3BFDBD631891FF79
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_additional_offer_info' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADDRESS drop foreign key FK299F86CEA46E16CF
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_address' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADDRESS drop foreign key FK299F86CEF1A6533F
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_address' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADDRESS drop foreign key FK299F86CEBF4449BA
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_address' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADDRESS drop foreign key FK299F86CEE12DC0C8
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_address' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADDRESS drop foreign key FK299F86CE337C4D50
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_address' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADMIN_PERMISSION_ENTITY drop foreign key FK23C09E3DE88B7D38
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_admin_permission_entity' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADMIN_ROLE_PERMISSION_XREF drop foreign key FK4A819D98E88B7D38
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_admin_role_permission_xref' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADMIN_ROLE_PERMISSION_XREF drop foreign key FK4A819D985F43AAD8
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_admin_role_permission_xref' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADMIN_SECTION drop foreign key FK7EA7D92FB1A18498
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_admin_section' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADMIN_SEC_PERM_XREF drop foreign key FK5E832966E88B7D38
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_admin_sec_perm_xref' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADMIN_SEC_PERM_XREF drop foreign key FK5E8329663AF7F0FC
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_admin_sec_perm_xref' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADMIN_USER_PERMISSION_XREF drop foreign key FKF0B3BEEDE88B7D38
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_admin_user_permission_xref' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADMIN_USER_PERMISSION_XREF drop foreign key FKF0B3BEED46EBC38
[ERROR] 19:44:23 SchemaExport - Table 'commerce_3_0_8.blc_admin_user_permission_xref' doesn't exist
[ERROR] 19:44:23 SchemaExport - HHH000389: Unsuccessful: alter table BLC_ADMIN_USER_ROLE_XREF drop foreign key FKFFD33A265F43AAD8

Many more
---
---
---


Do I miss any steps?

Thanks.

-Charlie

Re: Demo-3.0.8 startup errors

Posted: Tue Feb 11, 2014 3:17 pm
by phillipuniverse
No, this will happen when the ddl is set to 'create-drop'. The actual behavior of this according to Hibernate is to first drop the entire schema and then recreate it on startup. However, Hibernate does not make an initial check to see if the table exists before attempting to drop it.

If you were to restart your application then you would not see these errors as Hibernate would have dropped the tables successfully.

Re: Demo-3.0.8 startup errors

Posted: Wed Feb 12, 2014 2:21 am
by pokemon007
I'm not sure if I understand. After stop the server, the schema is dropped (except for payment tables). Restart will have to try to do the same thing: drop then create. Indeed I've tried several times and got the same errors. I found one error in load_catalog_data.sql. The following insertion was missing semi colon:

Code: Select all

-- Builds the category hierarchy (simple in this case) - Root --> Nav --> All other categories
INSERT INTO BLC_CATEGORY_XREF (SUB_CATEGORY_ID, CATEGORY_ID, DISPLAY_ORDER) VALUES (2,1,1);


However, fixing this error doesn't fix the whole problem. There might be some other problems the prevent a couple of load_data scripts not executed during startup. I have to dump the schema before the app drops it at exit, and recreate it then manually run following two load data scripts that were not executed at startup:

Code: Select all

mysql -u flatuser < load_admin_users.sql
mysql -u flatuser < load_catalog_data.sql


Other load data scripts seem executed during startup.

Thanks.

-Charlie