AEM author fail to start with jvm error | Community
Skip to main content
subrato_kha
Level 4
December 23, 2021
Solved

AEM author fail to start with jvm error

  • December 23, 2021
  • 4 replies
  • 5792 views

Hi All,

We are facing below error when we are trying to start AEM. AEM fails to start with 

below entry in our stdout.log file
Unrecognized VM option 'MaxPermSize=512M'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

 

Has anyone faced this issue?

 

@kautuk_sahni 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by subrato_kha

the issue is fixed. It was problem on the ec2 instance. Inspite of setting the JAVA_HOME and PATH variable AEM was picking the java set by alternatives module which was java 17 hence the instance fails to start.

To fix the issue we set up a aem service start/stop service on the ec2 instance which sets the JAVA_HOME and PATH as desired.

4 replies

RajaShankar
Community Advisor
Community Advisor
December 23, 2021

@subrato_kha 

I hope you are starting the AEM from Command Line

Use the following command 

java -Xmx1024M -jar cq-quickstart-p4502-6.5.0.jar 

or if you need startup gui then add

java -Xmx1024M -jar cq-quickstart-p4502-6.5.0.jar  -gui

 

 Option MaxPermSize=256m; support was removed in 8.0 Java.

Also refer this documentation for memory arguments setup instide batch file and starting via batch file itself.

https://experienceleague.adobe.com/docs/experience-manager-65/deploying/deploying/command-line-start-and-stop.html?lang=en

Hope it helps.

Regards,

Rajashankar.R

Asutosh_Jena_
Community Advisor
Community Advisor
December 23, 2021

Hi @subrato_kha 

 

If you are using AEM 6.5 then you can use the below command to start AEM.

 

java -jar AEM_6.5_Quickstart.jar -r author -Xmx2048m -XX:+UseParallelGC --add-opens=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.jrt=ALL-UNNAMED --add-opens=java.naming/javax.naming.spi=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED -Dnashorn.args=--no-deprecation-warning

 

Thanks!

December 29, 2021

    

subrato_kha
Level 4
July 28, 2022

The issue was due to different version of java was picked up by AEM inspite of setting up the JAVA_HOME to jdk8 in environmental variables. To solve the issue we uninstalled the other version and it got fixed.

subrato_kha
subrato_khaAuthorAccepted solution
Level 4
July 28, 2022

the issue is fixed. It was problem on the ec2 instance. Inspite of setting the JAVA_HOME and PATH variable AEM was picking the java set by alternatives module which was java 17 hence the instance fails to start.

To fix the issue we set up a aem service start/stop service on the ec2 instance which sets the JAVA_HOME and PATH as desired.