Page 1 of 1

Why I fail to launch Demo - version 4.0

Posted: Wed Sep 09, 2015 8:03 am
by TonyLiang
===========================================================
Problem description
after run tomcat Ant task for the site, on IE, by http://localhost:8080/, only got tomcat page but not site page of broadleaf
tomcat itself works well since
when I put my war file to apache-tomcat-7.0.34\webapps, then start tomcat; from IE, I can get the page in the war file
===========================================================
what I have done
Follow instruction of http://www.broadleafcommerce.com/docs/c ... ng-started
1) setup IDE(eclipse LUNA, Maven ...)
2) download source code
Broadleaf 4.0 workspace Download Link: Broadleaf Eclipse Workspace
3) import Broadleaf 4.0 into eclipse and run add/run associated Ant task
4) Run As -> Maven Install // successful until this step
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ecommerce .......................................... SUCCESS [ 0.499 s]
[INFO] core ............................................... SUCCESS [ 4.682 s]
[INFO] admin .............................................. SUCCESS [ 11.964 s]
[INFO] site ............................................... SUCCESS [ 10.479 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.797 s
[INFO] Finished at: 2015-09-09T20:58:19+08:00
[INFO] Final Memory: 23M/263M
[INFO] ------------------------------------------------------------------------

5) Run tomcat Ant task // log is different from the instruction, and only get tomcat page on IE by http://localhost:8080/
Buildfile: C:\data_for_work\JAVA\JavaTools\DemoSite-4.0.0-GA-eclipse-workspace\eclipse-workspace\DemoSite\site\build.xml
start-db:
[echo] Starting Data Base...
tomcat:
[artifact:mvn] Listening for transport dt_socket at address: 8000
[artifact:mvn] -Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match.
[artifact:mvn] Java Result: 1
BUILD SUCCESSFUL
Total time: 3 seconds
===========================================================
broadleaf commerce

version: 4.0
instruction: http://www.broadleafcommerce.com/docs/c ... ng-started
===========================================================
tomcat

Apache Tomcat/7.0.34
===========================================================
maven

apache-maven-3.3.3
===========================================================
jre

C:\Users\egulian>java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
===========================================================
eclipse

Eclipse Java EE IDE for Web Developers.
Version: Luna Service Release 2 (4.4.2)
Build id: 20150219-0600
===========================================================
OS

windows 7, 64bit
===========================================================

Re: Why I fail to launch Demo - version 4.0

Posted: Wed Sep 09, 2015 10:50 am
by Elaine
Hi:

I very new in broadleaf, I 'm trying to install the demosite source code in eclipse moon, but I get the following errors, please help me, I'm desperate.

Thanks.

Re: Why I fail to launch Demo - version 4.0

Posted: Thu Sep 10, 2015 3:17 am
by junnel.tiglao
@tonyliang

I also encountered that problems but what i do is i added the -Dmaven.multiModuleProjectDirectory on the build.xml to the value of maven.home path. Or change the version of maven.

Re: Why I fail to launch Demo - version 4.0

Posted: Thu Sep 10, 2015 10:21 pm
by TonyLiang
junnel.tiglao wrote:@tonyliang

I also encountered that problems but what i do is i added the -Dmaven.multiModuleProjectDirectory on the build.xml to the value of maven.home path. Or change the version of maven.



Thanks for you reply. And questions more below.
1) build.xml or build.properties? And could you please post your code here?
2) maven.home on my build.properties
maven.home=C:/\data_for_work/\JAVA/\JavaTools/\Maven/\bin/\apache-maven-3.3.3

Re: Why I fail to launch Demo - version 4.0

Posted: Thu Sep 10, 2015 10:32 pm
by junnel.tiglao
hello @tony

This is what i added on my build.xml on both site and admin.
<jvmarg value="-Dmaven.multiModuleProjectDirectory=maven.home>" />
then i run again.

Re: Why I fail to launch Demo - version 4.0

Posted: Fri Sep 11, 2015 4:18 am
by TonyLiang
junnel.tiglao wrote:hello @tony

This is what i added on my build.xml on both site and admin.
<jvmarg value="-Dmaven.multiModuleProjectDirectory=maven.home>" />
then i run again.



Thank you, Junel. I will test your solutio on my PC later.
With other solution, I launch demo(site) successfully. I will post it below.

Re: Why I fail to launch Demo - version 4.0

Posted: Fri Sep 11, 2015 4:38 am
by TonyLiang
This issue is fixed. Detail is as below.

=========================== Root cause / solution ==================================================
It must be that broadleaf 4.0 is not compatible well with maven 3.3. After change to maven 3.2, it pass on step 5(see original post).
maven 3.2 is recommended as instraction of Getting Started.

steps to fix:
1) download and setup(extract zip file, update M2_HOME ...) apache-maven-3.2.3 on my PC
2) update maven.home on build.properties as below
maven.home=C:/\data_for_work/\JAVA/\JavaTools/\Maven/\bin/\apache-maven-3.2.3

reference:
http://www.broadleafcommerce.com/docs/c ... ng-started
You will also need the latest version of Maven (at least version 3.1, version 3.2 is recommended)...

=========================== change JRE from 1.7 to 1.8========================================
I change JRE from 1.7 to 1.8 on my PC since I change broadleaf 3.2 to 4.0. Then I encountered some issues about JRE version(e.g. tomat
reuse JRE 1.7 although java version shown on cmd line is 1.8.0_60 ).

I post key steps to update JRE version to save others effort in case somebody encounter similar issue.
1) update ENV varialbe of JAVA_HOME. // check it by cmd: java -version

2) update/check JRE about compile on Eclipse
ecllipse -> window -> preferences -> Java -> Compiler
ecllipse -> window -> preferences -> Java -> Installed JREs

3) update/check JRE about run on Eclipse // On my PC, log show that compile with JRE 1.8, but run with JRE 1.7, then got issue
ecllipse -> Run->External Tools->External Tools Configurations->JRE -> Runtime JRE -> Separate JRE
====================================================================================