Search code examples
javae-commercebroadleaf-commerce

How to maintain the DB state, after each start in broadleaf commerce?


I am following the http://docs.broadleafcommerce.org/current/Getting-Started.html and all the steps were successfully completed, and i also migrated to MySQL database as well, and configured mysite with jrebel successfully.

Now after i start my site & admin projects, i start playing with the framework by adding few more product under demo site only, and the newly created product is added successfully to my site, but every time i re-start my demo site, the products goes back to the default in the original state, i mean the product which i have added to this table "broadleaf.blc_product" is gone after restart, so how do I keep the changes in database?

I did these changes in my development.properties

blPU.hibernate.hbm2ddl.auto=create-update
blPU.hibernate.hbm2ddl.import_files=/sql/load_admin_security.sql,\
/sql/load_admin_users.sql,\
/sql/load_code_tables.sql,\
/sql/load_table_sequences.sql,\
/sql/load_catalog_data.sql,\
/sql/load_content_structure.sql,\
/sql/load_content_data.sql

blCMSStorage.hibernate.hbm2ddl.auto=create-update
blCMSStorage.hibernate.hbm2ddl.import_files=/sql/import_storage.sql

after this changes my demo site page has stop working. it is giving me an error when I trying to open my site on web browser:-

HTTP ERROR 404

Problem accessing /. Reason:

Not Found

Can you please let me know where did I had made a mistake.

Thanks in advance

Regards,

Ankit Patni


Solution

  • Take your project environment to tomcat server .. by deploying the .war file of ur demosite in tomcat webapp folder.

    once you have delpoyed the full demosite in your tomcat server after starting the tomcat services make one change in development.properties in below blPU.hibernate.hbm2ddl.auto=create-drop

    to blPU.hibernate.hbm2ddl.auto=update.

    This will work for you..