Page 1 of 1

Issue with "New Catalog Load in DB" using hibernate

Posted: Sun May 17, 2015 6:48 pm
by sumit784
Hi,
I am running Broadleaf with the default catalog for sometime. But, now I have created a complete new catalog of my own.
I am now trying to load it thorough hibernate during the start time, But the problem is :-

- Only tables are generating, but NO data is inserted into it. Means, only the table structure is getting created without any data.
Whereas, I have all the queries in my .sql files.

These are the changes I have made :-

blPU.hibernate.hbm2ddl.import_files=/config/bc/sql/load_admin_permissions.sql,\
/config/bc/sql/load_admin_roles.sql,\
/config/bc/sql/load_admin_menu.sql,\
/sql/load_admin_users.sql,\
/sql/load_code_tables.sql,\
/sql/load_table_sequences.sql,\
/sql/load_content_structure.sql,\
/sql/load_catalog_data.sql,\
/sql/load_content_data.sql,\
/sql/load_content_structure_i18n.sql,\
/sql/load_content_data_i18n.sql,\
/sql/load_categories.sql,\
/sql/load_categoryXref.sql,\
/sql/load_products.sql,\
/sql/load_productUpdate.sql,\
/sql/load_ProductAttr.sql,\
/sql/load_images_BLC_MEDIA.sql,\
/sql/load_images_BLC_SKU_MEDIA_MAP.sql,\
/sql/load_images_BLC_STATIC_ASSET.sql,\
/sql/Product_Offers_table.sql,\
/sql/load_sitemap_data.sql

blPU.hibernate.hbm2ddl.auto=create-drop
blCMSStorage.hibernate.hbm2ddl.auto=create-drop
blSecurePU.hibernate.hbm2ddl.auto=create-drop


All the sql files are there in my "sql" folder, with all the Database queries and properly structured. So there is not issue with the sql files or queries.

How can I get the data loaded at the start itself. Am I missing something ?

Thanks in advance.

- Sumit

Re: Issue with "New Catalog Load in DB" using hibernate

Posted: Wed May 20, 2015 12:38 am
by phillipuniverse
Are there any other references to blPU.hibernate.hbm2ddl.import_files?

Also, which properties file is this in? Assuming that this is in development-shared.properties (which is the default) then that means it will only have that property value in development. If you have changed the runtime environment then it won't work.

You could move the blPU.hibernate.hbm2ddl.import_files property to common-shared.properties and then it would be available to all environments.

Re: Issue with "New Catalog Load in DB" using hibernate

Posted: Sat May 30, 2015 11:31 pm
by sumit784
Hi,
I have fixed this issue. Actually there were issues in some of my DB queries due to which the issue occured. I have fixed them.