Page 1 of 1

Cannot Start jetty-demo for admin

Posted: Fri Dec 14, 2012 11:51 am
by 22dec1960
Hi,

I am new to Broadleaf and I have some issues with setting everything up. I followed the Getting Started tutorial and when running jetty-demo for websit it is fine. but when running jetty-demo for admin I get the following error:

Code: Select all

Buildfile: C:\BroadLeafcommerce\eclipse-workspace\DemoSite\admin\build.xml
jetty-demo:
[artifact:mvn] Error: Could not create the Java Virtual Machine.
[artifact:mvn] Error: A fatal exception has occurred. Program will exit.
[artifact:mvn] Error occurred during initialization of VM
[artifact:mvn] Could not reserve enough space for object heap
[artifact:mvn] Java Result: 1
BUILD SUCCESSFUL
Total time: 1 second


Any ideas what may be wrong?

Re: Cannot Start jetty-demo for admin

Posted: Fri Dec 14, 2012 12:20 pm
by phillipuniverse
In this output it says that you do not have enough memory to start up (heap space). Maybe check the JAVA_OPTS environment variable to see if you're limiting how much memory Java can take up?

Re: Cannot Start jetty-demo for admin

Posted: Thu Apr 24, 2014 12:07 am
by rppgowtham
Hey guys, How did you resolve this ? Pls help

Re: Cannot Start jetty-demo for admin

Posted: Sun Apr 27, 2014 1:59 pm
by rppgowtham
Hey , I tried to change heap size in eclipse and configuration file but it didn't work for me. So , I have installed 64 bit os and it worked . I am not sure I have done the right thing , but it worked for me.

Guys , Please help the beginners.

Re: Cannot Start jetty-demo for admin

Posted: Tue Apr 29, 2014 5:04 pm
by phillipuniverse
Changing how much memory Eclipse gets will not fix anything; Eclipse is just kicking off a new Java process. That new Java process needs the memory parameters.

This is done in the build.xml ant task:

Code: Select all

<target name="jetty-demo" depends="start-db">
    <delete dir="war/WEB-INF/lib"/>
    <artifact:mvn mavenHome="${maven.home}" fork="true">
        <jvmarg value="-XX:MaxPermSize=256M" />
        <jvmarg value="-Xmx512M" />
        <jvmarg value="-Xdebug" />
        <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" />
        <jvmarg value="-javaagent:${spring.instrument.path}" />
        <jvmarg value="-Druntime.environment=${runtime.environment}" /> 
        <arg value="compile"/>
        <arg value="war:exploded"/>
        <arg value="jetty:run"/>
    </artifact:mvn>
</target>


It looks like you just don't have enough memory on your computer to run this. The -Xmx512M parameter says it needs 512MB of memory.