Page 1 of 1

BroadLeafCommerce: DemoSite not showing products

Posted: Fri Aug 01, 2014 6:15 am
by mathias.lin
I have posted this issue on StackOverflow as well:
http://stackoverflow.com/questions/2507 ... g-products

I just installed BroadLeafCommerce on two different hosts, one is Mac OS X, one is Debian / Raspberry Pi. Both with JDK1.7 and Tomcat7. Also using MySql on both. So basically the same environment components, except that Raspberry Pi runs with less heap assigned to the JVM (256m).

On both hosts, the application starts up with the same log entries, and the database tables are created and filled on both hosts. On my Mac OS X host, everything looks fine. On Raspberry Pi, the products don't show in the content section, however, there are images/products shown in the right sidebar. But also categories are missing in the right sidebar. However, when I check the mysql db tables on my raspberry pi host, blc_product and blc_category and blc_category_product_xref tables are filled with data. And catalina.out does not show any errors when I open a certain page.

I followed the instructions on http://www.broadleafcommerce.com/docs/c ... l-tutorial after I did a git clone of the repository. Then I built everything via mvn clean install and deployed the war file to Tomcat.

This is what it looks like correctly on Mac OS X:
Image

This is what it looks like on my Raspberry Pi installation - products are not showing in the categories content sections:
Image

This is the log on Tomcat startup (note that the output is the same on both systems; even though there are ERRORS, the database tables get created correctly on both systems).

And I checked that on both systems, db tables can be queries case-insensitive (I had set lower_case_table_names=1 on Debian/Raspberry Pi before), so that this should not be an issue.

Startup log of Tomcat: http://pastebin.com/83QsTVeC

Re: BroadLeafCommerce: DemoSite not showing products

Posted: Fri Aug 01, 2014 10:29 am
by mathias.lin
Update: I left everything untouched for an hour or so, then returned and refreshed the site. And voila, even on the Raspberry Pi, all products appear. It looks as if it took a while until some process was finished on the RPi, even though I don't know what it was or which db tables where related. When I checked the database via direct query before, the most obvious related tables (product, category) were already filled with data. Still no clue what happened during that hour that make the products appear. Or maybe the catalog pages are based on Solr queries and Solr hasn't finished indexing yet?

Re: BroadLeafCommerce: DemoSite not showing products

Posted: Fri Aug 01, 2014 2:31 pm
by phillipuniverse
Cool project running this on a RPi! What are you using it for?

To answer your question, the product results are based on Solr indexing so since you are on pretty limited resources it makes sense that it would take a while. The DemoSite uses an embedded Solr instance so it has to compete for resources with everything else.

Re: BroadLeafCommerce: DemoSite not showing products

Posted: Fri Aug 01, 2014 3:09 pm
by mathias.lin
Hi Phillip,

the demo shop on Raspberry Pi runs here: http://shop.mathiaslin.com/. Of course not very fast, but not bad for a RPI serving from home.

I am currently just playing around with it and trying to get familiar with it, in order to replace an old xtCommerce shop with BroadLeaf then.

Thanks for the clarification about Solr. I wasn't sure if direct sql queries are used there or Solr queries, in order to display the products per category. Bu then, it makes sense.

Re: BroadLeafCommerce: DemoSite not showing products

Posted: Fri Aug 01, 2014 4:13 pm
by Pr0TuX
Default, demo site uses embedded solr server. But you could change it to a standalone solr server that might run on another machine :) for increasing performance on RPi.

That's pretty nice that it runs on 256M Ram:).