Question

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/core/current/tutorials/getting-started-tutorials/switch-to-mysql-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: enter image description here

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

enter image description here

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

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?

Was it helpful?

Solution

Because you have only 256MB of ram allocated for RPi, and also a much more slower CPU, probably it took longer for solr to index all demo products.

Yes you are right, broadleaf demo site fetches all products from db and index them in batch sizes of 100.

So for sure indexing process took longer on RPi.

Also demo site makes resizing of images on demand as are requested. These are written on local temp storage and served by tomcat from there on second request.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top