unable to see changes in database - broadleaf-commerce

I'm using Broadleaf Commerce 2.2 and unable to update my database with new product entry which i did from admin console. I would like to know that why my changes which i made in admin is not reflecting in database?
I added couple of new product through admin console in Broadleaf database but when i check this under database table i won't find any product there. Is there any way which i need to consider or setup??? how can i add more product from admin and see those under database?

First migrate your database from hibernateSQl to Mysql.
then you have to made one change in development.resources after starting the jetty from
blPU.hibernate.hbm2ddl.auto=create-drop
to
blPU.hibernate.hbm2ddl.auto=update
if it doesnt works then you have to setup your whole demosite in tomcat server by just delpoying the .war file of your project in tomcat webapp folder.
and do the same changes in development.properties after starting the tomcat ..
It will surely work for you.

Related

broadleaf database tables does not persist after application shutdown

I have been able to run the DemoSite project after changing the in-memory HSQL database to MySql following the instructions given in the broadleaf commerce getting started instructions for changing databases .
Now when I run the Demosite application I find 183 tables get created and populated with data , but this is in existence only during the running of the application . Once the application is shut down only 4 tables remain in the database .
I am using broadleaf demosite version 4.0.0 and MySql Database . The 4 tables which remain after application shut down are named as follows : -
blc_bank_account_payment
blc_credit_card_payment
blc_gift_card_payment
blc_static_asset_strg
I have changed the relevant properties files "hbmddl2.auto" entry value to "update" so that the database tables don't get created and erased for every new run of the application but still have not been able to get rid of this issue .
I have searched a lot also posted to the relevant forums but no answer . SOF is my last resort . Please help .
When you first run DemoSite you might have blPU.hibernate.hbm2ddl.auto=create-drop in your site/src/main/resources/runtime-properties/development.properties file in order to generate database tables.
How you are running the Site/Admin? From ant tomcat target from IDE or deploying war in tomcat outside of IDE.
I hope you have changed blPU.hibernate.hbm2ddl.auto property value to update.
Now if you are running ant tomcat from IDE, after changing the above property first you need to maven install core/site/admin modules before running site/admin.
If you are running from IntellijIDEA when you stop the application it will drop the tables if you have blPU.hibernate.hbm2ddl.auto=create-drop, where as Eclipse will immediately terminates the process without running the drop phase.
The best thing to do is when you start the application first time , after database tables are created and sample data is populated then take backup of the schema. Then change blPU.hibernate.hbm2ddl.auto to update, run maven install. Now start the application.
Hope it helps.

Log file is not containing the database errors in liferay 6.1

I am using liferay 6.1 and while configuring the database to mysql database in console it is giving error as innoDB is having row level logging enabled so unable to execute the query...etc..
But surprisingly I am not able to see these logs in any of the files.
I have checked {TOMCAT_HOME}/logs directory and {LIFERAY_HOME}/logs directory. But none of the files are containing the error logs.
If anybody can assist me on is there any other place to look for the logs, that will be really helpful.
Shruti
The blank database you have created might not have enough permission, you would need to give full permission i.e. to allow write / execute.
So that while you configure Liferay to point this blank database it will create table which requires write permission.
The issue is resolved now.
In mysql db the setting for binlog_format is "STATEMENT'
I changed it to ROW and it started running.
The syntax:
SET GLOBAL binlog_format = 'ROW';
Thanks ..

Liferay 5.2.3 to 6.0 Upgradation steps (Windows + Tomcat + MySql)

I have taken the backup of my live portal and I want to upgrade it to newer version in localhost and then move the upgraded version to my live site.
I followed the steps in the link http://www.liferay.com/community/wiki/-/wiki/Main/Upgrade+Instructions+from+5.2+to+6.0. and my stpes are :
1) I have setup the new liferay 6.0 on my localhost
(successful installation of liferay 6.0 with inbuilt Hypersonic database )
2) I have imported MySql database of live system to the local MySql Server.
3) After stopping the tomcat server, I have changed the configuration file portal-ext.properties for the MySql database details.
4) Then, I have started the start.bat file. It is showing upgrade process well but after few minutes window is closed
Can anyone help me in this regard where I have done some mistake or am I missing something during the upgration. If anyone has some idea then please share their steps.
Thanks in advance
You don't mention that you also copy your document library / image gallery folder to the new installation. This typically (unless configured otherwise) sits in your "data" folder. Just importing the MySql database isn't enough, as it contains only the metadata for doclib & image gallery.
You'll have to take this into account for backups also - ideally you'd read about backup and set up a second 5.2.3 instance (and make sure it runs) from your backup, then start upgrading. I typically forbid to call something a backup if nobody ever demonstrated, that they can use it to successfully restore in a completely new environment. This is your chance to ultimately test your backup procedure.

How to migrate Liferay portal from one windows machine to other?

Liferay migration from one server to another help required. Can anyone share there steps for migration of Liferay portal 5.2.3 from one server to another. I am using Windows + Tomcat + MySql.
I have uploaded whole tomcat folder to the new windows machine and imported the database too with the corresponding change to the configuration file like Database details.
But after starting the tomcat server it is showing some error like "Unable to load repository http://plugins.liferay.com". Any idea why I am getting this error ?
These are the steps that I have followed and able to migrate the Liferay successfully:
Take the backup of Liferay files and database from first windows machine.
Install the same version of Liferay (Say Liferay 5.2.3) on second windows machine.
Shut down Liferay.
Import the database on new system.
Add portal-ext.properties with relevant entries. (e.g Datbase Name, User Name , Pasword etc)
Add \liferay-portal-5.2.3\data\document_library files from old machine.
Start the tomcat. It will automtically do the rest.
NOTE: In the above method I have not deployed Theme and custom plugins etc, you have to deploy Theme and custom plugins also that are used on old system.
Lifery is trying to connect to plugin repository to find whether there are updates for plugins.
Does your new machine have internet conectivity?
Also you have options to ignore that message or configure liferay not to check for updates.
For later put in portal-ext.properties
plugin.repositories.trusted=
plugin.repositories.untrusted=
UPDATE:
If behind proxy create (if not existent) system-ext.properties (beside portal-ext.properties) and add
com.liferay.util.Http.proxy.host=proxy_host
com.liferay.util.Http.proxy.port=proxy_port
Change proxy_host and proxy_port with your values.
Also remove from portal-ext.properties if you want liferay to check repositories
plugin.repositories.trusted=
plugin.repositories.untrusted=

liferay portal: generate database not working

I've created a portal-ext.properties and added:
jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.default.url=x
jdbc.default.username=y
jdbc.default.password=z
schema.run.enabled=true
schema.run.minimal=true
And I've added my ojdbc5.jar to lib/ext.
However when I run my startup.bat the database isn't being generated?
Does anyone know why this is occuring?
Check to make sure that the database is up and running. Can you log into Oracle using SQL*Plus or some other client using the credentials you've provided? If you can't, Liferay won't be able to either.
Can you try using lifery's Data Migration feature? You can start your server with default HSQL script and then try to migrate (which can automatically create tables as well).
Go to Control Panel->Server Administration.
- Enter the values in section Migrate from One DB to another and click execute.

Resources